Commit Graph

32 Commits

Author SHA1 Message Date
Dimitar
d00f6c6f41 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>
2023-06-14 21:43:04 +00:00
Eduard Marbach
c719b7b5e1 Feat: proxy implementation (#246)
* feat: implement proxy feature
* see #222

* refactor: pr changes

Co-authored-by: Peter Woodworth <44349620+peterwoodworth@users.noreply.github.com>
2022-11-17 23:35:16 +00:00
Tom Keller
6d8fe38ac8 Kellertk/packaging fix (#566)
* fix: packaging test failure

The tests fail if there are credentials available in the env, so
we need to get the AWS credentials *after* the package step.

* chore: remove unnecessary environment manipulation
2022-11-04 23:37:47 +00:00
Alexander Mancevice
5820660064 fix: Change role duration behavior (#513)
When a session token provided, use 1hr as role duration
Otherwise, use the max duration of GitHub action (6hr)
2022-10-10 23:29:04 +00:00
Parag Bhingre
133757e9b8 fix: OIDC Parallel Requests error 2022-01-12 10:36:47 -08:00
Richard H Boyd
036a4a1ddf feat: upgraded to new GH OIDC API (#284) 2021-10-18 18:33:08 +00:00
Richard H Boyd
a78fcb01f7 fix: reverting update to use new API (#274)
* Revert "chore: Update dist"

This reverts commit 9815921334.

* Revert "fix: Updated token retrieval to use new API (#270)"

This reverts commit 20ce4e5ba1.
2021-09-30 18:12:15 +00:00
Richard H Boyd
20ce4e5ba1 fix: Updated token retrieval to use new API (#270)
* feat: OIDC provider (with PR comments)

* feat: OIDC provider (with PR comments)

* updated OIDC based on new GH API
2021-09-29 23:29:33 +00:00
Richard H Boyd
b8c74de753 feat: added OIDC (#262)
* feat: OIDC provider (with PR comments)

* chore: Bump jest from 27.2.1 to 27.2.2 (#267)

Bumps [jest](https://github.com/facebook/jest) from 27.2.1 to 27.2.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/compare/v27.2.1...v27.2.2)

---
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>

* chore: Bump ansi-regex from 5.0.0 to 5.0.1 (#269)

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

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

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

* chore: Bump aws-sdk from 2.991.0 to 2.996.0 (#268)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.991.0 to 2.996.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.991.0...v2.996.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>

* chore: Update dist

* feat: OIDC provider (with PR comments)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <runner@fv-az209-487.sst5i0nymnhu5a1lxus1lxbvub.xx.internal.cloudapp.net>
2021-09-28 18:30:32 +00:00
Michael Nesta
8053174404 feat: Add the ability to use a web identity token file (#240)
* feat: Add the ability to use a web identity token file

* mark web identity token file as not required

* fix indentation

* better docs and added support for relative vs absolute paths

* bind sts context and adjust fs calls

* exclude tags if using web identity token file

* fix readme aand adjust tag removal logic

* undo re-ordering of lines

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-08-03 20:35:25 +00:00
Parag Sanjay Bhingre
4900858c22 fix: skips session tagging (#209) 2021-05-11 19:00:49 +00:00
Bill Wiens
ba5041f7bb fix: make GITHUB_REF env var optional (#82)
* fix: make GITHUB_REF env var optional

* Fix conflicts from #92

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-04 22:27:24 +00:00
allisaurus
df7d846161 fix: Mask assume role response in debug output (#102) 2020-07-29 17:43:15 +00:00
Clare Liguori
d19cafcdd1 feat: Add post-job action cleanup of credentials and region env vars (#101) 2020-07-29 16:03:44 +00:00
KeifferCulbreth
baf85d8be9 fix: Make tagging optional (#92)
* fix:making role session tagging optional

* test:improve test coverage

Add test to cover error thrown if access key exists and no secret key provided

* docs: Update README.md

Add details about skipping session tagging during role assumption

Co-authored-by: KeifferCulbreth <KeifferCulbreth@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-08 23:25:05 +00:00
Rodrigo Quezada
f04843b510 fix: add comma to set of special characters (#78)
* add comma to set

* add comma to set

* fix: test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-29 16:15:17 +00:00
Clare Liguori
472e549195 feat: Refresh and validate credentials after setting env var creds (#71)
* feat: Refresh and validate credentials after setting env var creds

* Positive test case

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-03 20:05:51 +00:00
Clare Liguori
0c2c1f7c12 fix: clear session token env var if present for non-session credentials (#65) 2020-05-26 04:00:51 +00:00
Clare Liguori
3d568d2c43 fix: validate region input string (#44) 2020-03-06 14:29:46 -08:00
Clare Liguori
a20ed60252 feat: don't require access key credentials for self-hosted runners (#42) 2020-03-06 17:59:39 +00:00
mergify[bot]
816f5cc0cf fix: mask both source and role credentials (#40) 2020-03-05 19:16:24 +00:00
Clare Liguori
96c6f7e07b feat: infer role ARN if given role name (#35) 2020-03-04 14:24:55 -08:00
Clare Liguori
1c435bbd5e feat: Add option to provide external ID (#32)
Fixes #28
2020-03-02 18:11:27 -08:00
Chuan-Yen Chiang
4d0082acf8 feat: Have an ability to configure session name (#29)
* 1. Add 'role-session-name' variable to action.yml
2. Configure roleSessionName with role-session-name from action or default value (GitHubActions)

* Add description on README.md

* update README.md

* update dist/index.js

* add test code

* update context based on comments
2020-03-01 11:47:10 -08:00
Laurence Armstrong
55f6a14016 fix: change sanitization character from '*' to '_' 2020-02-11 18:16:28 -08:00
Laurence Armstrong
ca04437296 Fix calling setSecret 2020-02-03 13:20:13 -05:00
Laurence Armstrong
4faf8cd19a fix: sanitize AWS session tags (#20)
* Sanitize github actor tag

* Add some tests

* Sanitize Github actions workflow name

* Change sanitization character to an asterisk

* Update readme about assuming a role

* Tidy up assume role readme entry more

* Align sanitize spelling to use -ize

* typo: environement -> environment
2020-01-30 21:33:36 -05:00
Laurence Armstrong
e2fd53ab66 fix: set role credentials as secrets to mask them in logs (#19)
* Set role credentials as secrets to mask them in logs

* Always set aws credentuals as secrets

* Fix typo in comment
2020-01-28 09:50:15 -05:00
Matt Bullock
25960ab095 feat: add support for assuming a role (#17)
* first draft attempt at adding role assumption option

* refinements

* const not var

* clean up asserts

* set explicit sts endpoint and clarify required inputs error message

* streamline mocks

* add new inputs to Action definition

* ignore .idea directory

* add initial assume role test

* make tests fail usefully when not in GitHub Actions

* add logic to handle suppression of stack trace

* pull credentials exports out into function

* convert environment variable patching to use object for source and add needed members

* add test for STS call

* compartmentalization and use custom user agent in role assumption STS client

* change DO_NOT_SUPRESS_STACK_TRACE to SHOW_STACK_TRACE

* update role-to-assume input description
2020-01-22 11:04:03 -08:00
Clare Liguori
da518c1c8a Add support for masking the AWS account ID from logs 2019-11-01 20:49:03 -07:00
Clare Liguori
3aa1c0e14d Various fixes
Remove file-based env vars
Add support for session credentials
Add account ID as an output
Remove testing actions workflow
2019-11-01 20:35:42 -07:00
Steve Winton
bb4ecd82fd Add initial implementation 2019-11-01 10:32:13 -07:00