Repository navigation
Conversation
nollbit
force-pushed
the
fork/auth-endpoint-scheme
branch
from
October 1, 2026 08:16
e007501 to
0f710f8
Compare
`[environment.endpoint] auth_url` carries the configured scheme --
`ucs-auth://`, `oidc://` -- which is not one tonic can dial. Both server
auth clients passed it to `Endpoint::from_shared` unchanged and gated
TLS on `starts_with("https://")`, so any auth service not literally
configured as `https://` was dialled in plaintext: the HTTP/2 preface
arrives at a TLS listener, which closes the connection, and the call
comes back as `transport error` with a broken pipe.
`lore_transport::auth::ucs_auth::grpc_endpoint` already does this
rewrite for the client side, loopback-http exemption included. Make it
public and use it from `authnz::auth` and `authnz::rebac` rather than
repeating the rule.
Only calls that reach the auth service online are affected; where a
token's claims answer the question locally, nothing dials out. The
endpoint construction moves into a function so the scheme rewrite can
be tested without a listener.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Johan Mjönes <johan@playgoals.com>
nollbit
force-pushed
the
fork/auth-endpoint-scheme
branch
from
October 1, 2026 08:16
0f710f8 to
5acbaf3
Compare
Author
|
Superseded by EpicGames/lore#230, which is open and green on Epic's CI. This was a review vehicle only — never for merging, since |
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.
Staging ground for an upstream contribution. Opened against our
main(pure upstream, 91 behind) so the diff here is exactly whatEpicGames/lorewould see. Draft — not for merging into ourmain.The same change is already in
goals/gcp-prod-deployasa733d9eand shipped in server image0-1-38.The bug
[environment.endpoint] auth_urlcarries the configured scheme —ucs-auth://,oidc://— which is not a scheme tonic can dial. Both server auth clients pass it toEndpoint::from_sharedunchanged and gate TLS on a literal prefix:So an auth service configured as anything other than
https://is dialled in plaintext. The HTTP/2 preface arrives at a TLS listener, which closes the connection, and the call returnstransport errorwith a broken pipe.Only calls that reach the auth service online are affected. Where a token's claims answer the question locally, nothing dials out — which is why this can sit unnoticed: most traffic never touches it.
The fix
lore_transport::auth::ucs_auth::grpc_endpointalready performs exactly this rewrite for the client side, loopback-httpexemption included. The client used it; the server did not. This makes itpuband calls it fromauthnz::authandauthnz::rebacrather than restating the rule in two more places.Endpoint construction moves into a function so the rewrite can be tested without standing up a listener — the absence of such a test is why this was reintroduced here once already after being fixed.
Scope
Present in v0.8.6, v0.9.0, v0.10.0 and current upstream
main. Not a recent regression.Verification
Reproduced against a real TLS auth listener before and after:
grpc-status: 0and the expected responseBuild,
cargo test -p lore-server, clippy andcargo +nightly fmt --checkall clean, both on this base and on upstreammain.Note
The failure mode is fail-closed against a TLS auth service: the handshake fails and nothing is transmitted. Against an auth service that accepts h2c, the same code path would send
authorization: Bearer <token>over an unencrypted channel. That is the reasongrpc_endpointupgrades non-loopbackhttp://tohttps://in the first place — the server side simply was not using it.🤖 Generated with Claude Code
https://claude.ai/code/session_01VFWPcxHtgaa51mmocMa6dj