ALTER SERVICE ACCOUNT DROP TOKEN reference
Enterprise:
RBAC provides fine-grained database permissions management.
ALTER SERVICE ACCOUNT ... DROP TOKEN removes a JSON Web Key or a REST API
token from a service account.
Syntax
ALTER SERVICE ACCOUNT serviceAccountName DROP TOKEN TYPE
{ JWK | REST [token] };
Description
ALTER SERVICE ACCOUNT serviceAccountName DROP TOKEN TYPE JWKremoves the JSON Web Key from the service account.ALTER SERVICE ACCOUNT serviceAccountName DROP TOKEN TYPE REST tokenremoves that REST token from the service account.ALTER SERVICE ACCOUNT serviceAccountName DROP TOKEN TYPE RESTwith no token removes all of the service account's REST tokens.
Examples
Remove the JSON Web Key
ALTER SERVICE ACCOUNT client_app DROP TOKEN TYPE JWK;
Remove REST API tokens
-- drop a single REST API token
ALTER SERVICE ACCOUNT client_app DROP TOKEN TYPE REST 'qt1cNK6s2t79f76GmTBN9k7XTWm5wwOtF7C0UBxiHGPn44';
-- drop all REST API tokens for the given service account
ALTER SERVICE ACCOUNT client_app DROP TOKEN TYPE REST;
Verify with:
SHOW SERVICE ACCOUNT client_app;
| auth_type | enabled |
|---|---|
| Password | true |
| JWK Token | false |
| REST Token | false |