Interface OciConfig

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
OciConfig.BuilderBase.OciConfigImpl

public interface OciConfig extends Prototype.Api
Meta configuration of OCI integration for Helidon.

Allows customization of discovery of authentication details provider and of region.

See Also:
  • Field Details

    • AUTHENTICATION_METHOD_AUTO

      static final String AUTHENTICATION_METHOD_AUTO
      Default authentication method. The default is to use automatic discovery - i.e. cycle through possible providers until one yields an authentication details provider instance.
      See Also:
  • 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
    • region

      Optional<com.oracle.bmc.Region> region()
      Explicit region. The configured region will be used by region provider. This may be ignored by authentication detail providers, as in most cases region is provided by them.
      Returns:
      explicit region
    • authenticationMethod

      String authenticationMethod()
      Authentication method to use. If the configured method is not available, an exception would be thrown for OCI related services.

      Known and supported authentication strategies for public OCI:

      • "auto" - use the list of OciConfigBlueprint.allowedAuthenticationMethods() (in the provided order), and choose the first one capable of providing data
      • "config" - use configuration of the application to obtain values needed to set up connectivity, uses SimpleAuthenticationDetailsProvider
      • "config-file" - use configuration file of OCI (home/.oci/config), uses ConfigFileAuthenticationDetailsProvider
      • resource-principal - use identity of the OCI resource the service is executed on (fn), uses ResourcePrincipalAuthenticationDetailsProvider, and is available in a separate module helidon-integrations-oci-authentication-resource
      • instance-principal - use identity of the OCI instance the service is running on, uses InstancePrincipalsAuthenticationDetailsProvider, and is available in a separate module helidon-integrations-oci-authentication-resource
      • workload - use workload identity of the OCI Kubernetes workload, available in a separate module helidon-integrations-oci-authentication-workload
      Returns:
      the authentication method to apply
    • allowedAuthenticationMethods

      List<String> allowedAuthenticationMethods()
      List of attempted authentication strategies in case OciConfigBlueprint.authenticationMethod() is set to "auto".

      In case the list is empty, all available strategies will be tried, ordered by their Weight

      Returns:
      list of authentication strategies to be tried
      See Also:
      • OciConfigBlueprint.authenticationMethod()
    • configMethodConfig

      Optional<ConfigMethodConfig> configMethodConfig()
      Config method configuration (if provided and used).
      Returns:
      information needed for config OciConfigBlueprint.authenticationMethod()
    • configFileMethodConfig

      Optional<ConfigFileMethodConfig> configFileMethodConfig()
      Config file method configuration (if provided and used).
      Returns:
      information to customize config for OciConfigBlueprint.authenticationMethod()
    • sessionTokenMethodConfig

      Optional<SessionTokenMethodConfig> sessionTokenMethodConfig()
      Session token method configuration (if provided and used).
      Returns:
      information to customize config for OciConfigBlueprint.authenticationMethod()
    • 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
    • imdsBaseUri

      Optional<URI> imdsBaseUri()
      The OCI IMDS URI (http URL pointing to the metadata service, if customization needed).
      Returns:
      the OCI IMDS URI
    • imdsDetectRetries

      Optional<Integer> imdsDetectRetries()
      Customize the number of retries to contact IMDS service.
      Returns:
      number of retries, each provider has its own defaults
    • authenticationTimeout

      Duration authenticationTimeout()
      Timeout of authentication operations, where applicable. This is a timeout for each operation (if there are retries, each timeout will be this duration). Defaults to 10 seconds.
      Returns:
      authentication operation timeout
    • federationEndpoint

      Optional<URI> federationEndpoint()
      Customization of federation endpoint for authentication providers.
      Returns:
      custom federation endpoint URI
    • config

      Optional<Config> config()
      Get the config used to update the builder.
      Returns:
      configuration