Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-42618: Replace RunHostCmd with Exec function to censor bearer token being ex… #29176

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

Shilpa-Gokul
Copy link
Contributor

@Shilpa-Gokul Shilpa-Gokul commented Oct 10, 2024

RunHostCmd function from getBearerTokenURLViaPod function was invoking the kubectl exec to execute a command from within a pod which eventually led to printing this line containing the bearer token. As a result the CI logs was removed as it contained sensitive information exposure.
Since it was difficult to make the changes upstream to avoid printing the token, replaced the RunHostCmd function with the oc exec command and redacted the token thats printed.

Redacted output will be as shown below
I1209 01:20:21.410430 3464561 client.go:936] Running 'oc --namespace=e2e-test-router-metrics-n8qsz --kubeconfig=/home/shilpa/libvirt-config/upi-install/upi/auth/kubeconfig exec execpod -- curl -s -k -H Authorization: Bearer <redacted>https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/targets?state=active'

@openshift-ci openshift-ci bot requested review from Miciah and Thealisyed October 10, 2024 06:17
@Shilpa-Gokul Shilpa-Gokul changed the title Replace RunHostCmd with Exec function to censor bearer token being ex… OCPBUGS-42618: Replace RunHostCmd with Exec function to censor bearer token being ex… Oct 10, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Oct 10, 2024
@openshift-ci-robot
Copy link

@Shilpa-Gokul: This pull request references Jira Issue OCPBUGS-42618, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juliemathew

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

RunHostCmd function from getBearerTokenURLViaPod function was invoking the kubectl exec to execute a command from within a pod which eventually led to printing this line containing the bearer token. As a result the CI logs was removed as it contained sensitive information exposure.
Since it was difficult to make the changes upstream to avoid printing the token, replaced the RunHostCmd function with a new Exec function where we have the privilege to decide what needs to be printed in the output.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from juliemathew October 10, 2024 09:19
@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 10, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/4c62cca0-86e9-11ef-8776-9b0b0a8473a1-0

@tvardema
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 10, 2024
@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/98746b80-8798-11ef-9280-4f3665830d61-0

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/b3caf260-87bf-11ef-88bd-22b7b001175f-0

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/c5a5d310-87c9-11ef-9995-4d9c6ebc2f1a-0

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 15, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/3d315c90-8aba-11ef-94b7-bb30450ae71b-0

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 15, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7fa4ac50-8aef-11ef-814a-6b867f01fde7-0

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.18-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@Shilpa-Gokul: An error was encountered. No known errors were detected, please see the full error message for details.

Full error message. could not create PullRequestPayloadQualificationRun: client rate limiter Wait returned an error: context canceled

Please contact an administrator to resolve this issue.

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.17-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/d7d60bf0-8b92-11ef-8433-3c241ccd8260-0

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.16-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.16-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/89e74130-8baa-11ef-9fcc-ef3b641fe46e-0

@Shilpa-Gokul
Copy link
Contributor Author

/payload-job periodic-ci-openshift-multiarch-master-nightly-4.18-ocp-e2e-ovn-remote-libvirt-ppc64le

Copy link
Contributor

openshift-ci bot commented Oct 16, 2024

@Shilpa-Gokul: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-multiarch-master-nightly-4.18-ocp-e2e-ovn-remote-libvirt-ppc64le

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/91de2250-8baa-11ef-811f-f52c13701662-0

@Shilpa-Gokul
Copy link
Contributor Author

@candita I have made all the changes as per your comments, could you please take a look now?

Copy link

openshift-trt bot commented Dec 9, 2024

Job Failure Risk Analysis for sha: 4783356

Job Name Failure Risk
pull-ci-openshift-origin-master-e2e-aws-ovn-single-node-upgrade High
[sig-arch][Early] Operators low level operators should have at least the conditions we had in 4.17 [Suite:openshift/conformance/parallel]
This test has passed 99.89% of 3797 runs on release 4.19 [Overall] in the last week.

Open Bugs
CI failure: operators should have at least the conditions we had in 4.17
pull-ci-openshift-origin-master-okd-scos-e2e-aws-ovn IncompleteTests
Tests for this run (20) are below the historical average (2125): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

Copy link

openshift-trt bot commented Dec 9, 2024

Job Failure Risk Analysis for sha: 4783356

Job Name Failure Risk
pull-ci-openshift-origin-master-okd-scos-e2e-aws-ovn IncompleteTests
Tests for this run (20) are below the historical average (2125): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@Shilpa-Gokul
Copy link
Contributor Author

/retest-required

@candita
Copy link
Contributor

