mc admin accesskey sts-revoke
The mc admin accesskey sts-revoke command removes security token service (sts) credentials associated with an account.
Revoke all STS tokens for an account, or specify the type(s) of STS tokens to revoke for an account.
Syntax
The following command removes all STS access tokens for account user1 from the myaistor deployment:
mc admin accesskey sts-revoke myaistor user1 --allThe command has the following syntax:
mc [GLOBALFLAGS] admin accesskey sts-revoke \
ALIAS \
USER | --self \
--all | --token-type value - Brackets
[]indicate optional parameters. - Parameters sharing a line are mutually dependent.
- Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
ALIAS
Required
The alias of the MinIO AIStor deployment.
USER
Required, unless using the --self flag.
The MinIO AIStor user whose STS tokens you wish to remove.
Mutually exclusive with the --self flag.
--self
Required, unless specifying a USER.
You must specify a USER or use the --self flag.
Remove STS tokens for the currently authenticated MinIO AIStor user.
Mutually exclusive with specifying a USER.
--all
Required, unless specifying a --token-type.
Remove all STS tokens for the user.
Mutually exclusive with --token-type.
--token-type
Required, unless using the --all flag.
Specify a revoke type to restrict the revoked STS tokens to only those with the assigned RevokeTokenType.
Assign a revoke type to an STS token at time of creation by adding the RevokeTokenType query parameter during the generating API call.
All tokens matching the type are revoked.
Mutually exclusive with --all.
Global Flags
This command supports any of the global flags.
Examples
Revoke STS tokens of type app-1 for user bob
The following command revokes all STS tokens with the RevokeTokenType of app-1 for the user bob on the MinIO AIStor deployment with alias of myaistor.
mc admin accesskey sts-revoke myaistor bob --token-type app-1Revoke all STS tokens for the authenticated user
The following command revokes all STS tokens for the user authenticated to alias myaistor.
mc admin accesskey sts-revoke myaistor --self --allRevoke STS tokens of type app-trial for the authenticated user
The following command revokes all STS tokens with the RevokeTokenType of app-trial for the authenticated user on the MinIO AIStor deployment with alias of myaistor.
mc admin accesskey sts-revoke myaistor --self --token-type app-trialBehavior
S3 compatibility
This command uses a MinIO AIStor administrative API and does not work against other S3-compatible services.
Version required
This command is available in AIStor Client RELEASE.2025-03-31T22-38-30Z or later.
The functionality requires MinIO AIStor RELEASE.2025-03-27T23-09-45Z or later.