You can create a rotated secret for a Docker Hub, that will rotate personal access tokens.
Before you get started, make sure you have created a Docker Hub Target.
Let’s create a Docker Hub Rotated secret using the Akeyless CLI. If you’d prefer, you can do this directly from our web console:
The CLI command to create a Docker Hub Rotated secret is:
akeyless create-rotated-secret --name <secret name> \ --target-name <target name to associate> \ --rotator-type target --auto-rotate <true|false> \ --rotation-interval <1-365> \ --rotation-hour <hour in UTC>
name: A unique name for the rotated 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.
target-name: The name of the Docker Hub target with which the rotated secret should be associated.
rotator-type: Must be set to target.
auto-rotate: Optional, only required when the rotated secret should update the credentials. If this value is defined as true, specify the rotation interval in days, and optionally also the rotation hour.
Rotating the target secret (i.e changing your Docker Hub password) will invalidate all existing personal access tokens.
Updated 3 months ago