Ensure that all your IAM SSH public keys are rotated every 45 days in order to decrease the likelihood of accidental exposures and protect your AWS CodeCommit repositories from unauthorized access.
This rule can help you with the following compliance standards:
- APRA
- MAS
- NIST 800-53 (Rev. 4)
This rule can help you work with the AWS Well-Architected Framework
This rule resolution is part of the Cloud 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 repositories hosted with AWS CodeCommit.
Audit
To determine if your AWS IAM users keep any outdated (older than 45 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
Unlock the Remediation Steps
Gain free unlimited access
to our full Knowledge Base
Over 750 rules & best practices
for and
Get started for FREE
You are auditing:
SSH Public Keys Rotated 45 Days
Risk level: Medium