Skip to content

fix(auth): reject sibling-origin cookie mutations - #4

Merged
goat-io merged 1 commit into
mainfrom
fix/cookie-csrf-sibling-origin
Sep 25, 2026
Merged

goat-io merged 1 commit into
mainfrom
fix/cookie-csrf-sibling-origin

Conversation

@goat-io

@goat-io goat-io commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Published Delphi sites will share the azdelphi.com registrable domain with the control plane. Browser SameSite cookies are sent to sibling subdomains, so a public site can submit an authenticated mutation to the control plane unless AuthKit checks its origin. Reject unsafe cookie-authenticated requests from other origins or with a same-site/cross-site fetch signal and no Origin. OAuth callbacks remain exempt because they use a one-time, host-bound flow cookie and may arrive as cross-origin Apple POSTs.

Validation: go test ./... passed. The regression test verifies sibling-origin and missing-origin same-site requests cannot sign a user out, while a same-origin request can.

@goat-io
goat-io merged commit 0a68934 into main Sep 25, 2026
3 checks passed
@goat-io
goat-io deleted the fix/cookie-csrf-sibling-origin branch September 25, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant