Skip to content

Add support for OKE workload identity resource principal. - #59

Merged
cezarfx merged 3 commits into
mainfrom
fix/addOkeAuth
Sep 15, 2026
Merged

cezarfx merged 3 commits into
mainfrom
fix/addOkeAuth

Conversation

@cezarfx

@cezarfx cezarfx commented Sep 3, 2026

Copy link
Copy Markdown
Member

Add support for OKE workload identity resource principal.

@cezarfx
cezarfx requested a review from yfei-a September 3, 2026 20:17
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 3, 2026
Comment thread examples/utils.py
elif principal == 'resource principal':
provider = SignatureProvider.create_with_resource_principal()
elif principal == 'oke workload':
provider = SignatureProvider.create_with_oke_workload_identity_resource_principal()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is an existing issue in the example code, please check wether it's worth addressing as part of this patch.

    The OKE path inherits an existing examples defect affecting instance and
    resource principals as well. config_cloud.py defaults credentials_file
    to ~/.oci/config, and parameters.py opens it to derive tenant_id
    during import, before signer selection. Credential-free workloads therefore
    fail with FileNotFoundError; setting it to None instead uses
    pythontenant as the default compartment, which is not a valid compartment
    OCID. Add a separate configured compartment OCID for non-user principals,
    bypass credential-file tenancy parsing for those modes, and use that OCID as
    the default compartment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked-in a fix for allowing the example code to run without a ~/.oci/config file.

…al support without requiring an ~/.oci/config file.
@cezarfx
cezarfx merged commit 9f8adb9 into main Sep 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants