Repository navigation
Conversation
A connection's `s3_web_identity_role` authentication may carry an `audience`. Absent or `sts.amazonaws.com` keeps today's behaviour. `scv1:conn:{id}`, the connection's own subject, is passed to multistore as `oidc_audience` so its assertions carry that `aud`. Any other value fails closed with `InvalidAudience` before credentials are minted, since an audience naming another connection would satisfy the check a role owner registers it for.
Depends on developmentseed/multistore#167, patched in from its branch until it is released.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XR9ZJnpPSJFK6LFSBxePNE
Contributor
|
🚀 Latest commit deployed to https://source-data-proxy-pr-267.source-coop.workers.dev
|
This branch was successfully deployed
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.
Implements the proxy side of ADR-012 §1 (per-connection audience for direct federation). A connection's
s3_web_identity_roleauthentication may now carry anaudience. When it is absent orsts.amazonaws.com, nothing changes. When it isscv1:conn:{id}, the connection's own subject, the proxy passes it to multistore as the newoidc_audiencebackend option, so the connection's assertions carry thataud. A role owner who registers exactly that client ID on their IAM OIDC provider then has STS reject tokens minted for any other connection before the trust policy is evaluated.Any other value fails closed with
InvalidAudiencebefore credentials are minted and with no backend options set. An audience naming another connection would satisfy the one check a role owner registers it for, so the proxy only honours the connection's own.Rollout is safe in either order. A proxy without this change ignores the field (serde skips unknown fields) and keeps sending
sts.amazonaws.com, so a connection that setsscv1:conn:{id}before this deploys fails at STS rather than succeeding under the shared audience. The source.coop side, which adds the field and lets a connection's manager switch it, is a separate PR.Depends on
developmentseed/multistore#167, which adds
oidc_audienceand scopes the credential cache by audience, so ADR-006's cache-key invariant holds without relying onaudbeing derived fromsub.Cargo.tomlpatches the multistore crates to that branch; this stays a draft until it is released and the patch is replaced with the version.Testing
cargo test(all suites) passes. New intests/backend_auth.rs:deserializes_audience,default_audience_sets_no_audience_option(absent andsts.amazonaws.com),own_audience_is_passed_to_the_provider, andanother_connections_audience_fails_closed(another connection's id, a suffixed subject, an arbitrary string; each errors with options left empty).cargo clippyandcargo checkforwasm32-unknown-unknownpass against the patched multistore.audience = scv1:conn:{id}against a role whose OIDC provider registers only that client ID. That needs the source.coop field and a staging deploy.ADRs
ADR-012 §1 describes this decision and still holds; this implements its proxy half, so the ADR is left as is. ADR-006's requirement that
audstay a pure function of the cache key is met by multistore#167 keying on the audience directly.🤖 Generated with Claude Code