Skip to content

Make invite email-binding enforcement opt-in - #56

Merged
woksin merged 2 commits into
mainfrom
fix/invite-email-binding-opt-in
Jul 14, 2026
Merged

Make invite email-binding enforcement opt-in#56
woksin merged 2 commits into
mainfrom
fix/invite-email-binding-opt-in

Conversation

@woksin

@woksin woksin commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the invite trust-boundary hardening (#55). That change added Invite.EmailClaim with a default of email, which meant gateway email-binding enforcement turned on automatically for any deployment whose invite tokens already carry an email claim — a policy change imposed on framework consumers by upgrade alone, and one that could reject invites that were previously accepted.

This makes the gateway enforcement opt-in while keeping the useful, low-risk half unconditional: the authenticating account's verified email is still always forwarded to the exchange endpoint, so an app can enforce the invited-email/authenticated-email binding itself. Deployments that want AuthProxy to reject a mismatched account at the gateway now enable it explicitly by setting Invite.EmailClaim.

Phase-2 token re-validation (the signature/issuer/audience/lifetime re-check from #55) is unaffected and stays on.

Changed

  • Invite.EmailClaim now defaults to empty, so gateway email-binding enforcement is off by default. Set it (for example to email) to require the authenticated account's verified email to match the invited email at the Phase-2 exchange. The verified email is forwarded to the exchange endpoint regardless of this setting, so the backend can still enforce the binding itself.

woksin and others added 2 commits July 14, 2026 10:19
Invite.EmailClaim defaulted to 'email', which silently turned gateway email
binding on for any deployment whose invite tokens already carry an 'email'
claim - a behavior change imposed on framework consumers by upgrade alone.

Default EmailClaim to empty so gateway enforcement is opt-in, while the
authenticated account's verified email is still forwarded to the exchange
endpoint unconditionally. Deployments that want the gateway to reject a
mismatched account set EmailClaim explicitly; everyone else keeps the prior
behavior and can enforce the binding in their own exchange endpoint.

Specs opt in to enforcement via an overridable email claim, with an added
spec proving a mismatch is forwarded (not rejected) when EmailClaim is unset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Clarify that Invite.EmailClaim is empty by default (gateway enforcement off),
that setting it enables the verified-email match, and that the verified email
is forwarded to the exchange endpoint regardless.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@woksin woksin added the patch label Jul 14, 2026
@woksin
woksin merged commit 563662d into main Jul 14, 2026
3 checks passed
@woksin
woksin deleted the fix/invite-email-binding-opt-in branch July 14, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant