Skip to content

release: v1.11.1 - #188

Merged
Jaro-c merged 1 commit into
mainfrom
develop
Jun 29, 2026
Merged

release: v1.11.1#188
Jaro-c merged 1 commit into
mainfrom
develop

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Jun 29, 2026

Copy link
Copy Markdown
Member

Release v1.11.1 — oauth resilience and SSRF hardening (from the routed injection + resilience reviews). No public API changes.

  • SSRF / credential-exfiltration: the OAuth HTTP clients now refuse cross-origin redirects (the token POST replays the client secret on a 307/308), https->http downgrades, and redirects to loopback/link-local/private hosts. A caller-supplied HTTPClient owns its own policy.
  • DoS: JWKS refresh is collapsed with singleflight so a burst of unknown-kid tokens triggers one outbound fetch, not one per request; VerifyIDToken rejects an id_token over 16 KiB before parsing.
  • Docs: VerifyDomain warns a unique-domain flood is unbounded (rate-limit registration); the disk key default is plaintext-at-rest (use a KMS KeyStore for high assurance); the redirect policy is documented. (oauth resilience & SSRF hardening (redirect policy, JWKS burst-collapse, id_token cap) #186)

)

From the routed injection + resilience reviews (closing the route loop).

- **(HIGH, SSRF / credential exfiltration) Safe redirects.** The OAuth
HTTP clients followed redirects blindly: a 307/308 on the token endpoint
re-POSTs `client_secret`+code+verifier to the redirect host, and GETs
could be sent to `169.254.169.254` / `127.0.0.1` / RFC1918 (SSRF) or
downgraded to `http`. A `CheckRedirect` now refuses cross-origin,
https→http, and loopback/link-local/private hosts — on the default
Exchange/JWKS/userinfo client and the Discover client. A caller-supplied
`HTTPClient` owns its own policy.
- **(MAJOR) JWKS burst-collapse.** The once-per-minute throttle bounded
the steady-state rate but not a concurrent burst (N simultaneous unknown
kids each fired a fetch). `singleflight` now collapses concurrent
refreshes to one outbound JWKS GET.
- **(minor) id_token cap.** `VerifyIDToken` rejects a token over 16 KiB
before parsing, mirroring the jwt path.
- **(docs)** `VerifyDomain` warns that a unique-domain flood is
unbounded (rate-limit the registration endpoint); key-management notes
the disk default is plaintext at rest (use a KMS `KeyStore` for high
assurance); oauth documents the redirect policy.

Tests: cross-origin/private/downgrade redirects refused, a 25-way
unknown-kid burst collapses to ≤3 fetches, oversized id_token rejected.
`go build`, `go vet`, `golangci-lint` (0 issues), the full suite with
`-race`, and `govulncheck` (clean) all pass.

Closes #186

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
@Jaro-c
Jaro-c enabled auto-merge June 29, 2026 18:51
@Jaro-c
Jaro-c merged commit e96b4b3 into main Jun 29, 2026
23 of 25 checks passed
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