Key Report

Overview of keyup’s Key Report and required Identity Access Management (IAM) permissions.


Report Overview

keyup provides a parameter to produce a report for all iam users referenced in the local awscli configuration file. The report shows the expired status of all access keys for these users. This is valuable because it allows the user to understand which iam users require renewed access keys without running keyup for each iam user account individually.

Execute the following command to run the key report for all iam users in the local awscli configuration file:

$ keyup --key-report
'sample key report'

Back to Key Report Contents


Required User Permissions

There are minimal Identity Access Management (IAM) permissions required to return valid results for a each IAM user. If an iam user referenced in the local awscli configuration file does not have adequate permissions to return results for the key report, keyup will simply skip the user and omit the iam user from the key report.

The following IAM policy must be assigned to each IAM user either via group policy assignment or directly attached to the IAM user identity in the AWS Account.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "iam:ListAccountAliases"
      ],
      "Resource": [
        "arn:aws:iam::000000000000:user/*"
      ],
      "Effect": "Allow",
      "Sid": "iamAccountInfo"
    },
    {
      "Action": [
        "iam:CreateAccessKey",
        "iam:DeleteAccessKey",
        "iam:ListAccessKeys",
        "iam:GetAccessKeyLastUsed"
      ],
      "Resource": [
        "arn:aws:iam::742134111111:user/${aws:username}"
      ],
      "Effect": "Allow",
      "Sid": "iamUserChangeOwnAccessKeys"
    }
  ]
}

Back to Key Report Contents


Policies Explained

See the IAM Policy Details section to gain an understanding of each each IAM policy provision and the permissions granted to a user.

Back to Key Report Contents


Screenshots

Sample key report screenshots (click to enlarge).

  • Key report showing all users with valid access keys (none expired):
'Valid access keys'
  • Key report showing keys within 48 hours of expiration:
'Warning near expiration'
  • Key report showing expired keys:
'Expired Keys'

Back to Key Report Contents Top


Table Of Contents