mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-03-12 18:07:10 -04:00
* feat!: v3 release Squashed commit of the following: commit9df144b3aeMerge:19d3f3a131c7b6Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Aug 23 14:41:33 2023 -0700 Merge remote-tracking branch 'origin' into vNext commit131c7b6fd1Author: 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> commit6334b403ebAuthor: 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> commit19d3f3a169Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 20:13:39 2023 -0700 chore: update readme and changelog commit4403e8d882Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 17:12:47 2023 -0700 chore: update workflows commit0f1923f1a1Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 17:01:59 2023 -0700 chore: update .github with current commit60a9bf1676Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 17:00:14 2023 -0700 chore: update .github with current commitd3464b25f8Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 16:58:01 2023 -0700 chore: add examples to vNext branch commit7cd050ca4dAuthor: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 16:54:12 2023 -0700 chore: update readme commit0e32a13775Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 16:19:17 2023 -0700 chore: update readme commit2625b45d56Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 18 15:12:36 2023 -0700 chore: update readme commit19eb4df27eAuthor: peterwoodworth <woodwoop@amazon.com> Date: Thu Aug 17 17:22:20 2023 -0700 chore: update readme commit71ff793a0fAuthor: peterwoodworth <woodwoop@amazon.com> Date: Thu Aug 17 17:18:42 2023 -0700 chore: update readme commita272f95336Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Aug 16 17:05:42 2023 -0700 chore: update readme commit360ea313a7Author: 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> commitde93b00c9fAuthor: 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> commit4dd1aeed85Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 11 16:41:44 2023 -0700 chore: remove unused dependency, fixing vulnerability commit7f4507af3cAuthor: peterwoodworth <woodwoop@amazon.com> Date: Fri Aug 11 16:24:09 2023 -0700 fix: maxRetry hit infinite loop with negative input commit746d33e7c1Author: 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> commit706fc9ae3dAuthor: 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> commit9918371ad5Author: 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> commit345462ab9eAuthor: 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> commit80a7a6c2a2Author: 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> commit385d7e1d64Author: 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> commit48560b5d49Author: 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> commit35d8f9588bAuthor: Shailja Khurana <117320115+khushail@users.noreply.github.com> Date: Fri Jul 14 15:14:02 2023 -0700 added workflow for handling answerable discussions (#772) commit86df881b31Author: 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) commita621db3279Author: 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> commit90858a2e70Author: 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> commit228a9916eeAuthor: Tom Keller <1083460+kellertk@users.noreply.github.com> Date: Fri Jul 7 16:49:10 2023 -0700 Update README.md for OIDC changes (#764) commit65c2143642Author: peterwoodworth <woodwoop@amazon.com> Date: Thu Jul 6 15:19:05 2023 -0700 chore: add final tests, add outputs to action.yml commit7b893ba14bAuthor: peterwoodworth <woodwoop@amazon.com> Date: Wed Jul 5 18:55:04 2023 -0700 feat: getIDToken retry, feat: special character in key retry commit3c981da079Author: 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> commit222080786bAuthor: 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> commitaa2675f083Author: peterwoodworth <woodwoop@amazon.com> Date: Mon Jul 3 16:13:19 2023 -0700 implement last changes for vNext commit256d740e71Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Jun 30 16:20:47 2023 -0700 chore: remove unnecessary step in unit test job commitcd5cd29d7fAuthor: peterwoodworth <woodwoop@amazon.com> Date: Fri Jun 30 16:17:47 2023 -0700 chore: declare eol in gitattributes commit7b90497500Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Jun 30 16:11:12 2023 -0700 chore: disable auto crlf in unit tests commitfb67439785Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Jun 30 15:48:15 2023 -0700 fix boolean input commit2b32a8f2c6Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Jun 30 15:40:41 2023 -0700 fix webIdentityTokenFile option, rearrange validation logic commit7526948ef9Author: 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 commit0270d0bcecAuthor: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com> Date: Tue Jun 27 14:22:02 2023 -0700 chore: update readme with new thumbprint (#755) commit4b8efb08dbAuthor: 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> commitd26f2d03f8Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Jun 21 16:45:34 2023 -0700 feat: role-chaining commit20f59875feAuthor: peterwoodworth <woodwoop@amazon.com> Date: Wed Jun 21 15:13:42 2023 -0700 feat: optional policy inputs when assuming role commit10024331f6Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Jun 21 15:08:37 2023 -0700 feat: optional policy inputs when assuming role commit2cee35f9a9Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Jun 21 14:51:50 2023 -0700 feat: optional policy inputs when assuming role commit8aa25a5cb6Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Jun 21 14:50:04 2023 -0700 feat: optional policy inputs when assuming role commite849bae717Author: peterwoodworth <woodwoop@amazon.com> Date: Tue Jun 20 18:02:34 2023 -0700 chore: remove windows self-hosted runner commit8a5ae330ddAuthor: peterwoodworth <woodwoop@amazon.com> Date: Tue Jun 20 16:10:30 2023 -0700 chore: expand integ tests commit819a6d1c74Author: 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> commite57babb541Author: 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> commitc613996f9aAuthor: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 18:38:44 2023 -0700 chore: attempting to get to minimal integ test success commitc13a9c8ef3Author: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 18:36:40 2023 -0700 chore: attempting to get to minimal integ test success commitb98e10c776Author: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 18:25:03 2023 -0700 chore: set failing configuration on integ workflow matrix commit6d193465aeAuthor: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 16:32:19 2023 -0700 chore: remove push workflow trigger commita8f18666dbAuthor: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 16:29:33 2023 -0700 chore: fix workflow file indentation commit7dec5a88ceAuthor: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 16:28:05 2023 -0700 chore: update workflow to be able to trigger commit0a8178a52aAuthor: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 16:21:45 2023 -0700 chore: update workflow to be able to trigger commit506b27277dAuthor: peterwoodworth <woodwoop@amazon.com> Date: Mon Jun 19 16:17:53 2023 -0700 chore: update workflow to be able to trigger commit5fd3084fc3Author: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com> Date: Wed Jun 14 15:02:32 2023 -0700 chore: update changelog for release (#745) commitd00f6c6f41Author: 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> commitae734070a0Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Jun 13 04:55:26 2023 +0000 chore: Update dist commit3d528c5f7dAuthor: 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> commite7aae61719Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Jun 6 03:59:43 2023 +0000 chore: Update dist commit979ee1f6f4Author: 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> commit184acc09eaAuthor: 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> commit375a690dc0Author: 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> commit8337ca3433Author: 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> commit5727f247b6Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue May 30 03:59:04 2023 +0000 chore: Update dist commitde3676366fAuthor: 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> commit81fba9ea6aAuthor: 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) commit8815b6557cAuthor: 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> commit3d77523f10Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue May 23 03:58:44 2023 +0000 chore: Update dist commit4eb7afece4Author: 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> commitd713a182c5Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue May 16 03:58:29 2023 +0000 chore: Update dist commit1910078421Author: 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> commit580afbba80Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue May 9 03:59:53 2023 +0000 chore: Update dist commit1daf2a1967Author: 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> commit76ad093bd5Author: 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> commit6fbd316fd1Author: 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> commit19f3a6d67fAuthor: 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> commit96aac45bfcAuthor: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue May 2 03:58:25 2023 +0000 chore: Update dist commit5e6a264592Author: 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> commit82ea2d2853Author: 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> commite0213bba7aAuthor: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Apr 25 03:59:31 2023 +0000 chore: Update dist commit2beda2fb7cAuthor: 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> commit0afc5d47c7Author: 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> commit31bd3ae2dbAuthor: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Apr 18 03:59:23 2023 +0000 chore: Update dist commit46648cb772Author: 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> commit60a5c129d0Author: Jonathan Lang <jonathan.lang@tngtech.com> Date: Wed Apr 12 00:46:13 2023 +0200 Fix Typo in README.md (#707) commitf576cc9d9bAuthor: 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> commit9c17403327Author: 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> commit9c1a10e79cAuthor: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Apr 11 03:58:34 2023 +0000 chore: Update dist commit9192d9ecb4Author: 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> commit26227bfa7dAuthor: peterwoodworth <woodwoop@amazon.com> Date: Wed Mar 22 16:52:04 2023 -0700 chore: adjust cleanup build target commit0d90ddd1f2Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Mar 22 16:51:12 2023 -0700 chore: adjust cleanup build again commitfc80f28dbaAuthor: peterwoodworth <woodwoop@amazon.com> Date: Wed Mar 22 16:37:58 2023 -0700 chore: adjust cleanup build and some imports commit3088522ce8Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Mar 22 16:32:37 2023 -0700 chore: build and set cleanup file commit0181111f1dAuthor: peterwoodworth <woodwoop@amazon.com> Date: Wed Mar 22 15:12:07 2023 -0700 chore: build action commitb723544115Author: peterwoodworth <woodwoop@amazon.com> Date: Wed Mar 22 15:08:39 2023 -0700 fix: branch name is not sanitized, slight refactor commit0e613a0980Author: 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 commit12d07d4800Author: Tom Keller <kellertk@amazon.com> Date: Fri Mar 17 17:46:57 2023 -0700 feat: update tests commitf6fdf0cdbdAuthor: 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 commitcb1361ade3Author: 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) commitf9f25e69f5Author: peterwoodworth <woodwoop@amazon.com> Date: Fri Mar 10 14:35:59 2023 -0800 refactor, add new major version features and proxy commit83f0e97b2fMerge:7fc5f08f86a0c3Author: 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 commitf86a0c30a5Author: Fabien Foerster <f.foerster@bevolta.com> Date: Tue Mar 7 21:29:17 2023 +0100 Update README examples to use v2 commit7fc5f080e5Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Mar 7 01:02:37 2023 +0000 chore: Update dist commitffc08eae73Author: Tom Keller <kellertk@amazon.com> Date: Mon Mar 6 17:01:09 2023 -0800 Rename master to main commite1e17a757eAuthor: 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 commitbab55d3830Author: 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> commit07b737a14fAuthor: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Feb 28 04:00:33 2023 +0000 chore: Update dist commit26e4efa71fAuthor: 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> commit7e0ecf0346Author: 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> commit567d4149d6Merge:32eb1b485ec61bAuthor: 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 commit32eb1b4a66Author: 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> commit6ca2577643Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Wed Feb 22 02:34:29 2023 +0000 chore: Update dist commitf1de076135Author: 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> commit077fd1fc8fAuthor: 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> commit1416c559c0Author: 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> commitc3f9f9cde3Author: 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> commit1a61b71d4cAuthor: 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> commit07d5781915Author: 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> commit5ed46d9d6aAuthor: 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> commit0d34112acbAuthor: 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> commitfa45146389Author: 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> commita075dc0410Author: 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> commit3e21ee4ae7Author: 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> commit491cd39cf6Author: 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> commit3654529dc6Author: 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> commitaa5a031041Author: 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> commit55443b3d5bAuthor: 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> commit48f0cb7848Author: 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> commit90d1b38cb5Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Dec 13 03:05:43 2022 +0000 chore: Update dist commit422c797285Author: 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> commit4b942d82b0Author: GitHub Actions <github-aws-sdk-osds-automation@amazon.com> Date: Tue Dec 6 03:10:45 2022 +0000 chore: Update dist commit7437ed192eAuthor: 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> commited4ba44f95Author: 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> commit10dc6d923aAuthor: 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
848 lines
32 KiB
TypeScript
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);
|
|
});
|
|
});
|