Class DefaultServiceIdentityProvider

java.lang.Object
org.apache.polaris.service.identity.provider.DefaultServiceIdentityProvider
All Implemented Interfaces:
org.apache.polaris.core.identity.provider.ServiceIdentityProvider

@RequestScoped public class DefaultServiceIdentityProvider extends Object implements org.apache.polaris.core.identity.provider.ServiceIdentityProvider
Default implementation of ServiceIdentityProvider that provides service identity credentials from statically configured values.

This implementation loads service identity configurations at startup and uses them to provide identity information and credentials on demand. All resolution is done lazily - credentials are only created when actually needed for authentication.

  • Field Details

  • Constructor Details

    • DefaultServiceIdentityProvider

      public DefaultServiceIdentityProvider()
    • DefaultServiceIdentityProvider

      @Inject public DefaultServiceIdentityProvider(org.apache.polaris.core.context.RealmContext realmContext, ServiceIdentityConfiguration serviceIdentityConfiguration)
  • Method Details

    • allocateServiceIdentity

      public Optional<org.apache.polaris.core.identity.dpo.ServiceIdentityInfoDpo> allocateServiceIdentity(@Nonnull org.apache.polaris.core.admin.model.ConnectionConfigInfo connectionConfig)
      Specified by:
      allocateServiceIdentity in interface org.apache.polaris.core.identity.provider.ServiceIdentityProvider
    • getServiceIdentityInfo

      public Optional<org.apache.polaris.core.admin.model.ServiceIdentityInfo> getServiceIdentityInfo(@Nonnull org.apache.polaris.core.identity.dpo.ServiceIdentityInfoDpo serviceIdentityInfo)
      Specified by:
      getServiceIdentityInfo in interface org.apache.polaris.core.identity.provider.ServiceIdentityProvider
    • getServiceIdentityCredential

      public Optional<org.apache.polaris.core.identity.credential.ServiceIdentityCredential> getServiceIdentityCredential(@Nonnull org.apache.polaris.core.identity.dpo.ServiceIdentityInfoDpo serviceIdentityInfo)
      Specified by:
      getServiceIdentityCredential in interface org.apache.polaris.core.identity.provider.ServiceIdentityProvider
    • getRealmConfig

      public RealmServiceIdentityConfiguration getRealmConfig()
    • buildIdentityInfoReference

      public static org.apache.polaris.core.secrets.SecretReference buildIdentityInfoReference(String realm, org.apache.polaris.core.identity.ServiceIdentityType type)
      Builds a SecretReference for the given realm and service identity type.

      The URN format is: urn:polaris-secret:default-identity-provider:<realm>:<type>

      If the realm is the default realm key, it is replaced with "system:default" in the URN.

      Parameters:
      realm - the realm identifier
      type - the service identity type
      Returns:
      the constructed secret reference for this service identity