Ensure that all your IAM SSH public keys are rotated every month in order to decrease the likelihood of accidental exposures and protect your AWS CodeCommit repositories against unauthorized access.
This rule can help you with the following compliance standards:
- APRA
- MAS
- NIST4
For further details on compliance standards supported by Conformity, see here.
This rule can help you work with the AWS Well-Architected Framework.
This rule resolution is part of the Conformity Security & Compliance tool for AWS.
Rotating periodically the SSH keys assigned to your IAM users will significantly reduce the chances that a compromised set of keys can be used without your knowledge to access your private Git repositories hosted with AWS CodeCommit.
Audit
To determine if your AWS IAM users hold any outdated (older than 30 days) SSH public keys, perform the following:
Remediation / Resolution
To rotate (change) your outdated IAM SSH public keys, you need to perform the following:
References
- AWS Documentation
- AWS IAM FAQs
- Using SSH Keys with AWS CodeCommit
- Setup Steps for SSH Connections to AWS CodeCommit Repositories on Linux, OS X, or Unix
- Setup Steps for SSH Connections to AWS CodeCommit Repositories on Windows
- AWS Command Line Interface (CLI) Documentation
- iam
- list-users
- list-ssh-public-keys
- upload-ssh-public-key
- delete-ssh-public-key