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 TypeMethodDescriptionvoidRemoves the secret for the given identifier.Retrieves the secret for the given identifier.Retrieves the secrets for the given identifiers.com.atlassian.secrets.api.SecretServiceConfigurationReturns a record describing the current configuration of the SecretService which can be used for analytics within a product.com.atlassian.secrets.api.SecretService.SecretServiceManagementRetrieves the current migration state for the initial upgrade task.voidStores the secret for the given identifier.
-
Method Details
-
put
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
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
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
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
SecretServiceConfigurationrecord
-
getManagement
com.atlassian.secrets.api.SecretService.SecretServiceManagement getManagement()
-