Interface InternalJiraSecretsStorage

All Known Implementing Classes:
DefaultInternalJiraSecretsStorage

@ExperimentalApi public interface InternalJiraSecretsStorage
Allows to securely store and retrieve secrets, either encrypted locally or in an external vault.
Since:
v10.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(String identifier)
    Removes the secret for the given identifier.
    get(String identifier)
    Retrieves the secret for the given identifier.
    get(Set<String> identifiers)
    Retrieves the secrets for the given identifiers.
    com.atlassian.secrets.api.SecretServiceConfiguration
    Returns a record describing the current configuration of the SecretService which can be used for analytics within a product.
    com.atlassian.secrets.api.SecretService.SecretServiceManagement
     
    Retrieves the current migration state for the initial upgrade task.
    void
    put(String identifier, String secret)
    Stores the secret for the given identifier.
  • Method Details

    • put

      void put(String identifier, String secret)
      Stores the secret for the given identifier. If a secret already exists for the given identifier, it will be overwritten.
      Parameters:
      identifier - The identifier for the secret . The maximum size is 255 characters.
      secret - The secret to store.
    • get

      Optional<String> get(String identifier)
      Retrieves the secret for the given identifier.
      Parameters:
      identifier - The identifier for the secret .
      Returns:
      The secret for the given identifier, or Optional.empty() if the secret does not exist.
    • get

      Map<String,Optional<String>> get(Set<String> identifiers)
      Retrieves the secrets for the given identifiers.
      Parameters:
      identifiers - A set of identifiers for the secrets .
      Returns:
      A map where each key is an identifier and each value is the secret if it exists, or Optional.empty() if no secret is found for that identifier.
    • delete

      void delete(String identifier)
      Removes the secret for the given identifier.
      Parameters:
      identifier - The identifier for the secret .
    • getMigrationState

      SecretMigrationState getMigrationState()
      Retrieves the current migration state for the initial upgrade task. See for a detailed description of the possible states. To be removed in Jira 11.0.
      Returns:
      The current migration state of the secrets storage.
    • getConfiguration

      com.atlassian.secrets.api.SecretServiceConfiguration getConfiguration()
      Returns a record describing the current configuration of the SecretService which can be used for analytics within a product.
      Returns:
      An SecretServiceConfiguration record
    • getManagement

      com.atlassian.secrets.api.SecretService.SecretServiceManagement getManagement()