Class OciConfig.BuilderBase.OciConfigImpl

java.lang.Object
io.helidon.integrations.oci.sdk.runtime.OciConfig.BuilderBase.OciConfigImpl
All Implemented Interfaces:
Prototype.Api, OciConfig
Enclosing class:
OciConfig.BuilderBase<BUILDER extends OciConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OciConfig>

protected static class OciConfig.BuilderBase.OciConfigImpl extends Object implements OciConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Field Details

    • CONFIG_KEY

      static final String CONFIG_KEY
      Deprecated, for removal: This API element is subject to removal in a future version.
      Config key of this config.
      See Also:
    • IMDS_HOSTNAME

      static final String IMDS_HOSTNAME
      Deprecated, for removal: This API element is subject to removal in a future version.
      Primary hostname of metadata service.
      See Also:
    • DEFAULT_PROFILE_NAME

      static final String DEFAULT_PROFILE_NAME
      Deprecated, for removal: This API element is subject to removal in a future version.
      Redefine the constant, as it is private in BMC.
      See Also:
  • Constructor Details

    • OciConfigImpl

      protected OciConfigImpl(OciConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • authStrategy

      public Optional<String> authStrategy()
      Description copied from interface: OciConfig
      The singular authentication strategy to apply. This will be preferred over OciConfig.authStrategies() if both are present.
      Specified by:
      authStrategy in interface OciConfig
      Returns:
      the singular authentication strategy to be applied
    • authStrategies

      public List<String> authStrategies()
      Description copied from interface: OciConfig
      The list of authentication strategies that will be attempted by AbstractAuthenticationDetailsProvider when one is called for. This is only used if OciConfig.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.

      Specified by:
      authStrategies in interface OciConfig
      Returns:
      the list of authentication strategies that will be applied, defaulting to auto
      See Also:
      • OciAuthenticationDetailsProvider.AuthStrategy
    • configPath

      public Optional<String> configPath()
      Description copied from interface: OciConfig
      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 OciConfig.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.

      Specified by:
      configPath in interface OciConfig
      Returns:
      the OCI configuration profile path
    • configProfile

      public Optional<String> configProfile()
      Description copied from interface: OciConfig
      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 OciConfig.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".

      Specified by:
      configProfile in interface OciConfig
      Returns:
      the optional OCI configuration/auth profile name
    • authFingerprint

      public Optional<String> authFingerprint()
      Description copied from interface: OciConfig
      The OCI authentication fingerprint.

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

      Specified by:
      authFingerprint in interface OciConfig
      Returns:
      the OCI authentication fingerprint
    • authKeyFile

      public String authKeyFile()
      Description copied from interface: OciConfig
      The OCI authentication key file.

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

      Specified by:
      authKeyFile in interface OciConfig
      Returns:
      the OCI authentication key file
    • authPrivateKeyPath

      public Optional<String> authPrivateKeyPath()
      Description copied from interface: OciConfig
      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 OciConfig.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 OciConfig.authKeyFile() where the file must exist in the user.home directory. Alternatively, this property can be set using OciConfig.authPrivateKey().

      Specified by:
      authPrivateKeyPath in interface OciConfig
      Returns:
      the OCI authentication key file path
    • authPrivateKey

      public Optional<char[]> authPrivateKey()
      Description copied from interface: OciConfig
      The OCI authentication private key.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the OciConfig.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 OciConfig.authKeyFile() residing in the user.home directory, or using OciConfig.authPrivateKeyPath().

      Specified by:
      authPrivateKey in interface OciConfig
      Returns:
      the OCI authentication private key
    • authPassphrase

      public Optional<char[]> authPassphrase()
      Description copied from interface: OciConfig
      The OCI authentication passphrase.

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

      Specified by:
      authPassphrase in interface OciConfig
      Returns:
      the OCI authentication passphrase
    • authRegion

      public Optional<String> authRegion()
      Description copied from interface: OciConfig
      The OCI region.

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

      Specified by:
      authRegion in interface OciConfig
      Returns:
      the OCI region
    • authTenantId

      public Optional<String> authTenantId()
      Description copied from interface: OciConfig
      The OCI tenant id.

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

      Specified by:
      authTenantId in interface OciConfig
      Returns:
      the OCI tenant id
    • authUserId

      public Optional<String> authUserId()
      Description copied from interface: OciConfig
      The OCI user id.

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

      Specified by:
      authUserId in interface OciConfig
      Returns:
      the OCI user id
    • imdsHostName

      public String imdsHostName()
      Description copied from interface: OciConfig
      The OCI IMDS hostname.

      This configuration property is used to identify the metadata service url.

      Specified by:
      imdsHostName in interface OciConfig
      Returns:
      the OCI IMDS hostname
    • imdsTimeout

      public Duration imdsTimeout()
      Description copied from interface: OciConfig
      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.

      Specified by:
      imdsTimeout in interface OciConfig
      Returns:
      the OCI IMDS connection timeout
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • potentialAuthStrategies

      default List<String> potentialAuthStrategies()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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