Let’s Get Certified
Module 14 / 17 · Data protection

Manage secrets and encryption material through rotation

A database password was rotated in storage, but new application connections fail. The service retries using a cached value. Which parts of the rotation should the operator verify?

Manage secrets and encryption material through rotation

Rotate secrets, distinguish imported key material from provider-generated material, mask sensitive log fields and handle regional keys.

Work through the decision

A database password was rotated in storage, but new application connections fail. The service retries using a cached value. Which parts of the rotation should the operator verify?

Check your reasoning

Check the pending version, the change at the database, the validation step and promotion of the current version. Confirm the application refreshes its cached secret. Rotating a KMS backing key is a different operation and does not change a database password.

Cert Espresso · 2:50:32

Interpret the evidence

Secrets Manager rotation
Coordinates updating a secret and its target. A successful rotation includes verifying the pending credential before promotion.
Imported key material
The customer supplies cryptographic material to KMS and must plan for expiration and reimport when applicable.
Multi-Region KMS keys
Related regional keys share key ID and material, while each Region has its own policy and operational configuration.
Log data protection policy
Can identify and mask supported sensitive fields for viewers without unmask permission. Protect the original log and restrict privileged access.

Practice the guide skills

  1. Trace the pending and current versions of a rotating database secret. Check database update, validation, version promotion and application cache refresh. Watch 2:50:32
  2. For imported key material, schedule expiry monitoring and a tested reimport procedure. Document who keeps the original material available. Watch 2:52:04
  3. Compare AWS-generated, imported and externally held key material by custody, availability dependency and recovery responsibility. Watch 2:53:20
  4. Identify a sensitive field in a sample application log. Prefer minimizing collection, then choose masking and strict access for the remaining original records. Watch 2:54:01
  5. For a regional failover, list the local KMS replica policy, application endpoint and required regional certificates. Verify each component in the recovery Region. Watch 2:55:53

Official objectives for this lesson

Read credential rotation state

A test rotation records the following state before a service begins receiving login failures.

Target database accepts       pending version v4
Secret labeled AWSCURRENT     v3
Application cache             v3

Verify the pending version through the intended database path, finish or reconcile the rotation according to the runbook and refresh client credentials. An unrelated KMS key rotation will not align the database password and the secret version.

Related lesson · Apply and verify data protection controls

Knowledge check

Manage secrets and encryption material through rotation quiz

Answer 3 questions. Check each answer for an explanation.