[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 Jan 26, 2026
Merged
Conversation
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)
(cherry picked from commit 128b2b5)
(cherry picked from commit 11f108d)
(cherry picked from commit 0595c5f)
(cherry picked from commit 71bdb33)
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic backport to
2.33-maintenance, triggered by a label in #14645.