π‘οΈ AWS Secrets Manager Secret Automatic Rotation is not enabledπ’
- Contextual name: π‘οΈ Secret Automatic Rotation is not enabledπ’
- ID:
/ce/ca/aws/secrets-manager/secret-automatic-rotation - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
Descriptionβ
Descriptionβ
Static, long-lived credentials pose a significant security risk if compromised. Enabling automatic rotation limits credential lifespan, reducing the window of opportunity for unauthorized access. Implementing this policy helps automate credential lifecycle management, strengthens your overall security posture, and minimizes the operational burden associated with manual secret rotation.
Rationaleβ
Long-lived, static credentials increase the risk of unauthorized access if they are compromised. Automatic rotation limits the lifespan of a credential, significantly reducing the window of opportunity for an attacker to use it. By enforcing this policy, you can automate a crucial part of your credential lifecycle management, improve your security posture, and reduce the operational overhead of manual rotation.
Auditβ
This policy flags an AWS Secrets Manager Secret as
INCOMPLIANTif theRotation Enabledcheckbox is set to false.
Remediationβ
Remediationβ
Stepsβ
- Write the rotation function code.
- Create a Lambda function using that code.
- Set up appropriate network access and permissions.
- Configure the secret for rotation.
Prerequisite (Database Secrets Only): Choose a Rotation Strategyβ
AWS Secrets Manager supports two rotation strategies:
Option 1: Single User Strategy
- Use a single user for rotation. You can proceed directly to Step 1.
Option 2: Alternating Users Strategy
- Create a separate secret containing superuser credentials.
- Add the ARN of the superuser secret to the original secretβs JSON structure.
- Note: Amazon RDS Proxy does not support the alternating users strategy.
For more information, see Lambda Function Rotation Strategies.
Step 1: Write the Rotation Function Codeβ
A rotation function is an AWS Lambda function that Secrets Manager invokes to rotate your secret.
AWS provides pre-built templates for Amazon RDS, Amazon Aurora, Amazon Redshift, and Amazon DocumentDB in Rotation function templates.
... see more