candita commented Dec 9, 2024

/retest required

Copy link
Contributor

openshift-ci bot commented Dec 9, 2024

@candita: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

/test e2e-aws-jenkins
/test e2e-aws-ovn-edge-zones
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-image-registry
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial
/test e2e-gcp-ovn
/test e2e-gcp-ovn-builds
/test e2e-gcp-ovn-image-ecosystem
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test images
/test lint
/test unit
/test verify
/test verify-deps

The following commands are available to trigger optional jobs:

/test 4.12-upgrade-from-stable-4.11-e2e-aws-ovn-upgrade-rollback
/test e2e-agnostic-ovn-cmd
/test e2e-aws
/test e2e-aws-csi
/test e2e-aws-disruptive
/test e2e-aws-etcd-certrotation
/test e2e-aws-etcd-recovery
/test e2e-aws-ovn
/test e2e-aws-ovn-cgroupsv2
/test e2e-aws-ovn-etcd-scaling
/test e2e-aws-ovn-ipsec-serial
/test e2e-aws-ovn-kube-apiserver-rollout
/test e2e-aws-ovn-kubevirt
/test e2e-aws-ovn-single-node
/test e2e-aws-ovn-single-node-serial
/test e2e-aws-ovn-single-node-techpreview
/test e2e-aws-ovn-single-node-techpreview-serial
/test e2e-aws-ovn-single-node-upgrade
/test e2e-aws-ovn-upgrade
/test e2e-aws-ovn-upgrade-rollback
/test e2e-aws-ovn-upi
/test e2e-aws-ovn-virt-techpreview
/test e2e-aws-proxy
/test e2e-azure
/test e2e-azure-ovn-etcd-scaling
/test e2e-azure-ovn-upgrade
/test e2e-baremetalds-kubevirt
/test e2e-external-aws
/test e2e-external-aws-ccm
/test e2e-external-vsphere-ccm
/test e2e-gcp-csi
/test e2e-gcp-disruptive
/test e2e-gcp-fips-serial
/test e2e-gcp-ovn-etcd-scaling
/test e2e-gcp-ovn-rt-upgrade
/test e2e-gcp-ovn-techpreview
/test e2e-gcp-ovn-techpreview-serial
/test e2e-hypershift-conformance
/test e2e-metal-ipi-ovn
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-dualstack-local-gateway
/test e2e-metal-ipi-ovn-kube-apiserver-rollout
/test e2e-metal-ipi-serial
/test e2e-metal-ipi-serial-ovn-ipv6
/test e2e-metal-ipi-virtualmedia
/test e2e-metal-ovn-single-node-live-iso
/test e2e-metal-ovn-single-node-with-worker-live-iso
/test e2e-openstack-ovn
/test e2e-openstack-serial
/test e2e-vsphere
/test e2e-vsphere-ovn-dualstack-primaryv6
/test e2e-vsphere-ovn-etcd-scaling
/test okd-e2e-gcp
/test okd-scos-e2e-aws-ovn
/test okd-scos-images

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-origin-master-e2e-agnostic-ovn-cmd
pull-ci-openshift-origin-master-e2e-aws-csi
pull-ci-openshift-origin-master-e2e-aws-ovn-cgroupsv2
pull-ci-openshift-origin-master-e2e-aws-ovn-edge-zones
pull-ci-openshift-origin-master-e2e-aws-ovn-fips
pull-ci-openshift-origin-master-e2e-aws-ovn-kube-apiserver-rollout
pull-ci-openshift-origin-master-e2e-aws-ovn-microshift
pull-ci-openshift-origin-master-e2e-aws-ovn-microshift-serial
pull-ci-openshift-origin-master-e2e-aws-ovn-serial
pull-ci-openshift-origin-master-e2e-aws-ovn-single-node
pull-ci-openshift-origin-master-e2e-aws-ovn-single-node-serial
pull-ci-openshift-origin-master-e2e-aws-ovn-single-node-upgrade
pull-ci-openshift-origin-master-e2e-aws-ovn-upgrade
pull-ci-openshift-origin-master-e2e-gcp-csi
pull-ci-openshift-origin-master-e2e-gcp-ovn
pull-ci-openshift-origin-master-e2e-gcp-ovn-rt-upgrade
pull-ci-openshift-origin-master-e2e-gcp-ovn-upgrade
pull-ci-openshift-origin-master-e2e-hypershift-conformance
pull-ci-openshift-origin-master-e2e-metal-ipi-ovn
pull-ci-openshift-origin-master-e2e-metal-ipi-ovn-ipv6
pull-ci-openshift-origin-master-e2e-metal-ipi-ovn-kube-apiserver-rollout
pull-ci-openshift-origin-master-e2e-openstack-ovn
pull-ci-openshift-origin-master-images
pull-ci-openshift-origin-master-lint
pull-ci-openshift-origin-master-okd-scos-e2e-aws-ovn
pull-ci-openshift-origin-master-unit
pull-ci-openshift-origin-master-verify
pull-ci-openshift-origin-master-verify-deps

