Class EnvVarSecretsStoreConnector

All Implemented Interfaces:
AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension

public class EnvVarSecretsStoreConnector extends SecretsStoreConnector
EnvVarSecretsStoreConnector retrieves secrets from environment variables. Each secret is named for its environment variable.
  • Constructor Details

    • EnvVarSecretsStoreConnector

      public EnvVarSecretsStoreConnector()
  • Method Details

    • refreshSecrets

      protected void refreshSecrets()
      Request that the subclass refreshes its secrets.
      Specified by:
      refreshSecrets in class SecretsStoreConnector
    • getSecret

      public String getSecret(String secretName)
      Retrieve a secret from the secrets store.
      Specified by:
      getSecret in class SecretsStoreConnector
      Parameters:
      secretName - name of the secret.
      Returns:
      secret
    • getSecret

      public String getSecret(String secretsCollectionName, String secretName)
      Retrieve a secret from the secrets store.
      Specified by:
      getSecret in class SecretsStoreConnector
      Parameters:
      secretsCollectionName - name of collection
      secretName - name of the secret.
      Returns:
      secret
    • getUsers

      public Map<String,UserAccount> getUsers()
      Retrieve any user definitions stored in the secrets collection.
      Specified by:
      getUsers in class SecretsStoreConnector
      Returns:
      map of userIds to user details
    • getUser

      public UserAccount getUser(String userId)
      Retrieve the requested user definitions stored in the secrets collection.
      Specified by:
      getUser in class SecretsStoreConnector
      Parameters:
      userId - userId for the lookup
      Returns:
      associated user details or null
    • getRefreshTimeInterval

      public long getRefreshTimeInterval()
      Retrieve the refresh time from the secrets store.
      Specified by:
      getRefreshTimeInterval in class SecretsStoreConnector
      Returns:
      how long the secrets can be cached - 0 means indefinitely