nsc token revoke
Revoke a token to immediately disable its access.
nsc token revoke
immediately revokes a token, preventing it from being used for further authentication. Once revoked, a token cannot be reactivated and any attempts to use it will fail.
Revoking tokens is important for security best practices, especially when:
- A token is no longer needed
- A token may have been compromised
- Access needs to be removed immediately
- Rotating credentials as part of regular security maintenance
Usage
nsc token revoke --token_id string
Examples
Revoke a specific token:
$ nsc token revoke --token_id tok_abc123xyz
Revoke after listing tokens:
# First, list tokens to find the ID
$ nsc token list
# Then revoke the specific token
$ nsc token revoke --token_id tok_abc123xyz
Required Flags
--token_id string
The token ID to revoke. You can find token IDs by running nsc token list
.
Example:
$ nsc token revoke --token_id tok_abc123xyz
Behavior
- Immediate effect: Revocation takes effect immediately. Any in-flight requests using the token may complete, but new requests will fail.
- Irreversible: Once revoked, a token cannot be reactivated. You must create a new token if access is needed again.
- Audit trail: Token revocations are logged for security auditing purposes.
Related Topics
- nsc token create - Create new tokens
- nsc token list - List existing tokens
- Security - Security best practices and audit logging