All Known Implementing Classes:
OciConfig.BuilderBase.OciConfigImpl

public interface OciConfig
Configuration used by OciAuthenticationDetailsProvider.
See Also:
  • Field Details

  • Method Details

    • builder

      static OciConfig.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static OciConfig.Builder builder(OciConfig instance)
      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

      static OciConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static OciConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • authStrategy

      Optional<String> authStrategy()
      The singular authentication strategy to apply. This will be preferred over authStrategies() if both are present.
      Returns:
      the singular authentication strategy to be applied
    • authStrategies

      List<String> authStrategies()
      The list of authentication strategies that will be attempted by AbstractAuthenticationDetailsProvider when one is called for. This is only used if authStrategy() is not present.
      • auto - if present in the list, or if no value for this property exists.
      • config - the SimpleAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • config-file - the ConfigFileAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • instance-principals - the InstancePrincipalsAuthenticationDetailsProvider will be used.
      • resource-principal - the ResourcePrincipalAuthenticationDetailsProvider 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

      Optional<String> 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 the authStrategies(). This is also known as fileConfigIsPresent(). 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

      Optional<String> 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 the authStrategies(). This is also known as fileConfigIsPresent(). 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

      Optional<String> authFingerprint()
      The OCI authentication fingerprint.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). 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 the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file must exist in the user.home directory. Alternatively, this property can be set using either authPrivateKey() or using authPrivateKeyPath().

      Returns:
      the OCI authentication key file
    • authPrivateKeyPath

      Optional<String> 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 the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file path is an alternative for using authKeyFile() where the file must exist in the user.home directory. Alternatively, this property can be set using authPrivateKey().

      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 the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). Alternatively, this property can be set using either authKeyFile() residing in the user.home directory, or using authPrivateKeyPath().

      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 the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().

      Returns:
      the OCI authentication passphrase
    • authRegion

      Optional<String> authRegion()
      The OCI region.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, either this property or RegionProvider must be provide a value in order to set the ConfigFileAuthenticationDetailsProvider.getRegion().

      Returns:
      the OCI region
    • authTenantId

      Optional<String> authTenantId()
      The OCI tenant id.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the ConfigFileAuthenticationDetailsProvider.getTenantId().

      Returns:
      the OCI tenant id
    • authUserId

      Optional<String> authUserId()
      The OCI user id.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). 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

      default List<String> potentialAuthStrategies()
      The list of OciAuthenticationDetailsProvider.AuthStrategy names (excluding OciAuthenticationDetailsProvider.AuthStrategy.AUTO) that are potentially applicable for use. Here, "potentially applicable for use" means that it is set using the authStrategy() attribute on this config bean. If not present then the fall-back looks to use the values explicitly or implicitly set by authStrategies(). 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 the OciAuthenticationDetailsProvider.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 the OciAuthenticationDetailsProvider.AuthStrategy.CONFIG.
      Returns:
      true if there is sufficient attributes defined for simple OCI authentication provider applicability
      See Also:
      • OciAuthenticationDetailsProvider