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

Use helidon.oci prefix for OCI Config and allow some oci auth types to accept federation-endpoint and tenancy-id #9740

Merged

Conversation

klustria
Copy link
Member

@klustria klustria commented Feb 6, 2025

Description

The PR fixes Issues 9681 and 9734 which includes the following:

  1. Allow instance-principal, resource-principal and oke-workload-identity to accept federation-endpoint and tenancy-id as config parameters. This is originally targeted just for oke-workload-identity where Instance Metadata Service (IMDS) does not work on an OKE environment. Because of these, it is unable to assemble the target endpoint as it needs the IMDS to retrieve the region. To resolve the issue, the federation-endpoint configuration is now allowed to be explicitly specified to avoid generation of endpoint using the region from IMDS. In some examples of the use of oke-workload-identity, the tenancy id is required, so this configuration parameter is also added as an option. Furthermore, because instance-principal and resource-principal providers extends AbstractRequestingAuthenticationDetailsProvider similar to oke-workload-instance, hence they are included in the change to allow those optional parameters.
  2. Fix a bug where the oci configuration does not work when prefixed with "helidon.oci".
  3. Add comprehensive testing coverage for above changes.

Documentation

Related readme files were already updated as part of this change

If no doc impact: None

…o accept federation-endpoint and tenancy-id

The PR fixes Issues 9681 and 9734 which includes the following:
1. Allow instance-principal, resource-principal and oke-workload-identity to accept federation-endpoint and tenancy-id as config parameters. This is originally targeted just for oke-workload-identity where Instance Metadata Service (IMDS) does not work on an OKE environment. Because of these, it is unable to assemble the target endpoint as it needs the IMDS to retrieve the region. To resolve the issue, the federation-endpoint configuration is now allowed to be explicitly specified to avoid generation of endpoint using the region from IMDS. In some examples of the use of oke-workload-identity, the tenancy id is required, so this configuration parameter is also added as an option. Furthermore, because instance-principal and resource-principal providers extends AbstractRequestingAuthenticationDetailsProvider similar to oke-workload-instance, hence they are included in the change to allow those optional parameters.
2. Fix a bug where the oci configuration does not work when prefixed with "helidon.oci".
3. Add comprehensive testing coverage for above changes.
@klustria klustria self-assigned this Feb 6, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 6, 2025
@barchetta barchetta mentioned this pull request Feb 5, 2025
15 tasks
…ARNING message with TRACE when oci config does not use "helidon.oci"
@klustria klustria requested a review from tomas-langer February 6, 2025 17:48
@klustria
Copy link
Member Author

klustria commented Feb 7, 2025

This PR should resolved theses issues: #9681 and #9734

@klustria klustria merged commit 7d86c8d into helidon-io:main Feb 7, 2025
58 checks passed
barchetta pushed a commit to barchetta/helidon that referenced this pull request Feb 10, 2025
…o accept federation-endpoint and tenancy-id (helidon-io#9740)

The PR fixes Issues 9681 and 9734 which includes the following:
1. Allow instance-principal, resource-principal and oke-workload-identity to accept federation-endpoint and tenancy-id as config parameters. This is originally targeted just for oke-workload-identity where Instance Metadata Service (IMDS) does not work on an OKE environment. Because of these, it is unable to assemble the target endpoint as it needs the IMDS to retrieve the region. To resolve the issue, the federation-endpoint configuration is now allowed to be explicitly specified to avoid generation of endpoint using the region from IMDS. In some examples of the use of oke-workload-identity, the tenancy id is required, so this configuration parameter is also added as an option. Furthermore, because instance-principal and resource-principal providers extends AbstractRequestingAuthenticationDetailsProvider similar to oke-workload-instance, hence they are included in the change to allow those optional parameters.
2. Fix a bug where the oci configuration does not work when prefixed with "helidon.oci".
3. Add comprehensive testing coverage for above changes.
4. Remove unnecessary Weight annotation with default value and replace WARNING message with TRACE when oci config does not use "helidon.oci"
barchetta added a commit that referenced this pull request Feb 10, 2025
…types to accept federation-endpoint and tenancy-id (#9765)

* Use helidon.oci prefix for OCI Config and allow some oci auth types to accept federation-endpoint and tenancy-id (#9740)

The PR fixes Issues 9681 and 9734 which includes the following:
1. Allow instance-principal, resource-principal and oke-workload-identity to accept federation-endpoint and tenancy-id as config parameters. This is originally targeted just for oke-workload-identity where Instance Metadata Service (IMDS) does not work on an OKE environment. Because of these, it is unable to assemble the target endpoint as it needs the IMDS to retrieve the region. To resolve the issue, the federation-endpoint configuration is now allowed to be explicitly specified to avoid generation of endpoint using the region from IMDS. In some examples of the use of oke-workload-identity, the tenancy id is required, so this configuration parameter is also added as an option. Furthermore, because instance-principal and resource-principal providers extends AbstractRequestingAuthenticationDetailsProvider similar to oke-workload-instance, hence they are included in the change to allow those optional parameters.
2. Fix a bug where the oci configuration does not work when prefixed with "helidon.oci".
3. Add comprehensive testing coverage for above changes.
4. Remove unnecessary Weight annotation with default value and replace WARNING message with TRACE when oci config does not use "helidon.oci"

* Adjust unit tests because of a problem with combineDependencies in the generated sources

---------

Co-authored-by: Keith Lustria <keith.lustria@oracle.com>
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
2 participants