Interface CredentialProvider

All Superinterfaces:
AutoCloseable, Closeable

public interface CredentialProvider extends Closeable
Interface for credential providers.

A credential provider is responsible for managing and retrieving credentials.

  • Method Details

    • initialize

      void initialize(Map<String,String> properties)
      Initializes the credential provider with catalog properties.
      Parameters:
      properties - catalog properties that can be used to configure the provider. The specific properties required vary by implementation.
    • credentialType

      String credentialType()
      Returns the type of credential, it should be identical in Gravitino.
      Returns:
      A string identifying the type of credentials.
    • getCredential

      @Nullable Credential getCredential(CredentialContext context)
      Obtains a credential based on the provided context information.
      Parameters:
      context - A context object providing necessary information for retrieving credentials.
      Returns:
      A Credential object containing the authentication information needed to access a system or resource. Null will be returned if no credential is available.