Sai Sunder
6242fa9171
google/internal: Add AWS Session Token to Metadata Requests
...
AWS released a new instance metadata service (IMDSv2). IMDSv2 brought a requirement that a session token header is now required on every call to metadata endpoint.
Modify the AWS credential retrieval flow to fetch the session token and send it along with the calls to metadata endpoints
Change-Id: I539912ab38f5e591658b29a1e7a99d2b828a1128
GitHub-Last-Rev: 29e1f4aad1
GitHub-Pull-Request: golang/oauth2#554
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/390794
Reviewed-by: Cody Oss <codyoss@google.com >
Trust: Cody Oss <codyoss@google.com >
Run-TryBot: Cody Oss <codyoss@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Leo Siracusa <leosiracusa@google.com >
Trust: Tyler Bui-Palsulich <tbp@google.com >
2022-03-09 15:54:54 +00:00
Cody Oss
d3ed0bb246
google/internal/externalaccount: fix flaky tests
...
It seems like these handful of test would fail because of issues
related to timings. When running the tests there was sometimes a
second scew from when the subjectToken got and want were calculated.
Switched them all to use a static clock so the time portion will
never differ.
Fixes golang/go#49339
Change-Id: Ia2e4e140526ee1fc37fa9d24765cd8ec3033ea22
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/361354
Trust: Cody Oss <codyoss@google.com >
Run-TryBot: Cody Oss <codyoss@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
2021-11-04 18:04:15 +00:00
Patrick Jones
7df4dd6e12
google/externalaccount: validate tokenURL and ServiceAccountImpersonationURL
...
Change-Id: Iab70cc967fd97ac8e349a14760df0f8b02ddf074
GitHub-Last-Rev: ddf4dbd0b7
GitHub-Pull-Request: golang/oauth2#514
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/340569
Reviewed-by: Patrick Jones <ithuriel@google.com >
Reviewed-by: Cody Oss <codyoss@google.com >
Reviewed-by: Chris Broadfoot <cbro@golang.org >
Trust: Cody Oss <codyoss@google.com >
Run-TryBot: Cody Oss <codyoss@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-08-17 22:35:10 +00:00
gIthuriel
14747e66f6
google: check additional AWS variable
...
AWS_DEFAULT_REGION should have been checked as a backup to AWS_REGION but wasn't. Also removed a redundant print statement in a test case.
Change-Id: Ia6e13eb20f509110a81e3071228283c43a1e9283
GitHub-Last-Rev: 1a10bcc079
GitHub-Pull-Request: golang/oauth2#486
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/302789
Reviewed-by: Cody Oss <codyoss@google.com >
Trust: Cody Oss <codyoss@google.com >
Trust: Tyler Bui-Palsulich <tbp@google.com >
2021-06-22 16:52:04 +00:00
Ryan Kohler
66670185b0
google: Changes required to get AWS working in manual testing
...
• Subject Token needs to be query escaped
• Null options need to be omitted (like they are in other languages)
Change-Id: I67d1ed3ba96a35283a8928f196bc7e912084d1ab
GitHub-Last-Rev: 1aae076a90
GitHub-Pull-Request: golang/oauth2#474
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/290513
Reviewed-by: Cody Oss <codyoss@google.com >
Trust: Cody Oss <codyoss@google.com >
Trust: Tyler Bui-Palsulich <tbp@google.com >
Run-TryBot: Cody Oss <codyoss@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-02-10 19:26:28 +00:00
Ryan Kohler
010130855d
google: support AWS 3rd party credentials
...
Change-Id: I655b38f7fb8023866bb284c7ce80ab9888682e73
GitHub-Last-Rev: 648f0b3d45
GitHub-Pull-Request: golang/oauth2#471
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/287752
Reviewed-by: Cody Oss <codyoss@google.com >
Run-TryBot: Cody Oss <codyoss@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
Trust: Tyler Bui-Palsulich <tbp@google.com >
Trust: Cody Oss <codyoss@google.com >
2021-02-01 16:38:06 +00:00
Ryan Kohler
af13f521f1
google: Create AWS V4 Signing Utility
...
Change-Id: I59b4a13ed0433de7dfaa064a0f7dc1f3dd724518
GitHub-Last-Rev: 8cdc6a9ad0
GitHub-Pull-Request: golang/oauth2#467
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/284632
Run-TryBot: Cody Oss <codyoss@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
Trust: Cody Oss <codyoss@google.com >
Trust: Tyler Bui-Palsulich <tbp@google.com >
Reviewed-by: Cody Oss <codyoss@google.com >
2021-01-25 20:13:02 +00:00