fix(32.2): WR-02 refuse a ConsentPath that is not a same-origin path

Add wristband.CheckConsentPath (additive, for hosts to call at boot) and make Authorize answer 500 before storing a pending request while the configured path fails it, so the handoff can never leave the issuer's origin.
This commit is contained in:
Jakub Zych
2026-11-21 09:08:12 +01:00
parent fa7a84821e
commit 1dcc2ed06d
5 changed files with 91 additions and 3 deletions

View File

@@ -96,7 +96,9 @@ type Options struct {
// authorize request. Empty or unset means "/connect", the PHP handoff,
// so the redirect bytes stay identical to the PHP server. A host whose
// consent page lives elsewhere on the same origin (for example under
// the admin prefix) sets the path here. The OIDC flavour ignores it.
// the admin prefix) sets the path here; it must pass CheckConsentPath,
// and Authorize answers 500 instead of redirecting while it does not.
// The OIDC flavour ignores it.
ConsentPath string
// DefaultScopes is what an MCP authorize request gets when it names no