Skip to content

[Backport 2.33-maintenance] feat(libstore): add AWS SSO support for S3 authentication#15084

Merged
internal-nix-ci[bot] merged 8 commits into2.33-maintenancefrom
backport-14645-to-2.33-maintenance
Jan 26, 2026
Merged

[Backport 2.33-maintenance] feat(libstore): add AWS SSO support for S3 authentication#15084
internal-nix-ci[bot] merged 8 commits into2.33-maintenancefrom
backport-14645-to-2.33-maintenance

Conversation

@internal-nix-ci
Copy link

Automatic backport to 2.33-maintenance, triggered by a label in #14645.

Mic92 and others added 8 commits January 26, 2026 18:03
This enables seamless AWS SSO authentication for S3 binary caches
without requiring users to manually export credentials.

This adds SSO support by calling aws_credentials_provider_new_sso() from
the C library directly. It builds a custom credential chain: Env → SSO →
Profile → IMDS

The SSO provider requires a TLS context for HTTPS connections to SSO
endpoints, which is created once and shared across all providers.

(cherry picked from commit ec91479)
Add validation for TLS context and client bootstrap initialization,
with appropriate error messages when these fail. The TLS context failure
is now a warning that gracefully disables SSO, while bootstrap failure
throws since it's required for all providers.

(cherry picked from commit 3c8e45c)
The default (empty) profile case was using CreateCredentialsProviderChainDefault
which didn't properly support role_arn/source_profile based role assumption via
STS because TLS context wasn't being passed to the Profile provider.

This change unifies the credential chain for all profiles (default and named),
ensuring:
- Consistent behavior between default and named profiles
- Proper TLS context is passed for STS operations
- SSO support works for both cases

(cherry picked from commit 508d446)
The SSO provider was unconditionally setting profile_name_override to
the (potentially empty) profile string from the S3 URL. When profile
was empty, this prevented the AWS CRT SDK from falling back to the
AWS_PROFILE environment variable.

Only set profile_name_override when a profile is explicitly specified
in the URL, allowing the SDK's built-in AWS_PROFILE handling to work.

(cherry picked from commit 453dbab)
@internal-nix-ci internal-nix-ci bot enabled auto-merge January 26, 2026 18:03
@internal-nix-ci internal-nix-ci bot merged commit 534de0d into 2.33-maintenance Jan 26, 2026
19 checks passed
@internal-nix-ci internal-nix-ci bot deleted the backport-14645-to-2.33-maintenance branch January 26, 2026 18:44
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.

2 participants