Credential cache key (role ARN) doesn't capture the full minted identity (subject + extra_claims)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- aws, rust
- Domain
- authentication, backend, security
Research direction
Start with get_credentials in crates/oidc-provider/src/lib.rs, then trace resolve_aws in backend_auth.rs and get_or_fetch in cache.rs. Compare the cache key with the minted identity tuple of role ARN, subject, and extra_claims. The work is done when differing identity inputs cannot reuse one cached credential while the current caller behavior remains valid.
Written by the indexing model from the issue text.
Description
Summary
The OIDC backend credential cache keys entries on the role ARN alone, while the credential that gets minted is a function of the full identity (role_arn, subject, extra_claims). Today those always co-vary, so there is no live vulnerability — but the key does not enforce that invariant, leaving a latent cross-identity credential-reuse hazard for future callers.
Surfaced during the review of #61 (shared single-flight credential cache).
Current behavior (not exploitable today)
OidcCredentialProvider::get_credentials(cache_key, exchange, subject, extra_claims)caches oncache_keybut federates usingsubject+extra_claims(crates/oidc-provider/src/lib.rs).- The only production caller,
AwsBackendAuth::resolve_aws(crates/oidc-provider/src/backend_auth.rs), derives both the key (role_arnfromoidc_role_arn) andsubject(fromoidc_subject, default"s3-proxy") from the sameBucketConfig, and always passesextra_claims = &[]. resolve_awsnever reads the inbound caller identity — the proxy federates as itself into the backend, and inbound authorization is enforced upstream. So two callers hitting the same OIDC bucket correctly share one backend STS session.
Because (role_arn, subject, extra_claims) move in lockstep per bucket config, the cache key is sufficient in the current code.
The latent risk
Nothing in the type system or the cache enforces that the key captures everything the minted JWT encodes. If a future caller ever passes a caller-derived subject or a non-empty extra_claims (e.g. per-caller source_identity for STS session tagging) while keeping the role_arn-based key, the cache would serve identity A's backend session to identity B — a real cross-identity credential leak.
The pre-#61 cache docstring even hinted at the ambiguity ("an opaque key the caller chooses — e.g. a role ARN, or the rendered OIDC subject"), so this predates the merge.
Recommended fix
Make the cache key derive from the full minted identity rather than trusting the caller to pass a sufficient key. E.g. have get_credentials compute the key internally from (role_arn, subject, extra_claims) (concatenated or hashed) instead of accepting a caller-supplied cache_key, so the key can never drift from what the JWT encodes.
Severity
Minor / latent — defense-in-depth. Not reachable on main today; worth closing before any caller-specific subject/extra_claims is introduced.
Pointers
crates/oidc-provider/src/lib.rs—get_credentialscrates/oidc-provider/src/backend_auth.rs—resolve_awscrates/oidc-provider/src/cache.rs—CredentialCache::get_or_fetch
- Dominant language
- Rust
- Stars
- 21
- Forks
- 1
- Avg merge
- 16h 39m
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developmentseed/multistore
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
developmentseed/multistore#160 ·
-
Support UploadPartCopy (multipart server-side copy): AWS CLI and boto3 use it for any copy over 8 MBOpenenhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
developmentseed/multistore#168 ·
-
List of a prefix 503s when a single object key contains an empty path segment (//)Possibly taken @alukach claimed this 127 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
developmentseed/multistore#116 · 1 comment ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
oidc-provider: optional `oidc_session_name` backend-option to override RoleSessionName derivationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
All issues in developmentseed/multistore
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
storytold/craft-anything#2472 ·
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsotto/sotto-authenticator#68 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
slavakurilyak/awesome-ai-agents#1046 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nowledge-co/hawdb#1995 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swc-project/swc-next-issues#984 ·