Package com.oracle.bmc.auth
Class AbstractFederationClientAuthenticationDetailsProviderBuilder<B extends AbstractFederationClientAuthenticationDetailsProviderBuilder<B,P>,P extends AbstractAuthenticationDetailsProvider>
- java.lang.Object
- 
- com.oracle.bmc.auth.AbstractRequestingAuthenticationDetailsProvider.Builder<B>
- 
- com.oracle.bmc.auth.AbstractFederationClientAuthenticationDetailsProviderBuilder<B,P>
 
 
- 
- Type Parameters:
- B- builder class
- P- provider class
 - Direct Known Subclasses:
- InstancePrincipalsAuthenticationDetailsProvider.InstancePrincipalsAuthenticationDetailsProviderBuilder,- ResourcePrincipalAuthenticationDetailsProvider.ResourcePrincipalAuthenticationDetailsProviderBuilder
 
 public abstract class AbstractFederationClientAuthenticationDetailsProviderBuilder<B extends AbstractFederationClientAuthenticationDetailsProviderBuilder<B,P>,P extends AbstractAuthenticationDetailsProvider> extends AbstractRequestingAuthenticationDetailsProvider.Builder<B> Abstract builder base class for authentication details provider extendingAbstractRequestingAuthenticationDetailsProvider
- 
- 
Field SummaryFields Modifier and Type Field Description static StringAUTHORIZATION_HEADER_VALUEThe Authorization header value to be sent for requests to the metadata service.protected CircuitBreakerConfigurationcircuitBreakerConfigurationThe configuration for the circuit breaker.protected intdetectEndpointRetriesThe number of retries for auto-detecting endpoint.static StringENABLE_DEFAULT_CIRCUIT_BREAKER_CONFIGEnvironment variable used to disable circuit breaker.protected StringfederationEndpointThe federation endpoint url.protected X509CertificateSupplierleafCertificateSupplierThe leaf certificate, or null if detecting from instance metadata.static StringMETADATA_BASE_URL_ENV_VAREnvironment variable used to overwrite the default metadata base url.static StringMETADATA_SERVICE_BASE_URLDefault base url of metadata service.static StringMETADATA_URL_OVERRIDEMetadata URL from environment variable, to use if present.protected StringmetadataBaseUrlBase url of metadata service.protected RegionregionDetected region.protected static ServiceSERVICEService instance for auth.protected StringtenancyIdTenancy OCI, or null if detecting from instance metadata.protected inttimeoutForEachRetryThe custom timeout for each retry for auto-detecting endpoint.- 
Fields inherited from class com.oracle.bmc.auth.AbstractRequestingAuthenticationDetailsProvider.BuilderadditionalFederationClientConfigurators, federationClient, federationClientConfigurator, intermediateCertificateSuppliers, sessionKeySupplier
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractFederationClientAuthenticationDetailsProviderBuilder()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidautoDetectCertificatesUsingMetadataUrl()Auto detects and configures the certificates needed using Instance metadata.protected StringautoDetectEndpointUsingMetadataUrl()Auto detects the endpoint that should be used when talking to OCI Auth, if no endpoint has been configured already.protected voidautoDetectUsingMetadataUrl()Auto-detect endpoint and certificate information using Instance metadata.Pbuild()Build a new AuthenticationDetailsProvider that uses the FederationClient.protected abstract PbuildProvider(SessionKeySupplier sessionKeySupplierToUse)Build the actual provider.BcircuitBreakerConfigurator(CircuitBreakerConfiguration circuitBreakerConfiguration)Configures the Circuit Breaker to use, if any.protected FederationClientcreateFederationClient(SessionKeySupplier sessionKeySupplier)Create the federation client.BdetectEndpointRetries(int detectEndpointRetries)Configures the custom retries to use for detecting endpoint.BfederationEndpoint(String federationEndpoint)Configures the custom federationEndpoint to use.protected booleangetDefaultCircuitBreakerOverride()Fetch the value from environment variable for disabling circuit breaker.StringgetFederationEndpoint()X509CertificateSuppliergetLeafCertificateSupplier()StringgetMetadataBaseUrl()RegiongetRegion()StringgetTenancyId()BleafCertificateSupplier(X509CertificateSupplier leafCertificateSupplier)Configures the custom leafCertificateSupplier to use.BmetadataBaseUrl(String metadataBaseUrl)Configure the metadata endpoint to use when retrieving the instance data and principal for federation.protected Bpurpose(String purpose)Configure the purpose to be used.BtenancyId(String tenancyId)Configures the tenancy id to use.BtimeoutForEachRetry(int timeoutForEachRetry)Configures the custom timeout for each retry to use for detecting endpoint.- 
Methods inherited from class com.oracle.bmc.auth.AbstractRequestingAuthenticationDetailsProvider.BuilderadditionalFederationClientConfigurator, federationClientConfigurator, intermediateCertificateSuppliers, sessionKeySupplier
 
- 
 
- 
- 
- 
Field Detail- 
SERVICEprotected static final Service SERVICE Service instance for auth.
 - 
METADATA_SERVICE_BASE_URLpublic static final String METADATA_SERVICE_BASE_URL Default base url of metadata service.- See Also:
- Constant Field Values
 
 - 
