Skip to content

Conversation

scottd018
Copy link

@scottd018 scottd018 commented Mar 27, 2025

What this PR does / why we need it:

There is currently no information on using the client_id and client_secret parameters when using portal service accounts. This creates confusion when customers are trying to use the access tokens, described at https://docs.redhat.com/en/documentation/red_hat_customer_portal/1/html/creating_and_managing_service_accounts/ref-ciam-svc-acct-api-creating-service-acct, and causes a timeout when provisioning clusters, which is hard-coded at 15 minutes.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story (OCM-xxxx):
Fixes #

Change type

  • New feature
  • Bug fix
  • Build
  • CI
  • Documentation
  • Performance
  • Refactor
  • Style
  • Unit tests
  • Subsystem tests

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.

Copy link

openshift-ci bot commented Mar 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jneczypor for approval. For more information see the 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

Copy link

openshift-ci bot commented Mar 27, 2025

Hi @scottd018. Thanks for your PR.

I'm waiting for a terraform-redhat member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@marcolan018
Copy link
Contributor

@hunterkepley Please help to review this pr, which adds the missing part for the tf, thanks

Copy link
Contributor

@EricPonvelle EricPonvelle left a comment

Choose a reason for hiding this comment

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

This looks pretty good at explaining the client ID and secret, but I did have a point of clarification surrounding the OCM offline token with regards to the new SSO login method for ROSA.


* An offline [OCM token](https://console.redhat.com/openshift/token/rosa)
* One of the following for authenticating against the OCM service:
* An offline [OCM token](https://console.redhat.com/openshift/token/rosa)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still the case? When I go to that URL, I now see the new SSO login method. I see an option to still use API keys via a link:

image

But going there notes that the keys are deprecated:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

You right; i will create a new PR, i cannot modify that one. OCM offline token will be deprecated, so the only supported method will be using portal service accounts.

Copy link
Member

Choose a reason for hiding this comment

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

@fjcloud please ping me on here or preferably slack for review on that new MR :)


* A client ID and client secret value when using [Red Hat Customer Portal Service Accounts](https://docs.redhat.com/en/documentation/red_hat_customer_portal/1/html/creating_and_managing_service_accounts/con-ciam-svc-acct-intro-creating-service-acct#con-ciam-svc-acct-intro-creating-service-acct).

These values allow the Terraform provider to refresh the token prior to the 15-minute expiry time and allow avoiding the use of a single, hard-coded access token against the OCM API. Like the offline OCM token, the purpose of this token is to verify that you have access and permission to create and upgrade clusters.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
These values allow the Terraform provider to refresh the token prior to the 15-minute expiry time and allow avoiding the use of a single, hard-coded access token against the OCM API. Like the offline OCM token, the purpose of this token is to verify that you have access and permission to create and upgrade clusters.
These values allow the Terraform provider to refresh the token prior to the 15-minute expiry time and avoid using a single, hard-coded access token against the OCM API. Like the offline OCM token, the purpose of this token is to verify that you have access and permission to create and upgrade clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants