Repository navigation
outposts/proxy: use HTTP/1.1 for OAuth backchannel requests - #26422
Merged
Merged
Conversation
Keep browser-facing Host overrides effective by giving OAuth backchannel operations a dedicated HTTP/1.1-only client. Preserve standalone TLS settings and embedded Unix-socket transport. Add wire-level tests against an HTTP/2-capable TLS peer for token issuers, grant and introspection requests, authority variations, JWKS, cleartext HTTP, and Unix sockets. Removing the restriction reproduces InvalidIssuer. Addresses the demonstrated HTTP/2 defect in goauthentik#26280. AI assistance: implementation and tests developed with OpenCode (OpenAI).
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #26422 +/- ##
==========================================
+ Coverage 92.14% 92.19% +0.05%
==========================================
Files 1179 1179
Lines 77363 77374 +11
Branches 4118 4129 +11
==========================================
+ Hits 71285 71334 +49
+ Misses 6025 5974 -51
- Partials 53 66 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
rissson
approved these changes
Sep 25, 2026
jsachs
marked this pull request as ready for review
September 29, 2026 10:44
BeryJu
approved these changes
Sep 29, 2026
Contributor
|
|
rissson
added a commit
that referenced
this pull request
Sep 29, 2026
…ick #26422 to version-2026.8) (#26537) * Cherry-pick #26422 to version-2026.8 (with conflicts) This cherry-pick has conflicts that need manual resolution. Original PR: #26422 Original commit: a618bb5 * fix conflicts Signed-off-by: Marc 'risson' Schmitt <[email protected]> --------- Signed-off-by: Marc 'risson' Schmitt <[email protected]> Co-authored-by: Jacob Sachs <[email protected]> Co-authored-by: Marc 'risson' Schmitt <[email protected]>
1 task
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.
Details
Hostand:authorityhandling.Why is this change needed?
When
AUTHENTIK_HOSTandAUTHENTIK_HOST_BROWSERdiffer, the outpost connects to the internal token endpoint but overridesHostwith the browser-facing authority so that the returned token has the expected public issuer.With HTTP/2, the transport also sends
:authorityderived from the internal request URL. This can produce conflicting values:RFC 9113 §8.3.1 prohibits clients from sending conflicting
Hostand:authorityvalues and requires recipients to use:authoritywhen determining the target URI. A receiving proxy can therefore reject the request or forward the internal authority, causing authentik to issue a token with an unexpected issuer.The outpost correctly rejects that token with
InvalidIssuer, then restarts authentication, producing a redirect loop. Restricting the backchannel client to HTTP/1.1 preserves the intended host override.How was this tested?
New tests use a local HTTPS server that advertises both HTTP/2 and HTTP/1.1. A control test confirms that an unrestricted client actually negotiates HTTP/2.
Regression coverage includes:
As a mutation check, temporarily removing
.http1_only()reproducedInvalidIssuerin both token-exchange tests and caused the protocol assertions for introspection and JWKS retrieval to fail.Linked issues
Addresses the demonstrated HTTP/2 failure in #26280. The original report's cleartext-HTTP failure has not been independently established to have the same cause.