Commit Graph

52 Commits

Author SHA1 Message Date
Seth Vargo
b011f3988e
Use our custom boolean parsing (#478)
Fixes GH-477
2025-04-24 11:53:29 -04:00
Seth Vargo
d1b27fe5c4
Add missing log line (#448) 2024-10-01 14:04:12 +00:00
Seth McCombs
699582eeaf
fix !project_id error message typo (#435)
<!--
Thank you for proposing a pull request! Please note that SOME TESTS WILL
LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from
forks.
Someone from the team will review your Pull Request and respond.

Please describe your change and any implementation details below.
-->

Small change! This error message seems like it's missing a word, so
based on the comment on line 202, I changed it
from
> `⚠️ Failed to a project ID from the given inputs.`

to

> `⚠️ Failed to compute a project ID from the given inputs`
2024-08-20 15:21:32 -07:00
Seth Vargo
984b9cfee9
Update deps (#430) 2024-08-05 16:15:15 -04:00
Seth Vargo
5e210ff4ed
Update spelling and workflow versions (#422)
Closes #421

---------

Signed-off-by: JGStew <james@jgstew.com>
Signed-off-by: JGStew <jamesgstewart2@gmail.com>
Co-authored-by: JGStew <james@jgstew.com>
Co-authored-by: JGStew <jamesgstewart2@gmail.com>
2024-06-21 11:57:04 -04:00
Seth Vargo
e0122d6a97
Add request_reason for plumbing though user-supplied audit information (#413)
Fixes https://github.com/google-github-actions/auth/issues/412
2024-05-14 16:46:35 +00:00
Seth Vargo
34baaec3f3
Switch to using universe helpers (#410) 2024-05-04 12:05:55 -04:00
Seth Vargo
bf02f20c66
Reduce warnings to info level with a warning icon (#397)
With direct WIF, there are now many legitimate use cases for not
specifying a project_id or having a local checkout.
2024-02-25 14:29:20 -05:00
Seth Vargo
b4f4057a10
Use an OAuth 2.0 access token for Domain-Wide Delegation (#388)
Fixes https://github.com/google-github-actions/auth/issues/387
2024-02-05 11:27:46 -05:00
Seth Vargo
39c96a3f1d
Remove retry logic (#389)
The retries make debugging strictly more complex, and it's not clear
that retrying provides actual value. If we need retries in the future,
we should push them down into the per-API level.
2024-02-02 21:10:46 +00:00
Seth Vargo
a57dd04655
Support newline-separated inputs for delegates and access_token_scopes (#381)
Fixes #380
2024-01-08 17:24:50 -05:00
Seth Vargo
7c4e01fd00
Make auth universe-aware (#352)
This adds support for making the action "universe" aware, so it will be
usable for TPC and GDCH.
2023-11-28 21:59:39 -05:00
Seth Vargo
fe9207673e
Add support for Direct Workload Identity auth (#348)
This adds a new authentication mode, Direct Workload Identity
Federation. This new mode permits authenticating to Google Cloud
directly using the GitHub Actions OIDC token instead of proxying through
a Google Cloud Service Account.
2023-11-28 10:41:10 -05:00
Seth Vargo
04900d1e97
Drop chai and mocha deps (#342) 2023-11-15 08:33:15 -05:00
Seth Vargo
14b54cc192
Emit a diff of each environment variable (#296)
Fixes https://github.com/google-github-actions/auth/issues/295
2023-04-17 22:52:00 +00:00
Seth Vargo
23620afd0f
Only emit a warning if the envvar has changed (#245) 2022-11-26 09:00:48 -05:00
Mike Verbanic
dcb0567d1a
fix: update doc versions (#240)
<!--
Thank you for proposing a pull request! Please note that SOME TESTS WILL
LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from
forks.
Someone from the team will review your Pull Request and respond.

Please describe your change and any implementation details below.
-->
2022-11-09 09:11:19 -05:00
Seth Vargo
c4e906d161
Add proxy support (#218) 2022-08-31 19:13:51 -04:00
Mike Verbanic
95a6bc2a27
feat: add retries (#181) 2022-05-23 15:17:21 -04:00
Seth Vargo
7c32666372
fix: repair a logic bug for domain-wide delegation (#178) 2022-05-18 10:04:31 -04:00
Seth Vargo
f322a0d1e2
fix: only emit warning if the lifetime exceeds 1 hour 2022-05-16 09:48:11 -04:00
Seth Vargo
d16fd896f7
feat: allow opt-out of exporting environment variables (#157)
This allows users to opt-out of exporting environment variables. This might be helpful if they **don't** want future steps to be authenticated, or if the exported environment variables conflict with other values.
2022-03-24 16:02:18 -05:00
Seth Vargo
48c46e6a59
feat: ensure cred file is created with a predictable name (#130) 2022-02-03 11:57:50 -06:00
Seth Vargo
736e11de40
chore: update deps and use isEmptyDir from utils (#119) 2022-01-26 17:47:12 -06:00
Seth Vargo
983a037dfb
feat: emit a warning when the workspace is empty (#117)
There have been a number of GitHub issues recently due to users not adding actions/checkout before calling "auth", which makes the credentials unavailable to future steps. Worse, some people are putting checkout _after_ auth, which overwrites the generated credentials with a checkout of the repo.

This adds a feature that emits a warning with the workspace is empty.
2022-01-26 15:27:51 -05:00
Seth Vargo
9b6531516d
bug: use actions-utils to emit HEAD warning (#102) 2021-12-30 15:00:21 +00:00
Seth Vargo
419a2c3bfe
chore: warn if the action is pinned to HEAD (#99) 2021-12-29 12:58:41 -05:00
Seth Vargo
443ae925ab
bug: only cleanup credentials if credentials were created (#96) 2021-12-23 11:39:54 -05:00
Seth Vargo
ec59fe8c8e
fix: switch to actions-utils and update deps (#91) 2021-12-22 10:45:18 -05:00
Seth Vargo
ac09c292a1
Update documentation and emit log messages (#85) 2021-12-09 17:27:21 -05:00
Seth Vargo
ccc7806970
Emit a better error when OIDC information is missing (#81) 2021-12-09 12:52:57 -05:00
Seth Vargo
8708e498da
Add support for Domain-Wide Delegation (#70) 2021-12-02 10:17:06 -06:00
Seth Vargo
057960bb62
Add util function for parsing durations and many more tests (#69) 2021-12-01 16:13:51 -05:00
Seth Vargo
1e9245c68a
Clean up exported credentials when the workflow finishes (#67)
* Clean up exported credentials when the workflow finishes

* Fix conditional and log
2021-12-01 11:38:47 -06:00
Seth Vargo
c6fa692def
Use strict everywhere (#68) 2021-11-30 13:23:28 -08:00
Bharath KKB
9a051ab76c
fix: export Google GHA creds env var (#57)
* fix: export Google GHA creds env var

* add comments for cred envvars

* build
2021-11-26 11:02:14 -05:00
Seth Vargo
ddbc4798b7
Make error message clearer that it came from auth 2021-11-25 14:26:11 -05:00
Seth Vargo
cc4b368646
Output more information in error about missing secrets (#55) 2021-11-22 11:51:55 -05:00
Seth Vargo
f56f5989ce
Pull user-agent version from module (#45) 2021-11-10 13:39:13 -06:00
Seth Vargo
2f0b4dbd9b
Add support for specifying authentication via JSON service account keys (#37)
* Add support for specifying authentication via JSON service account keys

* Update README.md

Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>

* Update README.md

Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>

* Update README.md

Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>

* Review feedback

* Undo interface

* Use TokenCreator instead

Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
2021-11-08 17:13:59 -05:00
Bharath KKB
d5a354ef10
chore: refactor WIF (#33)
* define common interfaces

* common base client

* refactor WIF to use interfaces and base client

* refactor main

* add build in CI

* add name for build step

* address comments

* fix import

* interface for credfile return

* regen dist
2021-10-12 23:17:42 -04:00
Seth Vargo
3fe2a3779a
Expand error message when GitHub envvars are not present (#31)
This points people to the GitHub Actions permissions documentation, which will help with troubleshooting token permission errors.
2021-10-06 11:26:23 -07:00
Seth Vargo
f3c3e206c9
Default audience to the WIF provider ID (#23) 2021-10-04 09:14:08 -07:00
Seth Vargo
02f3d58995
Clean up a few typescript warnings (#25) 2021-09-30 13:07:11 -07:00
Seth Vargo
fb26879445
Update references to google now (#8) 2021-09-21 19:30:30 -04:00
Seth Vargo
2dd133ffa2
Bump version 2021-09-21 18:11:17 -04:00
Seth Vargo
febe21311b
Add the ability to generate and export a credentials file (#7)
This credentials file can be passed to gcloud or other Google Cloud SDKs to automatically do the exchange.
2021-09-21 18:10:27 -04:00
Seth Vargo
ddb73aed67
Set user-agent header 2021-09-20 21:02:56 -04:00
Seth Vargo
cb396c3f31
Refactor to support access and id tokens (#3) 2021-09-18 12:12:21 -04:00
Bharath KKB
afef6a5b6d
feat: use actions/core for getting gh OIDC token (#2)
Co-authored-by: Seth Vargo <seth@sethvargo.com>
2021-09-18 11:35:52 -04:00