security: forwarded headers only from trusted proxies; Secure cookies behind TLS proxies (#874, v0.6.328) #877
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-874"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #874.
auth.ClientAddr(trusted proxies, read from the right), with IPv6 grouped by /64.auth.RequestScheme. X-Forwarded-Proto is honoured only from trusted proxies (last value, case-insensitive). It is used for the OIDC sign-out origin and the share-link base URL. A host configured as https (oidcRedirectUrl,shares.baseUrl) keeps https, so sign-out doesn't regress behind a proxy that isn't trusted yet.cairn_shareare nowSecureover TLS or a trusted https proxy. LAN http stays non-Secure.X-Forwarded-*,ForwardedorX-Real-IPreader is allowed outsideinternal/auth.10.42.0.0/16example is gone from deployment.md. CHANGELOG## v0.6.328has a Security section and upgrade notes.Review. Opus security review: 3 Important findings (sign-out origin, guard breadth, upgrade note), all fixed.
go vet,go test ./...,-raceon auth/share/api/cmd,gofmtand the web tests are all green.- OIDC sign-out {origin} keeps https for a host configured as https (auth.oidcRedirectUrl, shares.baseUrl) behind a not-yet-trusted proxy. - Guard test: whole module, Forwarded and X-Real-IP, literal concatenation. - main: auth.trustedProxies parse error is checked, not discarded. - CHANGELOG/deployment.md: sign-out origin upgrade note, unread headers.