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

fix: pass ibm cloud session token along to iaas #4254

Merged

Conversation

dnwe
Copy link
Contributor

@dnwe dnwe commented Dec 20, 2022

Currently, in order to use the IBM provider to manager classic infrastructure resources you must either configure the provider manually with iam_token and iam_refresh_token variables, or you must provide api-specific credentials via the iaas_classic_username and iaas_classic_api_key variables. However, it should be reasonable when using ibmcloud_api_key for the provider to passthrough the access and refresh tokens received as part of the IBM Cloud session.

It seemed like the original code had been in-place to do that, but it was incorrectly guarded by a non-nil check of
sess.SoftLayerSession.IAMToken rather than a check to confirm that explicit iaas credentials hadn't been provided already.

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates #3405

@dnwe dnwe changed the title fix: pass bluemix session token along to iaas fix: pass ibm cloud session token along to iaas Dec 20, 2022
Currently, in order to use the IBM provider to manager classic
infrastructure resources you must either configure the provider manually
with `iam_token` and `iam_refresh_token` variables, or you must provide
api-specific credentials via the `iaas_classic_username` and
`iaas_classic_api_key` variables. However, it should be reasonable when
using `ibmcloud_api_key` for the provider to passthrough the access and
refresh tokens received as part of the IBM Cloud session.

It seemed like the original code had been in-place to do that, but it
was incorrectly guarded by a non-nil check of
`sess.SoftLayerSession.IAMToken` rather than a check to confirm that
explicit iaas credentials hadn't been provided already.

Signed-off-by: Dominic Evans <[email protected]>
@dnwe dnwe force-pushed the use-ibmcloud-session-for-softlayer-go branch from fe92ce5 to 991293f Compare December 20, 2022 14:13
@dnwe
Copy link
Contributor Author

dnwe commented Jan 24, 2023

@hkantare is this something you could take a look at? I think you worked on the original IAM authentication flows

@hkantare
Copy link
Collaborator

@dnwe We will review and make it avilable as part of next release (Jan end)

@hkantare hkantare merged commit e91be0e into IBM-Cloud:master Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants