Repository navigation
feat(aws): resolve assume-role profile chains through SSO sources - #954
Merged
Merged
Conversation
Move the SigV4 request-signing body into the shared AWS core so internal STS operations can use the exact same implementation as the public request signer without adding a dependency on the SigV4 service crate.
Resolve a selected role profile through its source_profile graph, load a named or legacy SSO source through the configured SSO slot, and assume each role in order with the previous hop's credential. Validate missing sources, cycles, conflicting or unsupported credential_source, region, and grant fields before STS or SSO network I/O, and keep role-chain/SSO failures from selecting a later identity.
PsiACE
approved these changes
Nov 19, 2026
Xuanwo
added a commit
that referenced
this pull request
Nov 19, 2026
Bring in the SSO AssumeRole provider chain and shared SigV4 signing options from #954, plus the latest CI and website dependency updates. Port the new shared signing path and role-chain tests to the two-layer Context CryptoProvider resolution: pass the resolved provider through sign_request_parts, generated signing keys, STS request construction, and the role-chain fixtures. Preserve #954's profile selection, explicit Single/Double canonicalization, S3 Express routing, and credential-chain error behavior.
Xuanwo
added a commit
that referenced
this pull request
Nov 20, 2026
Service-account token caching removed `UnwindSafe` and `RefUnwindSafe` from Google's `RequestSigner`, breaking downstream code that captures a signer in `catch_unwind`. Protect the bounded, synchronous cache operations with `std::sync::Mutex`, recover poisoned locks consistently with the refresh-lock registry, and retain the asynchronous locks around per-partition token exchanges. A compile-time assertion guards both public auto-trait implementations. Assign minor versions to crates with new public capabilities and align the root workspace dependency requirements: | Crate | Released | Next | New capability | | ------------------------ | -------- | ----- | --------------------------------------------------- | | `reqsign-aws-core` | 3.3.0 | 3.4.0 | Configurable canonical URI encoding | | `reqsign-aws-v4` | 3.4.0 | 3.5.0 | Signer configuration for canonical URI encoding | | `reqsign-aws-v4a` | 3.1.0 | 3.2.0 | Signer configuration for canonical URI encoding | | `reqsign-google` | 3.3.0 | 3.4.0 | Cloneable signer with a shared OAuth2 token cache | | `reqsign-huaweicloud-obs` | 3.0.8 | 3.1.0 | IAM agency credential granter and credential expiry | | `reqsign-oracle` | 3.0.8 | 3.1.0 | Signing caller-supplied request body headers | | `reqsign-tencent-cos` | 3.0.8 | 3.1.0 | STS `GetFederationToken` granter | | `reqsign-volcengine-tos` | 3.1.4 | 3.2.0 | STS `AssumeRole` granter and credential expiry | #954's SSO assume-role profile-chain resolution lands in the `reqsign-aws-core` and `reqsign-aws-v4` minors above. The remaining crates keep the patch bumps from #947, and the release remains `reqsign 0.20.9` with `reqsign-core 3.3.4`. ## Validation - `cargo fmt --all -- --check` and strict workspace Clippy with all targets and features. - `cargo test --no-fail-fast`: 811 passed, 6 ignored. - `cargo test --doc --workspace --all-features`: 76 passed, 6 ignored. - `cargo semver-checks` against `v0.20.8`: the other 14 crates pass patch-level checks. TOS and OBS report only `constructible_struct_adds_field` for `Credential.expires_at`, the intentional struct-literal break from #807 documented in each README changelog. - Supported WASM core/AWS checks. - Release helper tests and `plan.py` version alignment; all 16 planned versions are unpublished. - `cargo publish --workspace --dry-run` for the complete 16-crate publish plan. ## Existing MSRV limitation A fresh downstream resolution with the facade's `full` feature on Rust 1.86 fails for both published `reqsign 0.20.8` and this branch: `crypto-bigint 0.7.11` and `ctutils 0.4.8` require Rust 1.87. This is a pre-existing dependency-resolution issue, not introduced by this release. --------- Co-authored-by: Xuanwo <github@xuanwo.io>
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.
Fixes #856.
A selected profile with
role_arnnow resolvessource_profilereferences to a static or SSO base, loads a named or legacy inline SSO source through the configured SSO slot, and assumes each role in order with the previous hop's credential.AWS_PROFILEand explicitwith_profile(...)both drive the graph.no_sso()prevents SSO from participating, and role-chain or SSO failures stop resolution instead of selecting a later identity.The graph is validated before SSO or STS network I/O: missing source profiles, cycles, both or unsupported
credential_source, a missing STS region, and invalid grants produce actionable errors. Static sources,duration_seconds, andexternal_idare supported;credential_source-only role profiles remain explicitly unsupported.To execute STS from the profile provider without a core-to-v4 dependency cycle or a second signing implementation, the SigV4 request body moved into
reqsign-aws-core's hidden signing module and the publicRequestSignerdelegates to it. Crate boundaries and public re-exports are unchanged.Validation uses synthetic profiles and mocked HTTP only, with no live cloud credentials:
cargo fmt --all -- --checkcargo clippy -p reqsign-aws-core -p reqsign-aws-v4 --all-targets --all-features -- -D warningscargo test -p reqsign-aws-core -p reqsign-aws-v4cargo check -p reqsign-aws-core -p reqsign-aws-v4 --target wasm32-unknown-unknowncargo check -p reqsign --features fullCoverage includes explicit and
AWS_PROFILEselection, named SSO sources, multi-hop order and per-hop credentials, static sources,no_sso(), pre-I/O missing-source/cycle/conflict/region/invalid-ARN failures, and signer consumption of the final assumed credential.