Interface OciConfig
- All Known Implementing Classes:
OciConfig.BuilderBase.OciConfigImpl
OciAuthenticationDetailsProvider
.- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forOciConfig
.static class
OciConfig.BuilderBase<BUILDER extends OciConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends OciConfig> Fluent API builder base forOciConfig
. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe OCI authentication fingerprint.The OCI authentication key file.Optional<char[]>
The OCI authentication passphrase.Optional<char[]>
The OCI authentication private key.The OCI authentication key file path.The OCI region.The list of authentication strategies that will be attempted byAbstractAuthenticationDetailsProvider
when one is called for.The singular authentication strategy to apply.The OCI tenant id.The OCI user id.static OciConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static OciConfig.Builder
Create a new fluent API builder from an existing instance.The OCI configuration profile path.The OCI configuration/auth profile name.static OciConfig
create()
Create a new instance with default values.static OciConfig
Create a new instance from configuration.default boolean
Determines whether sufficient configuration is present on this bean to be used for OCI's "file-based" authentication provider.The OCI IMDS hostname.The OCI IMDS connection timeout.The list ofOciAuthenticationDetailsProvider.AuthStrategy
names (excludingOciAuthenticationDetailsProvider.AuthStrategy.AUTO
) that are potentially applicable for use.default boolean
Determines whether sufficient configuration is present on this bean to be used for OCI's "simple" authentication provider.
-
Field Details
-
CONFIG_KEY
Config key of this config.- See Also:
-
IMDS_HOSTNAME
Primary hostname of metadata service.- See Also:
-
DEFAULT_PROFILE_NAME
Redefine the constant, as it is private in BMC.- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
authStrategy
The singular authentication strategy to apply. This will be preferred overauthStrategies()
if both are present.- Returns:
- the singular authentication strategy to be applied
-
authStrategies
The list of authentication strategies that will be attempted byAbstractAuthenticationDetailsProvider
when one is called for. This is only used ifauthStrategy()
is not present.auto
- if present in the list, or if no value for this property exists.config
- theSimpleAuthenticationDetailsProvider
will be used, customized with other configuration properties described here.config-file
- theConfigFileAuthenticationDetailsProvider
will be used, customized with other configuration properties described here.instance-principals
- theInstancePrincipalsAuthenticationDetailsProvider
will be used.resource-principal
- theResourcePrincipalAuthenticationDetailsProvider
will be used.
If there are more than one strategy descriptors defined, the first one that is deemed to be available/suitable will be used and all others will be ignored.
- Returns:
- the list of authentication strategies that will be applied, defaulting to
auto
- See Also:
-
OciAuthenticationDetailsProvider.AuthStrategy
-
configPath
The OCI configuration profile path.This configuration property has an effect only when
config-file
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known asfileConfigIsPresent()
. When it is present, this property must also be present and then the ConfigFileReader.parse(String) method will be passed this value. It is expected to be passed with a valid OCI configuration file path.- Returns:
- the OCI configuration profile path
-
configProfile
The OCI configuration/auth profile name.This configuration property has an effect only when
config-file
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known asfileConfigIsPresent()
. When it is present, this property may also be optionally provided in order to override the default "DEFAULT".- Returns:
- the optional OCI configuration/auth profile name
-
authFingerprint
The OCI authentication fingerprint.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known assimpleConfigIsPresent()
. When it is present, this property must be provided in order to set the API signing key's fingerprint. See SimpleAuthenticationDetailsProvider.getFingerprint() for more details.- Returns:
- the OCI authentication fingerprint
-
authKeyFile
String authKeyFile()The OCI authentication key file.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known assimpleConfigIsPresent()
. When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file must exist in theuser.home
directory. Alternatively, this property can be set using eitherauthPrivateKey()
or usingauthPrivateKeyPath()
.- Returns:
- the OCI authentication key file
-
authPrivateKeyPath
The OCI authentication key file path.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known assimpleConfigIsPresent()
. When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file path is an alternative for usingauthKeyFile()
where the file must exist in theuser.home
directory. Alternatively, this property can be set usingauthPrivateKey()
.- Returns:
- the OCI authentication key file path
-
authPrivateKey
Optional<char[]> authPrivateKey()The OCI authentication private key.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known assimpleConfigIsPresent()
. When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). Alternatively, this property can be set using eitherauthKeyFile()
residing in theuser.home
directory, or usingauthPrivateKeyPath()
.- Returns:
- the OCI authentication private key
-
authPassphrase
Optional<char[]> authPassphrase()The OCI authentication passphrase.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known assimpleConfigIsPresent()
. When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().- Returns:
- the OCI authentication passphrase
-
authRegion
The OCI region.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known assimpleConfigIsPresent()
. When it is present, either this property orRegionProvider
must be provide a value in order to set the ConfigFileAuthenticationDetailsProvider.getRegion().- Returns:
- the OCI region
-
authTenantId
The OCI tenant id.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. This is also known assimpleConfigIsPresent()
. When it is present, this property must be provided in order to set the ConfigFileAuthenticationDetailsProvider.getTenantId().- Returns:
- the OCI tenant id
-
authUserId
The OCI user id.This configuration property has an effect only when
config
is, explicitly or implicitly, present in the value for theauthStrategies()
. When it is present, this property must be provided in order to set the ConfigFileAuthenticationDetailsProvider.getUserId().- Returns:
- the OCI user id
-
imdsHostName
String imdsHostName()The OCI IMDS hostname.This configuration property is used to identify the metadata service url.
- Returns:
- the OCI IMDS hostname
-
imdsTimeout
Duration imdsTimeout()The OCI IMDS connection timeout. This is used to auto-detect availability.This configuration property is used when attempting to connect to the metadata service.
- Returns:
- the OCI IMDS connection timeout
-
potentialAuthStrategies
The list ofOciAuthenticationDetailsProvider.AuthStrategy
names (excludingOciAuthenticationDetailsProvider.AuthStrategy.AUTO
) that are potentially applicable for use. Here, "potentially applicable for use" means that it is set using theauthStrategy()
attribute on this config bean. If not present then the fall-back looks to use the values explicitly or implicitly set byauthStrategies()
. Note that the order of this list is important as it pertains to the search/strategy ordering.- Returns:
- the list of potential auth strategies that are applicable
-
fileConfigIsPresent
default boolean fileConfigIsPresent()Determines whether sufficient configuration is present on this bean to be used for OCI's "file-based" authentication provider. This matches to theOciAuthenticationDetailsProvider.AuthStrategy.CONFIG_FILE
.- Returns:
- true if there is sufficient attributes defined for file-based OCI authentication provider applicability
- See Also:
-
OciAuthenticationDetailsProvider
ConfigFileAuthenticationDetailsProvider
-
simpleConfigIsPresent
default boolean simpleConfigIsPresent()Determines whether sufficient configuration is present on this bean to be used for OCI's "simple" authentication provider. This matches to theOciAuthenticationDetailsProvider.AuthStrategy.CONFIG
.- Returns:
- true if there is sufficient attributes defined for simple OCI authentication provider applicability
- See Also:
-
OciAuthenticationDetailsProvider
-