porchlight/tests/test_oidc
Johan Lundberg cdde3e3754
fix(security): reject consent scopes outside the original request
The /consent POST handler trusted the scope values submitted in the form,
so a forged consent submission could approve (and persist consent for)
scopes that were never part of the originating authorization request —
a scope-escalation vector.

Intersect the submitted scopes with the originally requested set stored in
the session before saving consent and completing the flow.

Refs: porchlight-a03

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 10:26:55 +02:00
..
__init__.py chore: create package structure with src layout 2026-02-12 14:39:07 +01:00
test_app_integration.py feat: integrate idpyoidc server into app lifespan 2026-02-16 13:29:39 +01:00
test_authorization.py feat: add OIDC discovery, JWKS, and authorization endpoints 2026-02-16 13:33:40 +01:00
test_claims.py update all imports in test files: fastapi_oidc_op → porchlight 2026-02-16 15:34:53 +01:00
test_consent_flow.py fix(security): reject consent scopes outside the original request 2026-06-04 10:26:55 +02:00
test_discovery.py feat: add OIDC discovery, JWKS, and authorization endpoints 2026-02-16 13:33:40 +01:00
test_e2e_flow.py fix: resolve all ruff lint errors and type checker warnings 2026-03-31 15:48:46 +02:00
test_login_oidc_redirect.py fix: reorder imports and use ty-compatible type suppression 2026-02-19 14:29:01 +01:00
test_provider.py fix: resolve all ruff lint errors and type checker warnings 2026-03-31 15:48:46 +02:00
test_token.py fix: reorder imports and use ty-compatible type suppression 2026-02-19 14:29:01 +01:00
test_userinfo.py fix: reorder imports and use ty-compatible type suppression 2026-02-19 14:29:01 +01:00