diff --git a/README.md b/README.md index d099893..faf5d5c 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,12 @@ We recommend following [Amazon IAM best practices](https://docs.aws.amazon.com/I ## Assuming a Role We recommend using [GitHub's OIDC provider](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services) to get short-lived credentials needed for your actions. -Specifying `role-to-assume` without providing an `aws-access-key-id` or a `web-identity-token-file` will signal to the action that you wish to use the OIDC provider. -The default session duration is 1 hour when using the OIDC provider to directly assume an IAM Role. -The default session duration is 6 hours when using an IAM User to assume an IAM Role (by providing an `aws-access-key-id`, `aws-secret-access-key`, and a `role-to-assume`) . +Specifying `role-to-assume` **without** providing an `aws-access-key-id` or a `web-identity-token-file` will signal to the action that you wish to use the OIDC provider. + +The default session duration is **1 hour** when using the OIDC provider to directly assume an IAM Role or when an `aws-session-token` is directly provided. + +The default session duration is **6 hours** when using an IAM User to assume an IAM Role (by providing an `aws-access-key-id`, `aws-secret-access-key`, and a `role-to-assume`) . + If you would like to adjust this you can pass a duration to `role-duration-seconds`, but the duration cannot exceed the maximum that was defined when the IAM Role was created. The default session name is GitHubActions, and you can modify it by specifying the desired name in `role-session-name`. The default audience is `sts.amazonaws.com` which you can replace by specifying the desired audience name in `audience`. diff --git a/action.yml b/action.yml index 17723b0..53337d3 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,7 @@ inputs: assume an IAM role using a web identity. E.g., from within an Amazon EKS worker node required: false role-duration-seconds: - description: "Role duration in seconds (default: 6 hours)" + description: "Role duration in seconds (default: 6 hours, 1 hour for OIDC/specified aws-session-token)" required: false role-session-name: description: 'Role session name (default: GitHubActions)'