Skip to main content
MysteryBox has been renamed to SecretStash. In CLI commands, SDK imports and role IDs, use secretstash instead of mysterybox.
You can create an empty secret and add versions whenever you need them, or you can create a secret together with a version immediately.

Prerequisites

Creating a secret or a version of a secret does not automatically grant you access to view payloads in that secret or version. The editor role is enough to create a secret or a version, but viewing payloads requires the secretstash.payload-viewer role, which is a sub-role of admin but not editor.

How to create a secret without a version

You can create a secret without a version by using the CLI or an SDK. If you want to use the web console, follow How to create a secret with a version.
Run the following command:
In the command, specify the following values:
  • name: Name of the secret.
  • description (optional): Secret description.
After the secret is created, you can refer to it by its name or ID, and create versions of the secret.

How to create a secret with a version

You can specify one or several key-value pairs in the version payload. Every pair contains a string value or binary data.
  1. In the web console, go to  Cryptography → SecretStash.
  2. Click  Create secret.
  3. In the window that opens, specify a unique name for the secret. For example, db-credentials.
  4. (Optional) Add a description that explains what the secret is used for. For example, “Credentials for the production database.”
  5. In the Key and Value fields, specify a key-value pair that the secret should store. This pair will be the payload of this secret. In the Value field, select a data type:
    • Text: Specify a plain string. Commonly used for passwords, tokens and API keys.
    • File: Upload a binary file. Convenient for certificates, private keys and configuration files.
  6. (Optional) To store multiple key-value pairs in a single version, click  Add pair. Then, specify additional key-value pairs.
  7. Click Create secret.
After the secret is created, you can refer to it by its name or ID.