Class ResourcePrincipalAuthenticationDetailsProvider

  • All Implemented Interfaces:
    AbstractAuthenticationDetailsProvider, BasicAuthenticationDetailsProvider, ConfigurableRefreshOnNotAuthenticatedProvider<String>, RefreshableOnNotAuthenticatedProvider<String>, RegionProvider
    Direct Known Subclasses:
    ResourcePrincipalsV3AuthenticationDetailsProvider

    public class ResourcePrincipalAuthenticationDetailsProvider
    extends AbstractRequestingAuthenticationDetailsProvider
    implements RegionProvider, RefreshableOnNotAuthenticatedProvider<String>, ConfigurableRefreshOnNotAuthenticatedProvider<String>

    This constructs a default implementation of the ResourcePrincipalAuthenticationDetailsProvider, constructed in accordance with the following environment variable settings:

    • OCI_RESOURCE_PRINCIPAL_VERSION:

      This is required. Permitted values are "1.1", "2.1", "2.1.1", "2.1.2", "2.2" and "3.0"

      For OCI_RESOURCE_PRINCIPAL_VERSION = "1.1"

    • OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT:

      This is required. The endpoint for retrieving the Resource Principal Token.

    • OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT:

      If set, the value from environment variable is used.

      Otherwise, it uses the default resource principal token path provider.

      For OCI_RESOURCE_PRINCIPAL_VERSION = "2.1"

    • OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT

      This is required. The endpoint for retrieving the Resource Principal Token.

    • OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT

      This is required. The endpoint for retrieving the Resource Principal Session Token.

    • OCI_RESOURCE_PRINCIPAL_RESOURCE_ID

      This is required. The RPv2.1 resource id.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM

      This is required. If this points to existing file path, then the filesystem-supplied private key will be retrieved from that location.

      Otherwise, the value is interpreted as the direct injection of a private key.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE

      This is optional. The passphrase for the private key.

      For OCI_RESOURCE_PRINCIPAL_VERSION = "2.1.1"

    • OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT

      This is required. The endpoint for retrieving the Resource Principal Token.

    • OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT

      This is required. The endpoint for retrieving the Resource Principal Session Token.

    • OCI_RESOURCE_PRINCIPAL_RESOURCE_ID

      This is required. The RPv2.1.1 resource id.

    • OCI_RESOURCE_PRINCIPAL_TENANCY_ID

      This is required. The RPv2.1.1 tenancy id.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM

      This is required. If this points to existing file path, then the filesystem-supplied private key will be retrieved from that location.

      Otherwise, the value is interpreted as the direct injection of a private key.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE

      This is optional. The passphrase for the private key.

      For OCI_RESOURCE_PRINCIPAL_VERSION = "2.1.2"

    • OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT

      This is required. The endpoint for retrieving the Resource Principal Token.

    • OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT

      This is required. The endpoint for retrieving the Resource Principal Session Token.

    • OCI_RESOURCE_PRINCIPAL_RESOURCE_ID

      This is required. The RPv2.1.2 resource id.

    • OCI_RESOURCE_PRINCIPAL_TENANCY_ID

      This is required. The RPv2.1.2 tenancy id.

    • OCI_RESOURCE_PRINCIPAL_SECURITY_CONTEXT

      Security context is a must for RPv2.1.2. If set via the environment variable, the value of RPv2.1.2 security context from environment variable is used.

      If set via the builder, security context provided via the builder overrides the value provided via the environment variable.

    • OCI_RESOURCE_PRINCIPAL_RPT_PATH

      If set, the value from environment variable is used.

      Otherwise, it uses the default resource principal token path DEFAULT_OCI_RESOURCE_PRINCIPAL_RPT_PATH_FORV212.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM

      This is required. If this points to existing file path, then the filesystem-supplied private key will be retrieved from that location.

      Otherwise, the value is interpreted as the direct injection of a private key.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE

      This is optional. The passphrase for the private key.

      For OCI_RESOURCE_PRINCIPAL_VERSION = "2.2"

    • OCI_RESOURCE_PRINCIPAL_RPST:

      If this points to an existing file path, then the filesystem-supplied resource principal session token will be retrieved from that location. This mode supports token refresh (if the environment replaces the RPST in the filesystem).

      Otherwise, the environment variable is taken to hold the raw value of an RPST. Under these circumstances, the RPST cannot be refreshed; consequently, this mode is only usable for short-lived executables.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM:

      If this points to an existing file path, then the filesystem-supplied private key will be retrieved from that location. As with the OCI_RESOURCE_PRINCIPAL_RPST, this mode supports token refresh if the environment can update the file contents.

      Otherwise, the value is interpreted as the direct injection of a private key. The same considerations as to the lifetime of this value apply when directly injecting a key.

    • OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE:

      This is optional. If set, it contains either the location (as an existing file path) or the value of the passphrase associated with the private key.

    • OCI_RESOURCE_PRINCIPAL_REGION:

      If set, this holds the canonical form of the local region. This is intended to enable executables to locate their "local" OCI service endpoints.