-
Notifications
You must be signed in to change notification settings - Fork 51
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
Support reading IAM token from environment variable #360
Comments
You can use the environment
|
@Aerex I'm aware of the |
Ah I see. I dont think we support commands to use a short lived token per command. I think that is outside the design of the CLI. Thoughts @steveclay @tonystarkjr3 ? |
Would be a nice low-lift addition that would enable Environment variable support for short-lived secrets is a pretty common pattern for other cloud vendor CLIs too, e.g. The desired effect for us could already be achieved by checking ibm-cloud-cli-sdk/bluemix/configuration/core_config/bx_config.go Lines 261 to 266 in d415846
|
What is the use case for option 1? For option 2, the CLI doesn't manage auth sessions so a short-lived access token and a API token will be consumed in the same way. You may need to speak with the iam team on that. |
Interesting: The official IBM Cloud Terraform provider already supports the |
@Aerex To be able to authenticate to every command without requiring
If the IBM Cloud API can handle long-lived API keys directly without requiring an intermediate short-lived IAM token, then that would also solve my use case. As long as every command then supports the |
Have you looked into increaesing the session time? I understand wanting a long-lived API key but I think it would go against the design of the IAM tokens. I think you can configure different clients (UI vs CLI) to have different sessions timeouts. |
To be clear: my preference would still be using the short-lived IAM token, and having I was just pointing out that the IBM API key route would be an acceptable workaround/fallback from my side if that's already possible. |
We're working on a 1Password Shell Plugin for the
ibmcloud
CLI, which would add Touch ID authentication foribmcloud
without having secrets on disk.To fulfill that promise, all we'd need is for
ibmcloud
to support reading the (short-lived) IAM token from an environment variable, e.g.IBMCLOUD_IAM_TOKEN
, so that the~/.bluemix/config.json
file can stay free of secrets.The text was updated successfully, but these errors were encountered: