Create a Static Secret

When you create a static secret, you need to name it and provide the secret value. All secret values are encrypted using patented Akeyless Distributed Fragment Cryptography™ (DFC) technology.

Create a Static Secret from the Akeyless CLI

Let’s create a static secret using the Akeyless CLI. If you’d prefer, see how to do this from the Akeyless Console instead.

The CLI command to create a static secret is:

akeyless create-secret --name <secret name> --value <secret value>

where:

  • name: A unique name for the secret. The name can include the path to the virtual folder in which you want to create the new secret, using slash / separators. If the folder does not exist, it will be created together with the secret.

  • value: The value of the secret. The value length should be 16KB.

For example, to create a secret in the Admin folder called AdminCredentials with the value Admin101!, type:

akeyless create-secret --name /Admin/AdminCredentials --value Admin101!

The response should be like this:

$ A new secret named /Admin/AdminCredentials was successfully created

👍

Tip

For details about these CLI command options, see the CLI Command Reference.

Next, assign the static secret to an access role that defines who can access the secret value, and with what permissions. For details, see Add a Static Secret to an Access Role.

Create a Static Secret from the Akeyless Console

Let’s create a static secret using the Akeyless Console. If you’d prefer, see how to do this from the Akeyless CLI instead.

  1. Log in to the Akeyless Console and go to Secrets & Keys > New > Static Secret.

  2. Define a Name for the secret, and optionally specify the Location as a path to the virtual folder in which you want to create the new secret, using slash / separators. If the folder does not exist, it will be created together with the secret.

  3. Define the remaining parameters as follows:

    • Description: Optional, enter a description of the secret.

    • Tags: Optional, select one or more tags for the secret, or enter the name of a new tag to be added as part of the secret creation.

    • Protection Key: Select the encryption key with which to encrypt the secret (if your system includes multiple encryption keys). Otherwise, select Default.

    • Value: Enter the value of the secret. The value length should be 16KB.

  4. Select Save.


What’s Next

Assign the Static Secret to an Access Role that defines who can access the secret, and with what kind of permissions.

Did this page help you?