Disable a service account credential
You can disable individual credentials without affecting the service account or its other credentials.
Before you begin
- A service account exists with at least one credential.
- You have the
service_account:disablepermission to disable a credential, or theservice_account:enablepermission to re-enable one. Project administrators have both permissions. - You know the service account ID and the credential ID. To find these values, list the credentials for the service account:
$ curl -H "Authorization: Bearer access_token" \ https://orchestrator_host/api/v1/service_accounts/service_account_id/credentials
About this task
Use this option when you need to revoke a specific credential, such as one that was exposed in a log file, while keeping the service account operational with its remaining credentials.
Procedure
Results
When you disable a credential:
- Authentication attempts with that credential's client ID and secret are rejected.
- Existing tokens issued by the disabled credential are immediately rejected.
- Other credentials for the same service account are not affected.
- The service account can still authenticate with its remaining active credentials.
Re-enable a disabled service account credential
You can re-enable a disabled credential to restore its ability to authenticate.
Before you begin
- A service account exists in the target project with at least one credential that has a status of
disabled. - You have the
service_account:enablepermission, or you are a project administrator.