fix(cookie-bomb-dos): NOT-5xx is the contract, 4xx requirement was ov…#54
Merged
Conversation
…erstrict PR #52 landed with `.toBeGreaterThanOrEqual(400)` which fails against the bundle's actual fail-closed behaviour: oauth2-proxy returns 302 to the IDP for unauthenticated visits, and the bomb cookie isn't a real `_oauth2_proxy` so the user gets bounced — that IS fail-closed for the SSO chain. 6/7 entry points are red in CI on this assertion despite the bundle behaving correctly. The threat we actually pin is parser-crash (5xx) — a remote- triggerable DoS on any victim with an in-scope cookie write. The status-code shape is the bundle's call (4xx, 3xx-to-IDP, even 2xx when next to a valid cookie). Reverted to NOT-5xx with an expanded inline comment listing the four acceptable shapes (4xx / 3xx-to-IDP / 2xx-when-next-to-valid-cookie / connection-close). Also renamed the test case from "returns 4xx, not 5xx" to "does not return 5xx" so the name matches the actual assertion. Verified: 7/7 cookie-bomb-dos pass against live sandbox after the revert. Audit + typecheck clean.
SSO Spec Coverage AuditContract source:
All 88 spec requirements are accounted for. |
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.
…erstrict
PR #52 landed with
.toBeGreaterThanOrEqual(400)which fails against the bundle's actual fail-closed behaviour: oauth2-proxy returns 302 to the IDP for unauthenticated visits, and the bomb cookie isn't a real_oauth2_proxyso the user gets bounced — that IS fail-closed for the SSO chain. 6/7 entry points are red in CI on this assertion despite the bundle behaving correctly.The threat we actually pin is parser-crash (5xx) — a remote- triggerable DoS on any victim with an in-scope cookie write. The status-code shape is the bundle's call (4xx, 3xx-to-IDP, even 2xx when next to a valid cookie). Reverted to NOT-5xx with an expanded inline comment listing the four acceptable shapes (4xx / 3xx-to-IDP / 2xx-when-next-to-valid-cookie / connection-close).
Also renamed the test case from "returns 4xx, not 5xx" to "does not return 5xx" so the name matches the actual assertion.
Verified: 7/7 cookie-bomb-dos pass against live sandbox after the revert. Audit + typecheck clean.
Motivation / Background
This Pull Request has been created because:
Detail
This Pull Request changes:
Additional information
TIP: Provide additional information such as screenshots, benchmarks, reference to other repositories or alternative solutions
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]