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

MGMT-19026: Add authentication support for refresh token of ocm-cli #2540

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dudyas6
Copy link
Contributor

@dudyas6 dudyas6 commented Sep 29, 2024

This PR is to add the option to authenticate against RHSSO and fetch an acces_token using ocm-cli config refresh_token, this PR is added since offline token deprecation, and to add the new authentication method required.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 29, 2024
Copy link

openshift-ci bot commented Sep 29, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

openshift-ci bot commented Sep 29, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dudyas6
Once this PR has been reviewed and has the lgtm label, please assign eifrach for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 29, 2024
@dudyas6 dudyas6 changed the title Add support for refresh token of ocm-cli when authenticating against … MGMT-19026: Add authentication support for refresh token of ocm-cli Sep 29, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 29, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 29, 2024

@dudyas6: This pull request references MGMT-19026 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.18.0" version, but no target version was set.

In response to this:

This PR is to add the option to authenticate against RHSSO and fetch an acces_token using ocm-cli config refresh_token, this PR is added since offline token deprecation, and to add the new authentication method 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 openshift-eng/jira-lifecycle-plugin repository.

@dudyas6 dudyas6 marked this pull request as ready for review September 29, 2024 08:56
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 29, 2024
Copy link
Contributor

@danmanor danmanor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test it locally ?

@@ -193,3 +193,5 @@ IMAGES_FLAVOR
SERVICE_ACCOUNT_CLIENT_ID
SERVICE_ACCOUNT_CLIENT_SECRET
OCM_SELF_TOKEN
OCM_CLI_REFRESH_TOKEN
SECOND_OCM_CLI_REFRESH_TOKEN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In kni-assisted repo we have this
SECOND_OFFLINE_TOKEN = utils.get_env('SECOND_OFFLINE_TOKEN') SECOND_PULL_SECRET = utils.get_env('SECOND_PULL_SECRET')

Since offline token is deprecated, we will need a second ocm token.

@dudyas6
Copy link
Contributor Author

dudyas6 commented Sep 29, 2024

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 29, 2024
@dudyas6
Copy link
Contributor Author

dudyas6 commented Sep 29, 2024

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 29, 2024
Copy link

openshift-ci bot commented Sep 29, 2024

@dudyas6: The following test 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-metal-assisted-kube-api-late-binding-single-node 2b7f9d1 link false /test e2e-metal-assisted-kube-api-late-binding-single-node

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.

@dudyas6
Copy link
Contributor Author

dudyas6 commented Sep 29, 2024

@danmanor tested locally that all 3 options are working

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2024
@openshift-merge-robot
Copy link

PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants