Manage the master password
Read the generated master password from Secrets, and rotate it.
The master password is generated at creation and filed in Secrets; you never type it anywhere. Replace ewdb-0123456789ab with your database's id.
Prerequisites
- To read it:
secrets:GetSecretValueon the database's master secret (andrds:DescribeDBInstances). Without it the console shows Reveal disabled with "The password is not shown to you." - To rotate it:
rds:ModifyDBInstance. The database must be available; in any other status the rotation is refused with409"A database in status "…" cannot be changed".
Read the master password
- Open the database, then choose the Connection tab.
- Under Master password, choose Reveal. The password appears with a copy button, and the connection strings above it carry it when copied. Choose Hide to hide it again.
If the section says "Not filed in Secrets", the secret has been deleted (or the database predates it): rotate the password to file a new one.
dcloud rds instances get ewdb-0123456789ab
dcloud secrets secrets get-value master-secret-idmasterSecretId in the first command's output is the secret to read.
Read masterSecretId from the database, then the secret's value:
GET /secrets/api/secrets/{masterSecretId}/valuedcloud_db_instance exports master_secret_id, the secret holding the password.
Reading a secret value is recorded in the audit log.
Rotate the master password
- On the Connection tab, under Master password, choose Rotate master password.
- In Rotate the master password?, choose Rotate. The tab shows "Rotated. Version n is current in Secrets."
dcloud rds instances rotate-master-password ewdb-0123456789abPOST /rds/api/instances/ewdb-0123456789ab/master-password/rotateNot available in Terraform. Rotation is an action, not configuration.
Result
A new password is generated, filed in Secrets as the next version, and set on the database role;
the response carries secretId and version. Clients using the old password are refused from
that moment; the pooler keeps working. Apps bound to the database with the master credential are
redeployed with the new password, and the Activity tab records "Redeploying n app(s) bound with
the master credential".
If the database refuses the new password, the rotation fails with 502 "The database refused the
new password: …", the previous version stays current in Secrets, and nothing changes for clients.
With no enabled encryption key to file it under, it is refused with 409 "No enabled encryption
key to file the new password under".
A password changed by hand with ALTER ROLE is not visible to the platform: the copy in Secrets
stays the old one until the next rotation through the API.
Related
- Create a login instead of sharing the master password.
POST /rds/api/instances/{id}/master-password/rotate·dcloud rds instances rotate-master-password