Skip to content

The focus of this project is on the programmatic "rolling" of AWS IAM access keys. This involves creating new keys to replace previous ones, on a regular basis. This process shortens the period an access key is active and therefore reduces the business impact if one becomes compromised.

Notifications You must be signed in to change notification settings

overfl0wd/iam-key-rotator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

IAM Key Rolling

The focus of this project is on the programmatic "rolling" of AWS IAM access keys. This involves creating new keys to replace previous ones, on a regular basis. Changing the keys will limit exposure, and storing them in AWS Secrets Manager will allow them to be programmatically queried and used as-needed, rather than stored locally in clear.

At this stage, this script is intended to be a framework for this process. Any other requirements (application functionality validation) are going to be use-case-specific, thus are not covered here. There are just too many services and permissions to feasibly cover every scenario. The problem it will solve is that users in my organization store their access keys locally for long periods of time.

This script follows the procedure suggested in the AWS Security Blog.

This script currently follows the following work flow:
  • Get the existing key-pair for a user.
  • Create a new key-pair.
  • Store the new access and secret key in Secrets Manager.
  • Disable the previous key-pair.
  • Delete the previous key-pair.

Next Steps:

  • Handle if the user has more than one key-pair to be rolled.
  • Query the newly created secret in Secrets Manager to make sure it was saved correctly, and is a functional access key.

Requirements

About

The focus of this project is on the programmatic "rolling" of AWS IAM access keys. This involves creating new keys to replace previous ones, on a regular basis. This process shortens the period an access key is active and therefore reduces the business impact if one becomes compromised.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages