Rotate credentials for an identity on a specific target
Parameters
Identity ID (UUID)
Request body application/json · RotateCredentialsRequest
Rotation request
Rotate credentials for a specific adopted target-local account on the target.
Confirms password reset for an external adopted database role.
Responses
Rotation completed
The caller's roles do not grant the permission of the operation
Principal can't prove that an account on the target is the instance it created or adopted (target.account_identity_mismatch or target.account_identity_unverified), so it left that account alone. For Kubernetes, a legacy token Secret was created again under the same name while it was revoked: the new kubeconfig is stored, the Secret stays and shows in the kubernetes_tokens preflight section. Remove it on the target, then rotate again. policy.target_service_account_incomplete: the last check of the MariaDB target's service account found privileges missing (details.missing_privileges, details.recommended_sql). Nothing was rotated. rotation.account_missing: the database account is not on the target, so there is no password to change and nothing changed. details.account_ownership principal_created: applying the rule (resources, relation recreates_account) creates it again with the saved password. Adopted: Principal never creates it again.
The credentials can't be rotated: the credential type doesn't support it, or the Kubernetes cluster does not issue ServiceAccount tokens through the TokenRequest API (details.error_code kubernetes_token_request_unavailable). Nothing was revoked. The current credentials keep working.
Principal could not reach the target or another service the rotation needs (upstream.connection_failed), or the connection broke while the database password was changing. details.rotation_outcome says what a database rotation left: not_started (on any failure status) means nothing changed and the current password still works. Previous_confirmed (rotation.interrupted) means the change was cut off and didn't take effect (the target's record of the change or a sign-in with the current password shows it), so the password is the same as before. Not_confirmed (rotation.not_confirmed) means Principal can't tell yet which password the target accepts and keeps both (the credential shows rotation_state not_confirmed). A failure without details.rotation_outcome promises nothing about the password.
Common errors: 400 401 404 413 429 503 504. They mean the same for every operation, see Errors.