Skip to content

Commit 1a0ff77

Browse files
fix: External credential spec
* fix: Name of special header for AWS credential The JSON example is correct. See b/151677419 for more context. * fix: Signed headers list in AWS example All the headers in the example, except for Authorization itself should be included on the signed header list. * fix: IMDSV2 token should only be fetched if needed No need to fetch the token if environment variables for both the region and the security credentials have been provided.
1 parent 4497cf0 commit 1a0ff77

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

aip/auth/4117.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ The auth libraries and applications **must** follow the steps below:
240240
**imdsv2_session_token_url** fields if they are provided. The host should
241241
either be **169.254.169.254** or **fd00:ec2::254**.
242242
- If **imdsv2_session_token_url** is available, then fetch session token
243-
from **imdsv2_session_token_url**.
243+
from **imdsv2_session_token_url**. Note: only perform this step if you
244+
need to communicate with the metadata server to fetch the region and/or
245+
the security credentials
244246
- Check the environment variables in the following order (`AWS_REGION` and
245247
then the `AWS_DEFAULT_REGION`) to determine the AWS region. If found, skip
246248
using the AWS metadata server to determine this value.
@@ -277,7 +279,7 @@ The auth libraries and applications **must** follow the steps below:
277279
"key": "x-amz-date"
278280
},
279281
{
280-
"value": "AWS4-HMAC-SHA256 Credential=AKIASOZTBDV4D7ABCDEDF/20200228/us-east-1/sts/aws4_request, SignedHeaders=host;x-amz-date,Signature=abcedefdfedfd",
282+
"value": "AWS4-HMAC-SHA256 Credential=AKIASOZTBDV4D7ABCDEDF/20200228/us-east-1/sts/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token;x-goog-cloud-target-resource, Signature=abcedefdfedfd",
281283
"key": "Authorization"
282284
},
283285
{
@@ -293,7 +295,7 @@ The auth libraries and applications **must** follow the steps below:
293295
"body": ""
294296
}
295297
```
296-
For the AWS token, STS requires a special header `x-goog-cloud-endpoint` to recognize that the token is for a specific workload identity provider.
298+
For the AWS token, STS requires a special header `x-goog-cloud-target-resource` to recognize that the token is for a specific workload identity provider.
297299

298300
### Determining the subject token in Microsoft Azure and URL-sourced credentials
299301

@@ -531,6 +533,7 @@ The auth libraries and applications **must** follow the steps below:
531533

532534
## Changelog
533535

536+
- **2025-10-17**: Corrections in specification and examples for External Account Credentials (AIP 4117).
534537
- **2021-12-10**: Add AIP for External Account Credentials (AIP 4117).
535538
- **2022-05-18**: Document executable-sourced credentials (AIP 4117).
536539
- **2022-08-31**: Document configurable token lifetime (AIP 4117).

0 commit comments

Comments
 (0)