Require explicit confirmation for no-initiator SAML captures - #1
Open
abhiunix wants to merge 1 commit into
Open
Conversation
A SAML POST with a missing initiator was treated as trusted and, for a single-role assertion, auto-assumed and cached credentials with no user interaction. A legitimate IdP auto-submit form is indistinguishable from a replayed/forged top-level POST, so this allowed a still-valid captured assertion to silently mint up-to-12h credentials. isAcceptableSamlPost now distinguishes trusted-initiator captures (may auto-assume one role) from untrusted/no-initiator captures (parked as pending, needsConfirm=true). The popup surfaces a confirm/assume step for these even when only one role is present; the existing selectRole path still validates the chosen roleArn against the stored assertion before calling STS. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Removes implicit trust in the missing-initiator path of
isAcceptableSamlPost. Today aSAMLResponsePOST withdetails.initiator === undefinedis treated as trusted, and a single-role assertion is auto-assumed and cached with no user interaction. This PR requires explicit confirmation for any capture that does not come from a trusted Okta initiator.pending(needsConfirm=true); the popup shows a confirm/assume step even for a single role.selectRolepath still validates the chosenroleArnagainst the stored assertion before calling STS, so no new trust is introduced.Impact
This extension materializes AWS credentials in the browser that the normal console SAML flow never exposes to the client. The capture trigger is therefore a security boundary. Because a legitimate IdP auto-submit form (no-referrer,
main_frame, no initiator) is indistinguishable from a replayed or forged top-level POST, thetabId>=0/main_framechecks do not separate attacker from IdP. STS's signature check prevents forging an assertion but does not prevent replaying a still-valid one.Attack scenarios
After this change, none of these mint credentials without an explicit user click.
Test plan
roleArnagainst the stored assertion🤖 Generated with Claude Code