oci ignores config options and OCI_CLI_AUTH variable
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
This is very odd, but for some reason I can't use OCI_CLI_AUTH env variable, it's just ignored by oci.
I.e:
> oci compute instance ls --compartment-id=ocid1.tenancy.oc1....
WARNING: The active profile contains a value for 'security_token_file' which is not being used. To authenticate using the token, specify --auth security_token
...
> echo $OCI_CLI_AUTH
security_token
Here my config:
cat ~/.oci/config
[DEFAULT]
fingerprint=...
key_file=/Users/josser/.oci/sessions/DEFAULT/oci_api_key.pem
tenancy=ocid1.tenancy.oc1.....
compartment-id=ocid1.tenancy.oc1....
region=eu-frankfurt-1
security_token_file=/Users/josser/.oci/sessions/DEFAULT/token
user=ocid1.user.oc1.....
Another odd thing is that it ignores compartment-id option from config file.
Is there any way to debug what I'm doing wrong?
OS: OS X Venura 13.1 (22C65)
oci --version
3.22.3 (latest from brew)
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
Reproduce oci compute instance ls with the shown ~/.oci/config and OCI_CLI_AUTH=security_token using OCI CLI 3.22.3. Trace the CLI's configuration and authentication handling; done means the environment variable and configured compartment-id are honored, with tests covering both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100