In response to this:

/retest required

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@candita
Copy link
Contributor

candita commented Dec 9, 2024

/retest-required
/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 9, 2024
@candita
Copy link
Contributor

candita commented Dec 9, 2024

@neisw Can you please approve #29247 as well?

/assign @neisw

@neisw
Copy link
Contributor

neisw commented Dec 9, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Dec 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: candita, neisw, Shilpa-Gokul, tvardema

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 2024
Copy link

openshift-trt bot commented Dec 9, 2024

Job Failure Risk Analysis for sha: 4783356

Job Name Failure Risk
pull-ci-openshift-origin-master-okd-scos-e2e-aws-ovn IncompleteTests
Tests for this run (20) are below the historical average (2075): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)
pull-ci-openshift-origin-master-e2e-aws-ovn-microshift-serial IncompleteTests
Tests for this run (22) are below the historical average (423): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)
pull-ci-openshift-origin-master-e2e-aws-ovn-microshift IncompleteTests
Tests for this run (22) are below the historical average (943): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

Copy link

openshift-trt bot commented Dec 9, 2024

Job Failure Risk Analysis for sha: 4783356

Job Name Failure Risk
pull-ci-openshift-origin-master-okd-scos-e2e-aws-ovn IncompleteTests
Tests for this run (20) are below the historical average (2051): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)
pull-ci-openshift-origin-master-e2e-aws-ovn-microshift-serial IncompleteTests
Tests for this run (22) are below the historical average (423): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)
pull-ci-openshift-origin-master-e2e-aws-ovn-microshift IncompleteTests
Tests for this run (22) are below the historical average (943): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@candita
Copy link
Contributor

candita commented Dec 10, 2024

I noticed some microshift install failures in required tests, not related to this PR.
/retest-required

Copy link

openshift-trt bot commented Dec 10, 2024

Job Failure Risk Analysis for sha: 4783356

Job Name Failure Risk
pull-ci-openshift-origin-master-okd-scos-e2e-aws-ovn IncompleteTests
Tests for this run (20) are below the historical average (1846): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@Shilpa-Gokul
Copy link
Contributor Author

/retest-required

@Shilpa-Gokul
Copy link
Contributor Author

/test okd-scos-e2e-aws-ovn

Copy link

openshift-trt bot commented Dec 10, 2024

Job Failure Risk Analysis for sha: 4783356

Job Name Failure Risk
pull-ci-openshift-origin-master-okd-scos-e2e-aws-ovn IncompleteTests
Tests for this run (15) are below the historical average (1822): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 8737ae6 and 2 for PR HEAD 4783356 in total

Copy link
Contributor

openshift-ci bot commented Dec 10, 2024

@Shilpa-Gokul: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-single-node 4783356 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-metal-ipi-ovn-kube-apiserver-rollout 4783356 link false /test e2e-metal-ipi-ovn-kube-apiserver-rollout
ci/prow/e2e-metal-ipi-ovn 4783356 link false /test e2e-metal-ipi-ovn
ci/prow/e2e-aws-ovn-single-node-serial 4783356 link false /test e2e-aws-ovn-single-node-serial
ci/prow/e2e-aws-ovn-single-node-upgrade 4783356 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-agnostic-ovn-cmd 4783356 link false /test e2e-agnostic-ovn-cmd
ci/prow/okd-scos-e2e-aws-ovn 4783356 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit d97e9ab into openshift:master Dec 10, 2024
22 of 29 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: openshift-enterprise-tests
This PR has been included in build openshift-enterprise-tests-container-v4.19.0-202412110336.p0.gd97e9ab.assembly.stream.el9.
All builds following this will include this PR.

@Shilpa-Gokul
Copy link
Contributor Author

/cherry-pick release-4.18
/jira cherry-pick OCPBUGS-42618

@openshift-cherrypick-robot

@Shilpa-Gokul: new pull request created: #29377

In response to this:

/cherry-pick release-4.18
/jira cherry-pick OCPBUGS-42618

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Shilpa-Gokul
Copy link
Contributor Author

/jira cherrypick OCPBUGS-42618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants