B
- builder classP
- provider classpublic abstract class AbstractFederationClientAuthenticationDetailsProviderBuilder<B extends AbstractFederationClientAuthenticationDetailsProviderBuilder<B,P>,P extends AbstractAuthenticationDetailsProvider> extends AbstractRequestingAuthenticationDetailsProvider.Builder<B>
Abstract builder base class for authentication details provider extending AbstractRequestingAuthenticationDetailsProvider
Modifier and Type | Field and Description |
---|---|
static String |
AUTHORIZATION_HEADER_VALUE
The Authorization header value to be sent for requests to the metadata service.
|
protected CircuitBreakerConfiguration |
circuitBreakerConfiguration
The configuration for the circuit breaker.
|
protected int |
detectEndpointRetries
The number of retries for auto-detecting endpoint.
|
protected static String |
FALLBACK_METADATA_SERVICE_URL
fallback base url of metadata service.
|
protected String |
federationEndpoint
The federation endpoint url.
|
protected X509CertificateSupplier |
leafCertificateSupplier
The leaf certificate, or null if detecting from instance metadata.
|
static String |
METADATA_SERVICE_BASE_URL
Default base url of metadata service.
|
protected String |
metadataBaseUrl
Base url of metadata service.
|
protected Region |
region
Detected region.
|
protected static Service |
SERVICE
Service instance for auth.
|
protected String |
tenancyId
Tenancy OCI, or null if detecting from instance metadata.
|
protected int |
timeoutForEachRetry
The custom timeout for each retry for auto-detecting endpoint.
|
additionalFederationClientConfigurators, federationClient, federationClientConfigurator, intermediateCertificateSuppliers, sessionKeySupplier
Constructor and Description |
---|
AbstractFederationClientAuthenticationDetailsProviderBuilder() |
Modifier and Type | Method and Description |
---|---|
protected void |
autoDetectCertificatesUsingMetadataUrl()
Auto detects and configures the certificates needed using Instance metadata.
|
protected String |
autoDetectEndpointUsingMetadataUrl()
Auto detects the endpoint that should be used when talking to OCI Auth, if no endpoint has
been configured already.
|
protected void |
autoDetectUsingMetadataUrl()
Auto-detect endpoint and certificate information using Instance metadata.
|
P |
build()
Build a new AuthenticationDetailsProvider that uses the FederationClient.
|
protected abstract P |
buildProvider(SessionKeySupplier sessionKeySupplierToUse)
Build the actual provider.
|
B |
circuitBreakerConfigurator(CircuitBreakerConfiguration circuitBreakerConfiguration)
Configures the Circuit Breaker to use, if any.
|
protected FederationClient |
createFederationClient(SessionKeySupplier sessionKeySupplier)
Create the federation client.
|
B |
detectEndpointRetries(int detectEndpointRetries)
Configures the custom retries to use for detecting endpoint.
|
B |
federationEndpoint(String federationEndpoint)
Configures the custom federationEndpoint to use.
|
String |
getFederationEndpoint() |
X509CertificateSupplier |
getLeafCertificateSupplier() |
String |
getMetadataBaseUrl() |
Region |
getRegion() |
String |
getTenancyId() |
B |
leafCertificateSupplier(X509CertificateSupplier leafCertificateSupplier)
Configures the custom leafCertificateSupplier to use.
|
B |
metadataBaseUrl(String metadataBaseUrl)
Configure the metadata endpoint to use when retrieving the instance data and principal for
federation.
|
protected B |
purpose(String purpose)
Configure the purpose to be used.
|
B |
tenancyId(String tenancyId)
Configures the tenancy id to use.
|
B |
timeoutForEachRetry(int timeoutForEachRetry)
Configures the custom timeout for each retry to use for detecting endpoint.
|
additionalFederationClientConfigurator, federationClientConfigurator, intermediateCertificateSuppliers, sessionKeySupplier
protected static final Service SERVICE
Service instance for auth.
public static final String METADATA_SERVICE_BASE_URL
Default base url of metadata service.
protected static final String FALLBACK_METADATA_SERVICE_URL
fallback base url of metadata service.
public static final String AUTHORIZATION_HEADER_VALUE
The Authorization header value to be sent for requests to the metadata service.
protected volatile String metadataBaseUrl
Base url of metadata service.
protected String federationEndpoint
The federation endpoint url.
protected int detectEndpointRetries
The number of retries for auto-detecting endpoint.
protected int timeoutForEachRetry
The custom timeout for each retry for auto-detecting endpoint.
protected X509CertificateSupplier leafCertificateSupplier
The leaf certificate, or null if detecting from instance metadata.
protected String tenancyId
Tenancy OCI, or null if detecting from instance metadata.
protected CircuitBreakerConfiguration circuitBreakerConfiguration
The configuration for the circuit breaker.
protected Region region
Detected region.
public AbstractFederationClientAuthenticationDetailsProviderBuilder()
public B metadataBaseUrl(String metadataBaseUrl)
Configure the metadata endpoint to use when retrieving the instance data and principal for federation.
metadataBaseUrl
- the metadata base urlpublic B federationEndpoint(String federationEndpoint)
Configures the custom federationEndpoint to use.
federationEndpoint
- the federation endpointpublic B detectEndpointRetries(int detectEndpointRetries)
Configures the custom retries to use for detecting endpoint.
detectEndpointRetries
- the number of retriespublic B timeoutForEachRetry(int timeoutForEachRetry)
Configures the custom timeout for each retry to use for detecting endpoint.
timeoutForEachRetry
- the custom timeoutpublic B leafCertificateSupplier(X509CertificateSupplier leafCertificateSupplier)
Configures the custom leafCertificateSupplier to use.
leafCertificateSupplier
- public B tenancyId(String tenancyId)
Configures the tenancy id to use.
tenancyId
- the tenancy OCIDprotected B purpose(String purpose)
Configure the purpose to be used.
purpose
- the purpose stringpublic B circuitBreakerConfigurator(CircuitBreakerConfiguration circuitBreakerConfiguration)
Configures the Circuit Breaker to use, if any.
circuitBreakerConfiguration
- the circuit breaker to usepublic P build()
Build a new AuthenticationDetailsProvider that uses the FederationClient.
protected FederationClient createFederationClient(SessionKeySupplier sessionKeySupplier)
Create the federation client.
sessionKeySupplier
- the session key supplierprotected void autoDetectUsingMetadataUrl()
Auto-detect endpoint and certificate information using Instance metadata.
protected String autoDetectEndpointUsingMetadataUrl()
Auto detects the endpoint that should be used when talking to OCI Auth, if no endpoint has been configured already.
protected void autoDetectCertificatesUsingMetadataUrl()
Auto detects and configures the certificates needed using Instance metadata.
protected abstract P buildProvider(SessionKeySupplier sessionKeySupplierToUse)
Build the actual provider.
sessionKeySupplierToUse
- the session key supplier to usepublic String getMetadataBaseUrl()
public String getFederationEndpoint()
public X509CertificateSupplier getLeafCertificateSupplier()
public String getTenancyId()
public Region getRegion()
Copyright © 2016–2024. All rights reserved.