Skip to content

Adopt the SDK's AWS_EC2_METADATA_DISABLED and credential_process rules - #2054

Draft
passaro wants to merge 1 commit into
sdk-m1/sts-region-as-crtfrom
sdk-m1/adopt-sdk-credential-rules
Draft

passaro wants to merge 1 commit into
sdk-m1/sts-region-as-crtfrom
sdk-m1/adopt-sdk-credential-rules

Conversation

@passaro

@passaro passaro commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

This change adopts two rules of the new chain that differ from Mountpoint's CRT chain:

  • AWS_EC2_METADATA_DISABLED disables instance metadata only when it is true, as in the AWS SDKs. The CRT chain treats any value other than false as true, so a value such as 1 no longer disables it. Mountpoint's own instance metadata client, which detects the region and the instance type, follows the same rule, so that a value doesn't disable instance metadata for one and not for the other. true also applies to profiles with credential_source = Ec2InstanceMetadata, which the CRT's profile provider ignores.
  • The output of a credential_process command must include "Version": 1, as the AWS CLI documents. The CRT chain ignores the field.

The configuration guide documents the first rule, and the mountpoint-s3 changelog lists both. In the parity suite, the two scenarios become documented differences (📝), a new scenario records the credential_source case as one too, and only the two slow scenarios on static keys still have a known difference.

Does this change impact existing behavior?

Yes: AWS_EC2_METADATA_DISABLED set to a value other than true or false, such as 1, no longer stops Mountpoint from using instance metadata to detect the region and the instance type. For credentials, nothing uses the new chain yet.

Does this change need a changelog entry? Does it require a version change?

Nested bullets in the mountpoint-s3 credentials entry, and an entry in the mountpoint-s3-client changelog.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@passaro
passaro requested a deployment to PR integration tests November 19, 2026 22:52 — with GitHub Actions Waiting
@passaro
passaro added this pull request to stack #2057 November 19, 2026 22:52
@passaro
passaro force-pushed the sdk-m1/adopt-sdk-credential-rules branch from 046750c to 64f2db6 Compare November 20, 2026 00:43
@passaro
passaro requested a deployment to PR integration tests November 20, 2026 00:43 — with GitHub Actions Waiting
@passaro
passaro force-pushed the sdk-m1/adopt-sdk-credential-rules branch from 64f2db6 to 1a8e953 Compare November 20, 2026 11:52
@passaro
passaro requested a deployment to PR integration tests November 20, 2026 11:52 — with GitHub Actions Waiting
@passaro
passaro force-pushed the sdk-m1/adopt-sdk-credential-rules branch from 1a8e953 to 834fa09 Compare November 24, 2026 06:15
@passaro
passaro requested a deployment to PR integration tests November 24, 2026 06:15 — with GitHub Actions Waiting
@passaro
passaro force-pushed the sdk-m1/adopt-sdk-credential-rules branch from 834fa09 to 7e71275 Compare November 24, 2026 15:22
@passaro
passaro requested a deployment to PR integration tests November 24, 2026 15:22 — with GitHub Actions Waiting
The SDK credentials chain disables instance metadata only when
`AWS_EC2_METADATA_DISABLED` is `true`, and requires `"Version": 1` in
the output of a `credential_process` command, as the AWS CLI does. The
CRT's chain disables instance metadata for any value but `false`, and
ignores `Version`. Adopt the SDK's rules, and document the first in the
configuration guide.

Mountpoint's own instance metadata client, which detects the region and
the instance type, follows the same rule, so that a value such as `1`
doesn't disable instance metadata for one and not for the other.

Signed-off-by: Alessandro Passaro <alexpax@amazon.com>
@passaro
passaro force-pushed the sdk-m1/adopt-sdk-credential-rules branch from 7e71275 to fddbc1b Compare November 24, 2026 17:11
@passaro
passaro requested a deployment to PR integration tests November 24, 2026 17:11 — with GitHub Actions Waiting

This branch is waiting to be deployed

1 waiting deployment
PR integration tests — fddbc1ba Waiting Nov 24, 2026 by passaro via Integration / Approval Gate #4955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant