Support authentication_type=security_token
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 30
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
We use oci session authenticate with the environment variable OCI_CLI_AUTH=security_token set. This means our ~/.oci/config file doesn't actually have a setting for user, which causes the config validation to fail.
[DEFAULT]
fingerprint =<your_fingerprint>
key_file = /home/someone/.oci/sessions/DEFAULT/oci_api_key.pem
tenancy = ocid1.tenancy.oc1..<unique_ID>
region = us-ashburn-1
security_token_file = /home/someone/.oci/sessions/DEFAULT/token
This means that I have to make some other OCI user and manage keys in order to get the ruby sdk to work. So things like @stephenpearson's kitchen-oci won't work with my normal authentication methods.
Other SDKs handle this security token auth just fine. (Notably oci-python-sdk, used by oci-cli; and oci-go-sdk used by terraform-provider-oci and packer-plugin-oracle.)
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 config validation in lib/oci/config.rb around lines 137-141 and compare how the Ruby SDK handles OCI_CLI_AUTH=security_token with the example configuration. Check the existing authentication configuration tests, if present, and consider the work complete when this session configuration validates without requiring a user entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- authentication, cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100