Skip to content

fix(auth): enable AWS SDK SSO credential resolver#87

Merged
bryantbiggs merged 1 commit intomainfrom
fix/aws-sso-credentials
May 5, 2026
Merged

fix(auth): enable AWS SDK SSO credential resolver#87
bryantbiggs merged 1 commit intomainfrom
fix/aws-sso-credentials

Conversation

@bryantbiggs
Copy link
Copy Markdown
Member

Summary

  • Enables the sso Cargo feature on aws-config so AWS SSO profiles in ~/.aws/config resolve correctly via the SDK profile chain.
  • Adds 4 multiple-versions skips to deny.toml for the RustCrypto v0.10-era duplicates (block-buffer, cpufeatures, crypto-common, digest) pulled in transitively by aws-sdk-sso's sha1 = "0.10" dep.
  • Documents SSO in the ECR auth credential chain.

Closes #84.

Why

aws-config gates SSO credential resolution behind a Cargo feature; without it the profile resolver returns ProfileFile provider could not be built: This behavior requires following cargo feature(s) enabled: sso. The user reported failure was an AWS_PROFILE referencing an SSO session, hitting exactly this path.

No code changes — the SDK profile resolver picks up SSO automatically once the feature is compiled in. Users still run aws sso login (or equivalent) to populate the OIDC token cache; ocync only consumes the cache.

Cost evaluation

Metric Before After Delta
Release binary 7,635,296 B 8,000,672 B +365 KB (+4.8%)
Crates in lockfile baseline +9 aws-sdk-sso, aws-sdk-ssooidc, sha1, block-buffer, cpufeatures, crypto-common, digest, generic-array, version_check

Small delta thanks to release profile (lto = true, strip = true, codegen-units = 1) — most unreached SDK operations strip out, and the smithy runtime is shared with existing aws-sdk-ecr / aws-sdk-sts.

GitHub HEAD of awslabs/aws-sdk-rust (sha ed385962) and smithy-lang/smithy-rs were both checked — both still pin sha1 = "0.10". No open issue requesting a bump. Pinning to a newer SHA does not avoid the duplicates; the deny.toml skips are the right answer (matches the existing 6-entry pattern).

Test plan

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test (276 passed, 1 ignored)
  • cargo deny check (advisories ok, bans ok, licenses ok, sources ok)
  • npm run --prefix docs build
  • Manual verification with an SSO profile (cannot reproduce in CI; the original reporter's chain=ProfileChain { base: Sso { ... } } log line is the exact code path now enabled)

Profile-based credentials backed by AWS IAM Identity Center (SSO)
failed with "ProfileFile provider could not be built: This behavior
requires following cargo feature(s) enabled: sso." Enable the sso
feature on aws-config so the profile resolver can drive the
SSO/SSO-OIDC flow against the cached OIDC token under
~/.aws/sso/cache/.

aws-sdk-sso pulls sha1 0.10 (RustCrypto v0.10 era) for cache-filename
hashing while chacha20/google-cloud-auth already pull v0.11; the four
new skip entries in deny.toml mirror the existing pattern. Binary
grows ~365 KB (+4.8%, 7.28 MB to 7.63 MB) thanks to LTO+strip.

Closes #84
@bryantbiggs bryantbiggs merged commit 99b72d3 into main May 5, 2026
16 checks passed
@bryantbiggs bryantbiggs deleted the fix/aws-sso-credentials branch May 5, 2026 19:27
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.

Authentication failed with AWS SSO profile

1 participant