Files
configure-aws-credentials/test/index.test.ts
Tom Keller ef93a73b13 V3 (#791)
* feat!: v3 release

Squashed commit of the following:

commit 9df144b3ae
Merge: 19d3f3a 131c7b6
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Aug 23 14:41:33 2023 -0700

    Merge remote-tracking branch 'origin' into vNext

commit 131c7b6fd1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 22 03:12:24 2023 +0000

    chore: Bump jest from 29.6.2 to 29.6.3 (#786)

    Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.2 to 29.6.3.
    - [Release notes](https://github.com/jestjs/jest/releases)
    - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/jestjs/jest/commits/v29.6.3/packages/jest)

    ---
    updated-dependencies:
    - dependency-name: jest
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 6334b403eb
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 22 03:11:45 2023 +0000

    chore: Bump aws-sdk from 2.1436.0 to 2.1441.0 (#787)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1436.0 to 2.1441.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1436.0...v2.1441.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 19d3f3a169
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 20:13:39 2023 -0700

    chore: update readme and changelog

commit 4403e8d882
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 17:12:47 2023 -0700

    chore: update workflows

commit 0f1923f1a1
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 17:01:59 2023 -0700

    chore: update .github with current

commit 60a9bf1676
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 17:00:14 2023 -0700

    chore: update .github with current

commit d3464b25f8
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 16:58:01 2023 -0700

    chore: add examples to vNext branch

commit 7cd050ca4d
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 16:54:12 2023 -0700

    chore: update readme

commit 0e32a13775
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 16:19:17 2023 -0700

    chore: update readme

commit 2625b45d56
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 18 15:12:36 2023 -0700

    chore: update readme

commit 19eb4df27e
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Thu Aug 17 17:22:20 2023 -0700

    chore: update readme

commit 71ff793a0f
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Thu Aug 17 17:18:42 2023 -0700

    chore: update readme

commit a272f95336
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Aug 16 17:05:42 2023 -0700

    chore: update readme

commit 360ea313a7
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 15 03:33:37 2023 +0000

    chore: Bump aws-sdk from 2.1431.0 to 2.1436.0 (#783)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1431.0 to 2.1436.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1431.0...v2.1436.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit de93b00c9f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 15 03:32:58 2023 +0000

    chore: Bump eslint from 8.46.0 to 8.47.0 (#784)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.47.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.47.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4dd1aeed85
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 11 16:41:44 2023 -0700

    chore: remove unused dependency, fixing vulnerability

commit 7f4507af3c
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Aug 11 16:24:09 2023 -0700

    fix: maxRetry hit infinite loop with negative input

commit 746d33e7c1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 8 03:23:17 2023 +0000

    chore: Bump aws-sdk from 2.1426.0 to 2.1431.0 (#782)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1426.0 to 2.1431.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1426.0...v2.1431.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 706fc9ae3d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 1 03:41:00 2023 +0000

    chore: Bump eslint from 8.45.0 to 8.46.0 (#780)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.45.0 to 8.46.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.45.0...v8.46.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 9918371ad5
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 1 03:39:16 2023 +0000

    chore: Bump aws-sdk from 2.1421.0 to 2.1426.0 (#781)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1421.0 to 2.1426.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1421.0...v2.1426.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 345462ab9e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Aug 1 03:38:28 2023 +0000

    chore: Bump jest from 29.6.1 to 29.6.2 (#779)

    Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.6.1 to 29.6.2.
    - [Release notes](https://github.com/facebook/jest/releases)
    - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/facebook/jest/commits/v29.6.2/packages/jest)

    ---
    updated-dependencies:
    - dependency-name: jest
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 80a7a6c2a2
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jul 25 03:22:02 2023 +0000

    chore: Bump aws-sdk from 2.1416.0 to 2.1421.0 (#778)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1416.0 to 2.1421.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1416.0...v2.1421.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 385d7e1d64
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jul 18 03:25:33 2023 +0000

    chore: Bump aws-sdk from 2.1413.0 to 2.1416.0 (#774)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1413.0 to 2.1416.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1413.0...v2.1416.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 48560b5d49
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jul 18 03:24:46 2023 +0000

    chore: Bump eslint from 8.44.0 to 8.45.0 (#773)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.45.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 35d8f9588b
Author: Shailja Khurana <117320115+khushail@users.noreply.github.com>
Date:   Fri Jul 14 15:14:02 2023 -0700

    added workflow for handling answerable discussions (#772)

commit 86df881b31
Author: Tom Keller <1083460+kellertk@users.noreply.github.com>
Date:   Wed Jul 12 14:51:43 2023 -0700

    chore: add link to CF template in README (#771)

commit a621db3279
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jul 11 03:16:22 2023 +0000

    chore: Bump jest from 29.5.0 to 29.6.1 (#768)

    Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.5.0 to 29.6.1.
    - [Release notes](https://github.com/facebook/jest/releases)
    - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/facebook/jest/commits/v29.6.1/packages/jest)

    ---
    updated-dependencies:
    - dependency-name: jest
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 90858a2e70
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jul 11 03:15:36 2023 +0000

    chore: Bump aws-sdk from 2.1410.0 to 2.1413.0 (#767)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1410.0 to 2.1413.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1410.0...v2.1413.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 228a9916ee
Author: Tom Keller <1083460+kellertk@users.noreply.github.com>
Date:   Fri Jul 7 16:49:10 2023 -0700

    Update README.md for OIDC changes (#764)

commit 65c2143642
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Thu Jul 6 15:19:05 2023 -0700

    chore: add final tests, add outputs to action.yml

commit 7b893ba14b
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Jul 5 18:55:04 2023 -0700

    feat: getIDToken retry, feat: special character in key retry

commit 3c981da079
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jul 4 03:30:19 2023 +0000

    chore: Bump eslint from 8.43.0 to 8.44.0 (#761)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.43.0 to 8.44.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.43.0...v8.44.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 222080786b
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jul 4 03:29:03 2023 +0000

    chore: Bump aws-sdk from 2.1405.0 to 2.1410.0 (#760)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1405.0 to 2.1410.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1405.0...v2.1410.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit aa2675f083
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jul 3 16:13:19 2023 -0700

    implement last changes for vNext

commit 256d740e71
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Jun 30 16:20:47 2023 -0700

    chore: remove unnecessary step in unit test job

commit cd5cd29d7f
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Jun 30 16:17:47 2023 -0700

    chore: declare eol in gitattributes

commit 7b90497500
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Jun 30 16:11:12 2023 -0700

    chore: disable auto crlf in unit tests

commit fb67439785
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Jun 30 15:48:15 2023 -0700

    fix boolean input

commit 2b32a8f2c6
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Jun 30 15:40:41 2023 -0700

    fix webIdentityTokenFile option, rearrange validation logic

commit 7526948ef9
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Thu Jun 29 17:29:11 2023 -0700

    chore: vnext unit tests (#758)

    * fix: unit tests

    * get unit tests running

commit 0270d0bcec
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Tue Jun 27 14:22:02 2023 -0700

    chore: update readme with new thumbprint (#755)

commit 4b8efb08db
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jun 27 03:58:21 2023 +0000

    chore: Bump aws-sdk from 2.1400.0 to 2.1405.0 (#754)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1400.0 to 2.1405.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1400.0...v2.1405.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit d26f2d03f8
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Jun 21 16:45:34 2023 -0700

    feat: role-chaining

commit 20f59875fe
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Jun 21 15:13:42 2023 -0700

    feat: optional policy inputs when assuming role

commit 10024331f6
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Jun 21 15:08:37 2023 -0700

    feat: optional policy inputs when assuming role

commit 2cee35f9a9
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Jun 21 14:51:50 2023 -0700

    feat: optional policy inputs when assuming role

commit 8aa25a5cb6
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Jun 21 14:50:04 2023 -0700

    feat: optional policy inputs when assuming role

commit e849bae717
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Tue Jun 20 18:02:34 2023 -0700

    chore: remove windows self-hosted runner

commit 8a5ae330dd
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Tue Jun 20 16:10:30 2023 -0700

    chore: expand integ tests

commit 819a6d1c74
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jun 20 03:58:58 2023 +0000

    chore: Bump eslint from 8.42.0 to 8.43.0 (#750)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.42.0 to 8.43.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.42.0...v8.43.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit e57babb541
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jun 20 03:58:19 2023 +0000

    chore: Bump aws-sdk from 2.1396.0 to 2.1400.0 (#749)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1396.0 to 2.1400.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1396.0...v2.1400.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit c613996f9a
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 18:38:44 2023 -0700

    chore: attempting to get to minimal integ test success

commit c13a9c8ef3
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 18:36:40 2023 -0700

    chore: attempting to get to minimal integ test success

commit b98e10c776
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 18:25:03 2023 -0700

    chore: set failing configuration on integ workflow matrix

commit 6d193465ae
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 16:32:19 2023 -0700

    chore: remove push workflow trigger

commit a8f18666db
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 16:29:33 2023 -0700

    chore: fix workflow file indentation

commit 7dec5a88ce
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 16:28:05 2023 -0700

    chore: update workflow to be able to trigger

commit 0a8178a52a
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 16:21:45 2023 -0700

    chore: update workflow to be able to trigger

commit 506b27277d
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Mon Jun 19 16:17:53 2023 -0700

    chore: update workflow to be able to trigger

commit 5fd3084fc3
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Wed Jun 14 15:02:32 2023 -0700

    chore: update changelog for release (#745)

commit d00f6c6f41
Author: Dimitar <dimitarshr@gmail.com>
Date:   Wed Jun 14 22:43:04 2023 +0100

    Allow inline session policies for assuming role (#739)

    * Allow to pass inline session policy as a parameter

    Update the action file

    Regenerate the dist/ content

    Add test

    * Fix typos

    * Fix stylistic error

    * Move the inline policy logic to allow assumeRole to use it as well; Update and add tests

    * Add an option for managed policies

    * Regenerate the dist/ files

    * Use multiline input for managed policies

    * Update readme

    * Update readme

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit ae734070a0
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Jun 13 04:55:26 2023 +0000

    chore: Update dist

commit 3d528c5f7d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jun 13 04:54:37 2023 +0000

    chore: Bump aws-sdk from 2.1391.0 to 2.1396.0 (#744)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1391.0 to 2.1396.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1391.0...v2.1396.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit e7aae61719
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Jun 6 03:59:43 2023 +0000

    chore: Update dist

commit 979ee1f6f4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jun 6 03:59:04 2023 +0000

    chore: Bump aws-sdk from 2.1386.0 to 2.1391.0 (#742)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1386.0 to 2.1391.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1386.0...v2.1391.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 184acc09ea
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jun 6 03:58:21 2023 +0000

    chore: Bump eslint from 8.41.0 to 8.42.0 (#741)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.41.0 to 8.42.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.41.0...v8.42.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 375a690dc0
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Wed May 31 14:43:39 2023 -0700

    chore: update changelog for v2.1.0 (#738)

    * chore: update changelog for v2.1.0

    * chore: update changelog for v2.1.0

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 8337ca3433
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Wed May 31 14:38:06 2023 -0700

    update time to ancient (#729)

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 5727f247b6
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue May 30 03:59:04 2023 +0000

    chore: Update dist

commit de3676366f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 30 03:58:14 2023 +0000

    chore: Bump aws-sdk from 2.1382.0 to 2.1386.0 (#736)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1382.0 to 2.1386.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1382.0...v2.1386.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 81fba9ea6a
Author: escudero89 <532828+escudero89@users.noreply.github.com>
Date:   Fri May 26 00:10:40 2023 +0200

    Update README.md with v2 instead of v1 (#733)

commit 8815b6557c
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 23 03:59:25 2023 +0000

    chore: Bump eslint from 8.40.0 to 8.41.0 (#732)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.40.0 to 8.41.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.40.0...v8.41.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 3d77523f10
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue May 23 03:58:44 2023 +0000

    chore: Update dist

commit 4eb7afece4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 23 03:58:06 2023 +0000

    chore: Bump aws-sdk from 2.1378.0 to 2.1382.0 (#731)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1378.0 to 2.1382.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1378.0...v2.1382.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit d713a182c5
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue May 16 03:58:29 2023 +0000

    chore: Update dist

commit 1910078421
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 16 03:57:45 2023 +0000

    chore: Bump aws-sdk from 2.1374.0 to 2.1378.0 (#726)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1374.0 to 2.1378.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1374.0...v2.1378.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 580afbba80
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue May 9 03:59:53 2023 +0000

    chore: Update dist

commit 1daf2a1967
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 9 03:59:14 2023 +0000

    chore: Bump aws-sdk from 2.1369.0 to 2.1374.0 (#723)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1369.0 to 2.1374.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1369.0...v2.1374.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 76ad093bd5
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 9 03:57:57 2023 +0000

    chore: Bump eslint from 8.39.0 to 8.40.0 (#722)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.39.0 to 8.40.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.39.0...v8.40.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 6fbd316fd1
Author: Milo Hyson <siggimoo@users.noreply.github.com>
Date:   Fri May 5 18:27:52 2023 -0700

    Add role-chaining support (#688)

    * Add role-chaining support

    * fix version in readme

    * minor readme adjustment

    ---------

    Co-authored-by: Milo Hyson <mhyson@tunein.com>
    Co-authored-by: peterwoodworth <woodwoop@amazon.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 19f3a6d67f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 2 03:59:57 2023 +0000

    chore: Bump axios from 1.3.6 to 1.4.0 (#720)

    Bumps [axios](https://github.com/axios/axios) from 1.3.6 to 1.4.0.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.3.6...v1.4.0)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 96aac45bfc
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue May 2 03:58:25 2023 +0000

    chore: Update dist

commit 5e6a264592
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 2 03:57:46 2023 +0000

    chore: Bump aws-sdk from 2.1364.0 to 2.1369.0 (#719)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1364.0 to 2.1369.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1364.0...v2.1369.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 82ea2d2853
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Apr 25 04:01:50 2023 +0000

    chore: Bump axios from 1.3.5 to 1.3.6 (#716)

    Bumps [axios](https://github.com/axios/axios) from 1.3.5 to 1.3.6.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.3.5...v1.3.6)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit e0213bba7a
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Apr 25 03:59:31 2023 +0000

    chore: Update dist

commit 2beda2fb7c
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Apr 25 03:58:42 2023 +0000

    chore: Bump aws-sdk from 2.1360.0 to 2.1364.0 (#715)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1360.0 to 2.1364.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1360.0...v2.1364.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 0afc5d47c7
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Apr 25 03:57:35 2023 +0000

    chore: Bump eslint from 8.38.0 to 8.39.0 (#714)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.38.0 to 8.39.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.38.0...v8.39.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 31bd3ae2db
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Apr 18 03:59:23 2023 +0000

    chore: Update dist

commit 46648cb772
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Apr 18 03:58:27 2023 +0000

    chore: Bump aws-sdk from 2.1354.0 to 2.1360.0 (#713)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1354.0 to 2.1360.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1354.0...v2.1360.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 60a5c129d0
Author: Jonathan Lang <jonathan.lang@tngtech.com>
Date:   Wed Apr 12 00:46:13 2023 +0200

    Fix Typo in README.md (#707)

commit f576cc9d9b
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Apr 11 04:00:40 2023 +0000

    chore: Bump axios from 1.3.4 to 1.3.5 (#712)

    Bumps [axios](https://github.com/axios/axios) from 1.3.4 to 1.3.5.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.3.4...v1.3.5)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 9c17403327
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Apr 11 03:59:38 2023 +0000

    chore: Bump eslint from 8.35.0 to 8.38.0 (#711)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.38.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.35.0...v8.38.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 9c1a10e79c
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Apr 11 03:58:34 2023 +0000

    chore: Update dist

commit 9192d9ecb4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Apr 11 03:57:48 2023 +0000

    chore: Bump aws-sdk from 2.1329.0 to 2.1354.0 (#710)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1329.0 to 2.1354.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1329.0...v2.1354.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 26227bfa7d
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Mar 22 16:52:04 2023 -0700

    chore: adjust cleanup build target

commit 0d90ddd1f2
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Mar 22 16:51:12 2023 -0700

    chore: adjust cleanup build again

commit fc80f28dba
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Mar 22 16:37:58 2023 -0700

    chore: adjust cleanup build and some imports

commit 3088522ce8
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Mar 22 16:32:37 2023 -0700

    chore: build and set cleanup file

commit 0181111f1d
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Mar 22 15:12:07 2023 -0700

    chore: build action

commit b723544115
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Mar 22 15:08:39 2023 -0700

    fix: branch name is not sanitized, slight refactor

commit 0e613a0980
Author: Adrian Środoń <adriansrodon@tuta.io>
Date:   Mon Mar 20 23:24:34 2023 +0100

    docs: add note about case sensivity to CloudFormation template (#696)

    * docs: add note about case sensivity to CloudFormation template

    * Move case-sensivity notes to CloudFormation template

commit 12d07d4800
Author: Tom Keller <kellertk@amazon.com>
Date:   Fri Mar 17 17:46:57 2023 -0700

    feat: update tests

commit f6fdf0cdbd
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Wed Mar 15 14:12:01 2023 -0700

    feat: aws region is optional, use global sts endpoint when not set

commit cb1361ade3
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Mon Mar 13 14:50:02 2023 -0700

    docs: clarify safety of version migration in readme (#692)

commit f9f25e69f5
Author: peterwoodworth <woodwoop@amazon.com>
Date:   Fri Mar 10 14:35:59 2023 -0800

    refactor, add new major version features and proxy

commit 83f0e97b2f
Merge: 7fc5f08 f86a0c3
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Tue Mar 7 17:36:19 2023 -0800

    Merge pull request #687 from fabienfoerster/patch-2

    Update README examples to use v2

commit f86a0c30a5
Author: Fabien Foerster <f.foerster@bevolta.com>
Date:   Tue Mar 7 21:29:17 2023 +0100

    Update README examples to use v2

commit 7fc5f080e5
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Mar 7 01:02:37 2023 +0000

    chore: Update dist

commit ffc08eae73
Author: Tom Keller <kellertk@amazon.com>
Date:   Mon Mar 6 17:01:09 2023 -0800

    Rename master to main

commit e1e17a757e
Author: Tom Keller <1083460+kellertk@users.noreply.github.com>
Date:   Mon Mar 6 16:35:37 2023 -0800

    Version 2 release (#685)

    * Update README for v2

    * Remove codeql analysis

    * Version bump checkout action

    * Tweak closed issue message

    * Changes for v2 release

    * Adjust action name

    * Update CHANGELOG

    * Update action to use node 16

    * Update versions

    * Typo

commit bab55d3830
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 28 04:09:09 2023 +0000

    chore: Bump axios from 1.3.3 to 1.3.4 (#679)

    Bumps [axios](https://github.com/axios/axios) from 1.3.3 to 1.3.4.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.3.3...v1.3.4)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 07b737a14f
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Feb 28 04:00:33 2023 +0000

    chore: Update dist

commit 26e4efa71f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 28 03:59:47 2023 +0000

    chore: Bump aws-sdk from 2.1320.0 to 2.1324.0 (#677)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1320.0 to 2.1324.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1320.0...v2.1324.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 7e0ecf0346
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 28 03:58:55 2023 +0000

    chore: Bump eslint from 8.34.0 to 8.35.0 (#675)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.34.0 to 8.35.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.34.0...v8.35.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 567d4149d6
Merge: 32eb1b4 85ec61b
Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
Date:   Tue Feb 21 18:49:30 2023 -0800

    Merge pull request #563 from russau/docs/readme-role-update

    Minor: include a role condition test for AUD in sample CFN template

commit 32eb1b4a66
Author: Jackson Welsh <me@jacksonwel.sh>
Date:   Tue Feb 21 20:36:17 2023 -0600

    feat: document mask-aws-account-id input (#606)

    Closes aws-actions#304

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 6ca2577643
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Wed Feb 22 02:34:29 2023 +0000

    chore: Update dist

commit f1de076135
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Feb 22 02:33:40 2023 +0000

    chore: Bump aws-sdk from 2.1273.0 to 2.1320.0 (#666)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1273.0 to 2.1320.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1273.0...v2.1320.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 077fd1fc8f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 21 04:00:04 2023 +0000

    chore: Bump jest from 29.4.2 to 29.4.3 (#663)

    Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.4.2 to 29.4.3.
    - [Release notes](https://github.com/facebook/jest/releases)
    - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/facebook/jest/commits/v29.4.3/packages/jest)

    ---
    updated-dependencies:
    - dependency-name: jest
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 1416c559c0
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 14 04:08:31 2023 +0000

    chore: Bump eslint from 8.33.0 to 8.34.0 (#653)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.33.0 to 8.34.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.33.0...v8.34.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit c3f9f9cde3
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 14 04:02:34 2023 +0000

    chore: Bump jest from 29.4.1 to 29.4.2 (#655)

    Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.4.1 to 29.4.2.
    - [Release notes](https://github.com/facebook/jest/releases)
    - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/facebook/jest/commits/v29.4.2/packages/jest)

    ---
    updated-dependencies:
    - dependency-name: jest
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 1a61b71d4c
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 14 04:00:54 2023 +0000

    chore: Bump axios from 1.3.2 to 1.3.3 (#651)

    Bumps [axios](https://github.com/axios/axios) from 1.3.2 to 1.3.3.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.3.2...v1.3.3)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 07d5781915
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Feb 7 03:03:40 2023 +0000

    chore: Bump axios from 1.2.6 to 1.3.2 (#648)

    Bumps [axios](https://github.com/axios/axios) from 1.2.6 to 1.3.2.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.2.6...v1.3.2)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 5ed46d9d6a
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 31 03:10:42 2023 +0000

    chore: Bump eslint from 8.32.0 to 8.33.0 (#645)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.32.0 to 8.33.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.32.0...v8.33.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 0d34112acb
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 31 03:06:27 2023 +0000

    chore: Bump jest from 29.3.1 to 29.4.1 (#643)

    Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.3.1 to 29.4.1.
    - [Release notes](https://github.com/facebook/jest/releases)
    - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/facebook/jest/commits/v29.4.1/packages/jest)

    ---
    updated-dependencies:
    - dependency-name: jest
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit fa45146389
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 31 03:05:11 2023 +0000

    chore: Bump @vercel/ncc from 0.36.0 to 0.36.1 (#640)

    Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.36.0 to 0.36.1.
    - [Release notes](https://github.com/vercel/ncc/releases)
    - [Commits](https://github.com/vercel/ncc/compare/0.36.0...0.36.1)

    ---
    updated-dependencies:
    - dependency-name: "@vercel/ncc"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit a075dc0410
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 31 03:03:44 2023 +0000

    chore: Bump axios from 1.2.3 to 1.2.6 (#639)

    Bumps [axios](https://github.com/axios/axios) from 1.2.3 to 1.2.6.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.2.3...v1.2.6)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3e21ee4ae7
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 24 03:04:28 2023 +0000

    chore: Bump axios from 1.2.2 to 1.2.3 (#630)

    Bumps [axios](https://github.com/axios/axios) from 1.2.2 to 1.2.3.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/1.2.2...v1.2.3)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 491cd39cf6
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 17 03:05:35 2023 +0000

    chore: Bump eslint from 8.31.0 to 8.32.0 (#625)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.31.0 to 8.32.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.31.0...v8.32.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3654529dc6
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 3 03:06:41 2023 +0000

    chore: Bump json5 from 2.2.1 to 2.2.3 (#620)

    Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
    - [Release notes](https://github.com/json5/json5/releases)
    - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

    ---
    updated-dependencies:
    - dependency-name: json5
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit aa5a031041
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 3 03:04:46 2023 +0000

    chore: Bump eslint from 8.30.0 to 8.31.0 (#619)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.30.0 to 8.31.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.30.0...v8.31.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 55443b3d5b
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 3 03:03:28 2023 +0000

    chore: Bump axios from 1.2.1 to 1.2.2 (#616)

    Bumps [axios](https://github.com/axios/axios) from 1.2.1 to 1.2.2.
    - [Release notes](https://github.com/axios/axios/releases)
    - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
    - [Commits](https://github.com/axios/axios/compare/v1.2.1...1.2.2)

    ---
    updated-dependencies:
    - dependency-name: axios
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 48f0cb7848
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Dec 20 03:04:13 2022 +0000

    chore: Bump eslint from 8.29.0 to 8.30.0 (#610)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.29.0 to 8.30.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/eslint/eslint/compare/v8.29.0...v8.30.0)

    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 90d1b38cb5
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Dec 13 03:05:43 2022 +0000

    chore: Update dist

commit 422c797285
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Dec 13 03:04:51 2022 +0000

    chore: Bump aws-sdk from 2.1268.0 to 2.1273.0 (#603)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1268.0 to 2.1273.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1268.0...v2.1273.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4b942d82b0
Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com>
Date:   Tue Dec 6 03:10:45 2022 +0000

    chore: Update dist

commit 7437ed192e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Dec 6 03:09:51 2022 +0000

    chore: Bump aws-sdk from 2.1262.0 to 2.1268.0 (#596)

    Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1262.0 to 2.1268.0.
    - [Release notes](https://github.com/aws/aws-sdk-js/releases)
    - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1262.0...v2.1268.0)

    ---
    updated-dependencies:
    - dependency-name: aws-sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit ed4ba44f95
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Dec 6 03:08:24 2022 +0000

    chore: Bump @vercel/ncc from 0.34.0 to 0.36.0 (#594)

    Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.34.0 to 0.36.0.
    - [Release notes](https://github.com/vercel/ncc/releases)
    - [Commits](https://github.com/vercel/ncc/compare/0.34.0...0.36.0)

    ---
    updated-dependencies:
    - dependency-name: "@vercel/ncc"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 10dc6d923a
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Dec 6 03:05:08 2022 +0000

    chore: Bump axios from 1.2.0 to 1.2.1 (#590)

    Bumps [axios](https://github.…

* chore: tweak readme for v3
2023-08-23 16:35:15 -07:00

848 lines
32 KiB
TypeScript

import * as core from '@actions/core';
import {
AssumeRoleCommand,
AssumeRoleWithWebIdentityCommand,
GetCallerIdentityCommand,
STSClient,
} from '@aws-sdk/client-sts';
import { fromEnv } from '@aws-sdk/credential-provider-env';
import { CredentialsProviderError } from '@aws-sdk/property-provider';
import { mockClient } from 'aws-sdk-client-mock';
import { withsleep, reset } from '../src/helpers';
import { run } from '../src/index';
// #region
const FAKE_ACCESS_KEY_ID = 'MYAWSACCESSKEYID';
const FAKE_SECRET_ACCESS_KEY = 'MYAWSSECRETACCESSKEY';
const FAKE_SESSION_TOKEN = 'MYAWSSESSIONTOKEN';
const FAKE_STS_ACCESS_KEY_ID = 'STSAWSACCESSKEYID';
const FAKE_STS_SECRET_ACCESS_KEY = 'STSAWSSECRETACCESSKEY';
const FAKE_STS_SESSION_TOKEN = 'STSAWSSESSIONTOKEN';
const FAKE_ASSUMED_ROLE_ID = 'AROAFAKEASSUMEDROLEID';
const FAKE_REGION = 'fake-region-1';
const FAKE_ACCOUNT_ID = '123456789012';
const FAKE_ROLE_ACCOUNT_ID = '111111111111';
const ROLE_NAME = 'MY-ROLE';
const ROLE_ARN = 'arn:aws:iam::111111111111:role/MY-ROLE';
const MANAGED_SESSION_POLICY_INPUT = [
'arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess',
'arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess',
];
const ENVIRONMENT_VARIABLE_OVERRIDES = {
SHOW_STACK_TRACE: 'false',
GITHUB_REPOSITORY: 'MY-REPOSITORY-NAME',
GITHUB_WORKFLOW: 'MY-WORKFLOW-ID',
GITHUB_ACTION: 'MY-ACTION-NAME',
GITHUB_ACTOR: 'MY-USERNAME[bot]',
GITHUB_SHA: 'MY-COMMIT-ID',
GITHUB_REF: 'MY-BRANCH',
GITHUB_WORKSPACE: '/home/github',
};
const GITHUB_ACTOR_SANITIZED = 'MY-USERNAME_bot_';
const CREDS_INPUTS = {
'aws-access-key-id': FAKE_ACCESS_KEY_ID,
'aws-secret-access-key': FAKE_SECRET_ACCESS_KEY,
};
const DEFAULT_INPUTS = {
...CREDS_INPUTS,
'aws-session-token': FAKE_SESSION_TOKEN,
'aws-region': FAKE_REGION,
};
const ASSUME_ROLE_INPUTS = { ...CREDS_INPUTS, 'role-to-assume': ROLE_ARN, 'aws-region': FAKE_REGION };
// #endregion
const mockedSTS = mockClient(STSClient);
function mockGetInput(requestResponse: Record<string, string>) {
return function (name: string, _options: unknown): string {
return requestResponse[name]!;
};
}
function mockGetMultilineInput(requestResponse: Record<string, string[]>) {
return function (name: string, _options: unknown): string[] {
return requestResponse[name]!;
};
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
jest.mock('fs', () => ({
...jest.requireActual('fs'),
existsSync: jest.fn(() => true),
readFileSync: jest.fn(() => 'testpayload'),
}));
jest.mock('@aws-sdk/credential-provider-env', () => ({
// This is the actual implementation in the SDK ^_^
fromEnv: jest.fn().mockImplementation(() => () => {
const accessKeyId = process.env['AWS_ACCESS_KEY_ID'];
const secretAccessKey = process.env['AWS_SECRET_ACCESS_KEY'];
const sessionToken = process.env['AWS_SESSION_TOKEN'];
const expiration = process.env['AWS_CREDENTIAL_EXPIRATION'];
return {
accessKeyId,
secretAccessKey,
sessionToken,
expiration,
};
}),
}));
describe('Configure AWS Credentials', () => {
const OLD_ENV = process.env;
beforeEach(() => {
jest.resetModules();
process.env = { ...OLD_ENV, ...ENVIRONMENT_VARIABLE_OVERRIDES };
jest.clearAllMocks();
mockedSTS.reset();
(fromEnv as jest.Mock).mockReset();
jest.spyOn(core, 'getMultilineInput').mockImplementation(() => []);
jest.spyOn(core, 'getIDToken').mockImplementation(async () => Promise.resolve('testtoken'));
jest.spyOn(core, 'exportVariable').mockImplementation();
jest.spyOn(core, 'setSecret').mockImplementation();
jest.spyOn(core, 'setOutput').mockImplementation();
jest.spyOn(core, 'setFailed').mockImplementation();
jest.spyOn(core, 'debug').mockImplementation();
jest.spyOn(core, 'info').mockImplementation((string) => {
return string;
});
(fromEnv as jest.Mock)
.mockImplementationOnce(() => () => ({
accessKeyId: FAKE_ACCESS_KEY_ID,
secretAccessKey: FAKE_SECRET_ACCESS_KEY,
}))
.mockImplementationOnce(() => () => ({
accessKeyId: FAKE_STS_ACCESS_KEY_ID,
secretAccessKey: FAKE_STS_SECRET_ACCESS_KEY,
}));
mockedSTS
.on(GetCallerIdentityCommand)
.resolvesOnce({ Account: FAKE_ACCOUNT_ID })
.resolvesOnce({ Account: FAKE_ROLE_ACCOUNT_ID });
mockedSTS.on(AssumeRoleCommand).resolves({
Credentials: {
AccessKeyId: FAKE_STS_ACCESS_KEY_ID,
SecretAccessKey: FAKE_STS_SECRET_ACCESS_KEY,
SessionToken: FAKE_STS_SESSION_TOKEN,
Expiration: new Date(8640000000000000),
},
AssumedRoleUser: {
AssumedRoleId: FAKE_ASSUMED_ROLE_ID,
Arn: ROLE_ARN,
},
});
mockedSTS.on(AssumeRoleWithWebIdentityCommand).resolves({
Credentials: {
AccessKeyId: FAKE_STS_ACCESS_KEY_ID,
SecretAccessKey: FAKE_STS_SECRET_ACCESS_KEY,
SessionToken: FAKE_STS_SESSION_TOKEN,
Expiration: new Date(8640000000000000),
},
AssumedRoleUser: {
AssumedRoleId: FAKE_ASSUMED_ROLE_ID,
Arn: ROLE_ARN,
},
});
withsleep(async () => {
return Promise.resolve();
});
});
afterEach(() => {
process.env = OLD_ENV;
reset();
});
test('exports env vars', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(DEFAULT_INPUTS));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)).toHaveLength(0);
expect(core.exportVariable).toHaveBeenCalledTimes(5);
expect(core.setSecret).toHaveBeenCalledTimes(3);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_ACCESS_KEY_ID', FAKE_ACCESS_KEY_ID);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCESS_KEY_ID);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SECRET_ACCESS_KEY', FAKE_SECRET_ACCESS_KEY);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_SECRET_ACCESS_KEY);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SESSION_TOKEN', FAKE_SESSION_TOKEN);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_SESSION_TOKEN);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_DEFAULT_REGION', FAKE_REGION);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_REGION', FAKE_REGION);
expect(core.setOutput).toHaveBeenCalledWith('aws-account-id', FAKE_ACCOUNT_ID);
});
test('action fails when github env vars are not set', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(ASSUME_ROLE_INPUTS));
delete process.env['GITHUB_SHA'];
await run();
expect(core.setFailed).toHaveBeenCalledWith(
'Missing required environment variables. Are you running in GitHub Actions?'
);
});
test('action does not require GITHUB_REF env var', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(DEFAULT_INPUTS));
delete process.env['GITHUB_REF'];
await run();
expect(core.setFailed).toHaveBeenCalledTimes(0);
});
test('action with no accessible credentials fails', async () => {
const mockInputs = { 'aws-region': FAKE_REGION };
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(mockInputs));
(fromEnv as jest.Mock).mockReset();
(fromEnv as jest.Mock).mockImplementation(() => () => {
throw new CredentialsProviderError('test');
});
await run();
expect(core.setFailed).toHaveBeenCalledWith(
'Could not determine how to assume credentials. Please check your inputs and try again.'
);
});
test('action with empty credentials fails', async () => {
const mockInputs = { 'aws-region': FAKE_REGION };
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(mockInputs));
(fromEnv as jest.Mock).mockReset();
(fromEnv as jest.Mock).mockImplementation(
() => async () => Promise.resolve({ accessKeyId: '', secretAccessKey: '' })
);
await run();
expect(core.setFailed).toHaveBeenCalledWith(
'Could not determine how to assume credentials. Please check your inputs and try again.'
);
});
test('action fails when credentials are not set in the SDK correctly', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(DEFAULT_INPUTS));
(fromEnv as jest.Mock).mockReset();
(fromEnv as jest.Mock).mockImplementationOnce(() => async () => Promise.resolve({ accessKeyId: '123' }));
await run();
expect(core.setFailed).toHaveBeenCalledWith(
'Unexpected failure: Credentials loaded by the SDK do not match the access key ID configured by the action'
);
});
test('session token is optional', async () => {
const mockInputs = { ...CREDS_INPUTS, 'aws-region': 'eu-west-1' };
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(mockInputs));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)).toHaveLength(0);
expect(core.exportVariable).toHaveBeenCalledTimes(4);
expect(core.setSecret).toHaveBeenCalledTimes(2);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_ACCESS_KEY_ID', FAKE_ACCESS_KEY_ID);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCESS_KEY_ID);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SECRET_ACCESS_KEY', FAKE_SECRET_ACCESS_KEY);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_SECRET_ACCESS_KEY);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_DEFAULT_REGION', 'eu-west-1');
expect(core.exportVariable).toHaveBeenCalledWith('AWS_REGION', 'eu-west-1');
expect(core.setOutput).toHaveBeenCalledWith('aws-account-id', FAKE_ACCOUNT_ID);
});
test('existing env var creds are cleared', async () => {
const mockInputs = { ...CREDS_INPUTS, 'aws-region': 'eu-west-1' };
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(mockInputs));
process.env['AWS_ACCESS_KEY_ID'] = 'foo';
process.env['AWS_SECRET_ACCESS_KEY'] = 'bar';
process.env['AWS_SESSION_TOKEN'] = 'helloworld';
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)).toHaveLength(0);
expect(core.exportVariable).toHaveBeenCalledTimes(5);
expect(core.setSecret).toHaveBeenCalledTimes(2);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_ACCESS_KEY_ID', FAKE_ACCESS_KEY_ID);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCESS_KEY_ID);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SECRET_ACCESS_KEY', FAKE_SECRET_ACCESS_KEY);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_SECRET_ACCESS_KEY);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SESSION_TOKEN', '');
expect(core.exportVariable).toHaveBeenCalledWith('AWS_DEFAULT_REGION', 'eu-west-1');
expect(core.exportVariable).toHaveBeenCalledWith('AWS_REGION', 'eu-west-1');
expect(core.setOutput).toHaveBeenCalledWith('aws-account-id', FAKE_ACCOUNT_ID);
});
test('validates region name', async () => {
const mockInputs = { ...CREDS_INPUTS, 'aws-region': '$AWS_REGION' };
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(mockInputs));
await run();
expect(core.setFailed).toHaveBeenCalledWith('Region is not valid: $AWS_REGION');
});
test('throws error if access key id exists but missing secret access key', async () => {
const inputsWIthoutSecretKey = { ...DEFAULT_INPUTS };
//@ts-expect-error deleting a required property to test failure condition
delete inputsWIthoutSecretKey['aws-secret-access-key'];
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(inputsWIthoutSecretKey));
await run();
expect(core.setFailed).toHaveBeenCalledWith(
"'aws-secret-access-key' must be provided if 'aws-access-key-id' is provided"
);
});
test('can opt into masking account ID', async () => {
const mockInputs = { ...CREDS_INPUTS, 'aws-region': 'us-east-1', 'mask-aws-account-id': 'true' };
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(mockInputs));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)).toHaveLength(0);
expect(core.exportVariable).toHaveBeenCalledTimes(4);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_ACCESS_KEY_ID', FAKE_ACCESS_KEY_ID);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCESS_KEY_ID);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_SECRET_ACCESS_KEY', FAKE_SECRET_ACCESS_KEY);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_SECRET_ACCESS_KEY);
expect(core.exportVariable).toHaveBeenCalledWith('AWS_DEFAULT_REGION', 'us-east-1');
expect(core.exportVariable).toHaveBeenCalledWith('AWS_REGION', 'us-east-1');
expect(core.setOutput).toHaveBeenCalledWith('aws-account-id', FAKE_ACCOUNT_ID);
expect(core.setSecret).toHaveBeenCalledWith(FAKE_ACCOUNT_ID);
expect(core.setSecret).toHaveBeenCalledTimes(3);
});
test('error is caught by core.setFailed and caught', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(DEFAULT_INPUTS));
mockedSTS.reset();
mockedSTS.on(GetCallerIdentityCommand).rejects();
await run();
expect(core.setFailed).toHaveBeenCalled();
});
test('role assumption tags', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(ASSUME_ROLE_INPUTS));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
});
});
test('role assumption duration provided', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'role-duration-seconds': '5' }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 5,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
});
});
test('role assumption session name provided', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'role-session-name': 'MySessionName' }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'MySessionName',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
});
});
test('role name provided instead of ARN', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...CREDS_INPUTS, 'role-to-assume': ROLE_NAME, 'aws-region': FAKE_REGION }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: 'arn:aws:iam::123456789012:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
});
});
test('web identity token file provided with absolute path', async () => {
jest.spyOn(core, 'getInput').mockImplementation(
mockGetInput({
'role-to-assume': ROLE_ARN,
'aws-region': FAKE_REGION,
'web-identity-token-file': '/fake/token/file',
})
);
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand)[0]?.args[0].input).toEqual({
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
WebIdentityToken: 'testpayload',
});
});
test('web identity token file provided with relative path', async () => {
jest.spyOn(core, 'getInput').mockImplementation(
mockGetInput({
'role-to-assume': ROLE_ARN,
'aws-region': FAKE_REGION,
'web-identity-token-file': 'fake/token/file',
})
);
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand)[0]?.args[0].input).toEqual({
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
WebIdentityToken: 'testpayload',
});
});
test('only role arn and region provided to use GH OIDC Token', async () => {
process.env['GITHUB_ACTIONS'] = 'true';
process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'] = 'test-token';
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ 'role-to-assume': ROLE_ARN, 'aws-region': FAKE_REGION }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand)[0]?.args[0].input).toEqual({
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
WebIdentityToken: 'testtoken',
});
expect(core.getIDToken).toHaveBeenCalledTimes(1);
});
test('getIDToken call retries when failing', async () => {
process.env['GITHUB_ACTIONS'] = 'true';
process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'] = 'test-token';
jest.spyOn(core, 'getIDToken').mockImplementation(() => {
throw new Error('test error');
});
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ 'role-to-assume': ROLE_ARN, 'aws-region': FAKE_REGION }));
await run();
expect(core.getIDToken).toHaveBeenCalledTimes(12);
expect(core.setFailed).toHaveBeenCalledWith('getIDToken call failed: test error');
});
test('GH OIDC With custom role duration', async () => {
const CUSTOM_ROLE_DURATION = '1234';
process.env['GITHUB_ACTIONS'] = 'true';
process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'] = 'test-token';
jest.spyOn(core, 'getInput').mockImplementation(
mockGetInput({
'role-to-assume': ROLE_ARN,
'aws-region': FAKE_REGION,
'role-duration-seconds': CUSTOM_ROLE_DURATION,
})
);
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand)[0]?.args[0].input).toEqual({
RoleArn: 'arn:aws:iam::111111111111:role/MY-ROLE',
RoleSessionName: 'GitHubActions',
DurationSeconds: parseInt(CUSTOM_ROLE_DURATION),
WebIdentityToken: 'testtoken',
});
});
test('GH OIDC check fails if token is not set', async () => {
process.env['GITHUB_ACTIONS'] = 'true';
jest.spyOn(core, 'getInput').mockImplementation(
mockGetInput({
'role-to-assume': ROLE_ARN,
'aws-region': FAKE_REGION,
})
);
await run();
expect(core.info).toHaveBeenCalledWith(
'It looks like you might be trying to authenticate with OIDC. Did you mean to set the `id-token` permission?'
);
expect(core.setFailed).toHaveBeenCalledWith(
'Could not determine how to assume credentials. Please check your inputs and try again.'
);
});
test('role assumption fails after maximum trials using OIDC provider', async () => {
process.env['GITHUB_ACTIONS'] = 'true';
process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'] = 'test-token';
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ 'role-to-assume': ROLE_ARN, 'aws-region': FAKE_REGION }));
mockedSTS.reset();
mockedSTS.on(AssumeRoleWithWebIdentityCommand).rejects();
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand).length).toEqual(12);
});
test('role assumption fails after one trial when disabling retry', async () => {
process.env['GITHUB_ACTIONS'] = 'true';
process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'] = 'test-token';
jest
.spyOn(core, 'getInput')
.mockImplementation(
mockGetInput({ 'role-to-assume': ROLE_ARN, 'aws-region': FAKE_REGION, 'disable-retry': 'true' })
);
mockedSTS.reset();
mockedSTS.on(AssumeRoleWithWebIdentityCommand).rejects();
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand).length).toEqual(1);
});
test('role assumption fails if access key id contains special characters', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS }));
mockedSTS.on(AssumeRoleCommand).resolves({
Credentials: {
AccessKeyId: 'asdf+',
SecretAccessKey: FAKE_STS_SECRET_ACCESS_KEY,
SessionToken: FAKE_STS_SESSION_TOKEN,
Expiration: new Date(8640000000000000),
},
});
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand).length).toEqual(12);
expect(core.setFailed).toHaveBeenCalledWith(
'Could not assume role with user credentials: AccessKeyId contains special characters.'
);
});
test('role assumption fails if secret access key contains special characters', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS }));
mockedSTS.on(AssumeRoleCommand).resolves({
Credentials: {
AccessKeyId: FAKE_STS_ACCESS_KEY_ID,
SecretAccessKey: 'asdf+',
SessionToken: FAKE_STS_SESSION_TOKEN,
Expiration: new Date(8640000000000000),
},
});
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand).length).toEqual(12);
expect(core.setFailed).toHaveBeenCalledWith(
'Could not assume role with user credentials: SecretAccessKey contains special characters.'
);
});
test('role assumption succeeds if keys have no special characters', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS }));
mockedSTS.on(AssumeRoleCommand).resolves({
Credentials: {
AccessKeyId: FAKE_STS_ACCESS_KEY_ID,
SecretAccessKey: FAKE_STS_SECRET_ACCESS_KEY,
SessionToken: FAKE_STS_SESSION_TOKEN,
Expiration: new Date(8640000000000000),
},
});
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand).length).toEqual(1);
});
test('max retries is configurable', async () => {
process.env['GITHUB_ACTIONS'] = 'true';
process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'] = 'test-token';
jest.spyOn(core, 'getInput').mockImplementation(
mockGetInput({
'role-to-assume': ROLE_ARN,
'aws-region': FAKE_REGION,
'retry-max-attempts': '15',
})
);
mockedSTS.reset();
mockedSTS.on(AssumeRoleWithWebIdentityCommand).rejects();
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand).length).toEqual(15);
expect(core.setFailed).toHaveBeenCalledWith('Could not assume role with OIDC: ');
});
test('max retries negative input does not retry', async () => {
process.env['GITHUB_ACTIONS'] = 'true';
process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'] = 'test-token';
jest.spyOn(core, 'getInput').mockImplementation(
mockGetInput({
'role-to-assume': ROLE_ARN,
'aws-region': FAKE_REGION,
'retry-max-attempts': '-1',
})
);
mockedSTS.reset();
mockedSTS.on(AssumeRoleWithWebIdentityCommand).rejects();
await run();
expect(mockedSTS.commandCalls(AssumeRoleWithWebIdentityCommand).length).toEqual(1);
expect(core.setFailed).toHaveBeenCalledWith('Could not assume role with OIDC: ');
});
test('role external ID provided', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'role-external-id': 'abcdef' }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
ExternalId: 'abcdef',
});
});
test('workflow name sanitized in role assumption tags', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(ASSUME_ROLE_INPUTS));
process.env = {
...process.env,
GITHUB_WORKFLOW:
'Workflow!"#$%&\'()*+, -./:;<=>?@[]^_`{|}~🙂💥🍌1yFvMOeD3ZHYsHrGjCceOboMYzBPo0CRNFdcsVRG6UgR3A912a8KfcBtEVvkAS7kRBq80umGff8mux5IN1y55HQWPNBNyaruuVr4islFXte4FDQZexGJRUSMyHQpxJ8OmZnET84oDmbvmIjgxI6IBrdihX9PHMapT4gQvRYnLqNiKb18rEMWDNoZRy51UPX5sWK2GKPipgKSO9kqLckZai9D2AN2RlWCxtMqChNtxuxjqeqhoQZo0oaq39sjcRZgAAAAAAA',
};
const sanitizedWorkflowName =
'Workflow__________+_ -./:__=__@____________1yFvMOeD3ZHYsHrGjCceOboMYzBPo0CRNFdcsVRG6UgR3A912a8KfcBtEVvkAS7kRBq80umGff8mux5IN1y55HQWPNBNyaruuVr4islFXte4FDQZexGJRUSMyHQpxJ8OmZnET84oDmbvmIjgxI6IBrdihX9PHMapT4gQvRYnLqNiKb18rEMWDNoZRy51UPX5sWK2GKPipgKSO9kqLckZa';
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: sanitizedWorkflowName },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
});
});
test('skip tagging provided as true', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'role-skip-session-tagging': 'true' }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: undefined,
});
});
test('skip tagging provided as false', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'role-skip-session-tagging': 'false' }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
});
});
test('skip tagging not provided', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
});
});
test('masks variables before exporting', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(ASSUME_ROLE_INPUTS));
const maskedValues: string[] = [];
const publicFields = ['AWS_REGION', 'AWS_DEFAULT_REGION'];
jest.spyOn(core, 'setSecret').mockImplementation((secret) => {
maskedValues.push(secret);
});
jest.spyOn(core, 'exportVariable').mockImplementation((name, value) => {
const val = String(value);
if (!maskedValues.includes(val) && !publicFields.includes(name)) {
throw new Error(`{value} for variable ${name} is not masked yet!`);
}
process.env[name] = val;
});
await run();
expect(core.exportVariable).toReturn();
});
test('inline policy and managed session policies are provided in assume role calls', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'inline-session-policy': 'inline' }));
jest
.spyOn(core, 'getMultilineInput')
.mockImplementation(mockGetMultilineInput({ 'managed-session-policies': MANAGED_SESSION_POLICY_INPUT }));
await run();
expect(mockedSTS.commandCalls(AssumeRoleCommand)[0]?.args[0].input).toEqual({
RoleArn: ROLE_ARN,
RoleSessionName: 'GitHubActions',
DurationSeconds: 3600,
Tags: [
{ Key: 'GitHub', Value: 'Actions' },
{ Key: 'Repository', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REPOSITORY },
{ Key: 'Workflow', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_WORKFLOW },
{ Key: 'Action', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_ACTION },
{ Key: 'Actor', Value: GITHUB_ACTOR_SANITIZED },
{ Key: 'Commit', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_SHA },
{ Key: 'Branch', Value: ENVIRONMENT_VARIABLE_OVERRIDES.GITHUB_REF },
],
Policy: 'inline',
PolicyArns: [
{ arn: 'arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess' },
{ arn: 'arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess' },
],
});
});
test('prints assumed role id', async () => {
jest.spyOn(core, 'getInput').mockImplementation(mockGetInput(ASSUME_ROLE_INPUTS));
await run();
expect(core.info).toHaveBeenCalledWith(`Authenticated as assumedRoleId ${FAKE_ASSUMED_ROLE_ID}`);
});
test('unsets credentials if enabled', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'unset-current-credentials': 'true' }));
await run();
expect(core.exportVariable).toHaveBeenCalledTimes(12);
});
test('sets credentials as output if enabled', async () => {
jest
.spyOn(core, 'getInput')
.mockImplementation(mockGetInput({ ...ASSUME_ROLE_INPUTS, 'output-credentials': 'true' }));
await run();
expect(core.setOutput).toHaveBeenCalledTimes(4);
});
});