feature request: support for environment variable-based authentication for temporary security tokens (similar to AWS_SESSION_TOKEN)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
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:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OCI CLI's existing oci session authenticate flow and the security_token_file configuration described in the issue. Trace how authentication settings are loaded, then define and test environment-variable support for the user, tenancy, region, and temporary security token so non-interactive runs work without writing credentials to disk.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, cli, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100