Skip to content

feature request: support for environment variable-based authentication for temporary security tokens (similar to AWS_SESSION_TOKEN) #944

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

Open
x-sajalshres opened this issue May 7, 2025 · 0 comments

Comments

@x-sajalshres
Copy link

The OCI CLI and SDKs requires a temporary security token via oci session authenticate to be reference through a file-based configuration( security_token_file in ~/.oci/config). This is limiting for use cases such as CI/CD pipelines, containerized deployments, terraform cloud API based runs, or automation scripts that need to authenticate non-interactive and connot write to disk reliably.

AWS supports temporary credentials via environment variables, such as:

export AWS_ACCESS_KEY_ID=ASIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_SESSION_TOKEN=AQoDYXdzEJr...<remainder of session token>
aws ec2 describe-instances --region us-west-1

This enables automation platforms(Octopus Deploy, Bamboo, etc.) to inject credentials dynamically without writing config files or managing temp files.

Request

Add support in the OCI CLI to read temporary security tokens and user/tenancy OCIDs via environment variables, such as:

export OCI_USER_OCID=ocid1.user.oc1...
export OCI_TENANCY_OCID=ocid1.tenancy.oc1...
export OCI_REGION=us-ashburn-1
export OCI_SECURITY_TOKEN=eyJraWQiOiJ...

References:

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

No branches or pull requests

1 participant