docs(auth): do not set AUTH_SIGNING_PUBKEY on a Fleet behind password-mode Auth - #1513
Merged
Merged
Conversation
…-mode Auth TLDR The central-Auth guide told operators to set Auth's public key on Fleet. That variable is also what turns on the legacy "Use Elcano email" button, and a password-mode Auth cannot complete that flow, so following the guide gave users a second sign-in button that dead-ends. The guide now says to leave the variable unset and explains that back-channel logout still verifies through Auth's JWKS. Problem login/page.tsx renders the magic-link button when AUTH_SIGNING_PUBKEY is non-empty, independently of FLEET_OIDC_*. Password-mode Auth mints a host-only __Host-auth_session cookie, never the shared elcano_auth cookie, so the legacy round-trip returns the browser to /login with nothing Fleet accepts. Meanwhile backchannelLogout.ts merges static keys with the JWKS cache and its tests verify a token with the key available only from JWKS, so the static key was never required for central mode. Fix - Remove AUTH_SIGNING_PUBKEY from the central-mode variable block and add a paragraph saying not to set it behind password-mode Auth, why (the legacy button), what still works (JWKS-based logout verification, one-sided key rotation) and the trade-off (Fleet must reach Auth when a logout arrives; Auth retries for seven days). The variable remains documented for deployments that really use the magic-link cookie. - Code is unchanged; a separate explicit legacy-mode flag is the longer-term fix and is tracked in the Auth review decision list. Tests Documentation only.
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.
TLDR
The central-Auth guide told operators to set Auth's public key on Fleet. That variable is also what turns on the legacy "Use Elcano email" button, and a password-mode Auth cannot complete that flow, so following the guide gave users a second sign-in button that dead-ends. The guide now says to leave the variable unset and explains that back-channel logout still verifies through Auth's JWKS.
Problem
login/page.tsxrenders the magic-link button whenAUTH_SIGNING_PUBKEYis non-empty, independently ofFLEET_OIDC_*. Password-mode Auth mints a host-only__Host-auth_sessioncookie, never the sharedelcano_authcookie, so the legacy round-trip returns the browser to/loginwith nothing Fleet accepts. MeanwhilebackchannelLogout.tsmerges static keys with the JWKS cache and its tests verify a token with the key available only from JWKS, so the static key was never required for central mode.Fix
AUTH_SIGNING_PUBKEYfrom the central-mode variable block and add a paragraph saying not to set it behind password-mode Auth, why (the legacy button), what still works (JWKS-based logout verification, one-sided key rotation) and the trade-off (Fleet must reach Auth when a logout arrives; Auth retries for seven days). The variable remains documented for deployments that really use the magic-link cookie.Tests
Documentation only.