Add a Rotated Secret to a Role

Access roles provide clients with permission to work with secrets. When you add a secret to a role, you can specify exactly which CRUD operations clients can perform with that secret.

📘

The role to which a rotated secret is added must have read, list, and update permissions.

Let’s add a rotated secret to a role using the Akeyless CLI. If you’d prefer, see how to do this from the Add a Rotated Secret to a Role instead.

Add a Rotated Secret to a Role from the CLI

The CLI command to add a secret to a role is:

$ akeyless set-role-rule \
        --role-name <role name> \
        --path <secret name with path> \
        --capability <read|create|update|delete|list|deny> \
        --rule-type item-rule

The output is:

The requested rule was successfully set to the role <role name>

Add a Rotated Secret to a Role from the Akeyless Console

  1. From the menu on the left, select Access Roles, then select the role to which you want to add the rotated secret.

  2. In the role details, select the Secrets & Keys tab, and select Add.

  3. Type the name and path to the rotated secret, and select the read, list, and update permissions.

  1. Select Add to save your changes.

Did this page help you?