Skip to content
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

OCI CLI not working with Instance Principal Auth #539

Open
Chhatrapal215 opened this issue Jun 1, 2023 · 1 comment
Open

OCI CLI not working with Instance Principal Auth #539

Chhatrapal215 opened this issue Jun 1, 2023 · 1 comment
Labels
Object Storage Issue pertains to the Object Storage service

Comments

@Chhatrapal215
Copy link

OCI_CLI_AUTH=instance_principal
[opc@cloudnenamingvm ~]$ oci os object list --bucket-name cloudnetnamingDND

/home/opc/lib/oracle-cli/lib64/python3.6/site-packages/oci/_vendor/httpsig_cffi/sign.py:10: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.
from cryptography.hazmat.backends import default_backend # noqa: F401
ServiceError:
{
"client_version": "Oracle-PythonSDK/2.99.1, Oracle-PythonCLI/3.25.4",
"code": "BucketNotFound",
"logging_tips": "Please run the OCI CLI command using --debug flag to find more debug information.",
"message": "Either the bucket named 'cloudnetnamingDND' does not exist in the namespace 'axmbu1eyltbl' or you are not authorized to access it",
"opc-request-id": "phx-1:0oGfeV3SHeyjG8IZVI_1GycoUtg-VgWxY38n_peiSVdgUaMSTk8__D5aXqPiv3d8",
"operation_name": "list_objects",
"request_endpoint": "GET https://objectstorage.us-phoenix-1.oraclecloud.com/n/axmbu1eyltbl/b/cloudnetnamingDND/o",
"status": 404,
"target_service": "object_storage",
"timestamp": "2023-06-01T06:47:10.851532+00:00",
"troubleshooting_tips": "See [https://docs.oracle.com/iaas/Content/API/References/apierrors.htm] for more information about resolving this error. If you are unable to resolve this issue, run this CLI command with --debug option and contact Oracle support and provide them the full error message."
}

When I am using config file, it works fine. Group has the user and dynamic group has the OCID of my VM. Same policy statements are given for both, yet config file works but instance principal method doesn’t .
Can someone help in debugging?

Screenshot 2023-06-01 at 12 04 48 PM
@KartikShrikantHegde KartikShrikantHegde added the SDK Issue pertains to the SDK itself and not specific to any service label Jun 5, 2023
@KartikShrikantHegde KartikShrikantHegde added Object Storage Issue pertains to the Object Storage service and removed SDK Issue pertains to the SDK itself and not specific to any service labels Jun 21, 2023
@adizohar
Copy link
Member

adizohar commented Dec 4, 2023

Please check below command

export OCI_CLI_AUTH=instance_principal
oci os object list --bucket-name cloudnetnamingDND
or
oci os object list --bucket-name cloudnetnamingDND --auth instance_principal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Object Storage Issue pertains to the Object Storage service
Projects
None yet
Development

No branches or pull requests

3 participants