METADATA_BASE_URL_ENV_VARpublic static final String METADATA_BASE_URL_ENV_VAR Environment variable used to overwrite the default metadata base url.- See Also:
- Constant Field Values
 
 - 
METADATA_URL_OVERRIDEpublic static final String METADATA_URL_OVERRIDE Metadata URL from environment variable, to use if present.
 - 
ENABLE_DEFAULT_CIRCUIT_BREAKER_CONFIGpublic static final String ENABLE_DEFAULT_CIRCUIT_BREAKER_CONFIG Environment variable used to disable circuit breaker.- See Also:
- Constant Field Values
 
 - 
AUTHORIZATION_HEADER_VALUEpublic static final String AUTHORIZATION_HEADER_VALUE The Authorization header value to be sent for requests to the metadata service.- See Also:
- Constant Field Values
 
 - 
metadataBaseUrlprotected volatile String metadataBaseUrl Base url of metadata service.
 - 
federationEndpointprotected String federationEndpoint The federation endpoint url.
 - 
detectEndpointRetriesprotected int detectEndpointRetries The number of retries for auto-detecting endpoint.
 - 
timeoutForEachRetryprotected int timeoutForEachRetry The custom timeout for each retry for auto-detecting endpoint.
 - 
leafCertificateSupplierprotected X509CertificateSupplier leafCertificateSupplier The leaf certificate, or null if detecting from instance metadata.
 - 
tenancyIdprotected String tenancyId Tenancy OCI, or null if detecting from instance metadata.
 - 
circuitBreakerConfigurationprotected CircuitBreakerConfiguration circuitBreakerConfiguration The configuration for the circuit breaker.
 - 
regionprotected Region region Detected region.
 
- 
 - 
Method Detail- 
metadataBaseUrlpublic B metadataBaseUrl(String metadataBaseUrl) Configure the metadata endpoint to use when retrieving the instance data and principal for federation.- Parameters:
- metadataBaseUrl- the metadata base url
- Returns:
- this builder
 
 - 
federationEndpointpublic B federationEndpoint(String federationEndpoint) Configures the custom federationEndpoint to use.- Parameters:
- federationEndpoint- the federation endpoint
- Returns:
- this builder
 
 - 
detectEndpointRetriespublic B detectEndpointRetries(int detectEndpointRetries) Configures the custom retries to use for detecting endpoint.- Parameters:
- detectEndpointRetries- the number of retries
- Returns:
- this builder
 
 - 
timeoutForEachRetrypublic B timeoutForEachRetry(int timeoutForEachRetry) Configures the custom timeout for each retry to use for detecting endpoint.- Parameters:
- timeoutForEachRetry- the custom timeout
- Returns:
- this builder
 
 - 
leafCertificateSupplierpublic B leafCertificateSupplier(X509CertificateSupplier leafCertificateSupplier) Configures the custom leafCertificateSupplier to use.- Parameters:
- leafCertificateSupplier-
- Returns:
- this builder
 
 - 
tenancyIdpublic B tenancyId(String tenancyId) Configures the tenancy id to use.- Parameters:
- tenancyId- the tenancy OCID
- Returns:
- this builder
 
 - 
purposeprotected B purpose(String purpose) Configure the purpose to be used.- Parameters:
- purpose- the purpose string
- Returns:
- this builder
 
 - 
circuitBreakerConfiguratorpublic B circuitBreakerConfigurator(CircuitBreakerConfiguration circuitBreakerConfiguration) Configures the Circuit Breaker to use, if any.- Parameters:
- circuitBreakerConfiguration- the circuit breaker to use
- Returns:
- this builder
 
 - 
getDefaultCircuitBreakerOverrideprotected boolean getDefaultCircuitBreakerOverride() Fetch the value from environment variable for disabling circuit breaker.
 - 
buildpublic P build() Build a new AuthenticationDetailsProvider that uses the FederationClient.- Returns:
- A new provider instance.
 
 - 
createFederationClientprotected FederationClient createFederationClient(SessionKeySupplier sessionKeySupplier) Create the federation client.- Parameters:
- sessionKeySupplier- the session key supplier
- Returns:
- the federation client
 
 - 
autoDetectUsingMetadataUrlprotected void autoDetectUsingMetadataUrl() Auto-detect endpoint and certificate information using Instance metadata.
 - 
autoDetectEndpointUsingMetadataUrlprotected String autoDetectEndpointUsingMetadataUrl() Auto detects the endpoint that should be used when talking to OCI Auth, if no endpoint has been configured already.- Returns:
- The auto-detected, or currently set, auth endpoint.
 
 - 
autoDetectCertificatesUsingMetadataUrlprotected void autoDetectCertificatesUsingMetadataUrl() Auto detects and configures the certificates needed using Instance metadata.
 - 
buildProviderprotected abstract P buildProvider(SessionKeySupplier sessionKeySupplierToUse) Build the actual provider.- Parameters:
- sessionKeySupplierToUse- the session key supplier to use
- Returns:
- authentication details provider
 
 - 
getMetadataBaseUrlpublic String getMetadataBaseUrl() 
 - 
getFederationEndpointpublic String getFederationEndpoint() 
 - 
getLeafCertificateSupplierpublic X509CertificateSupplier getLeafCertificateSupplier() 
 - 
getTenancyIdpublic String getTenancyId() 
 - 
getRegionpublic Region getRegion() 
 
- 
 
-