feat(auth): add 'none' auth type for reverse-proxy injected credentials#190
Open
NathanRignall wants to merge 1 commit into
Open
feat(auth): add 'none' auth type for reverse-proxy injected credentials#190NathanRignall wants to merge 1 commit into
NathanRignall wants to merge 1 commit into
Conversation
Adds a new --auth-type/CONFLUENCE_AUTH_TYPE value 'none' that builds a client sending no Authorization or Cookie header, for environments where a local reverse proxy injects authentication on the wire.
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.
Summary
noneas a new value for--auth-type/CONFLUENCE_AUTH_TYPE.authType === 'none', the client builds requests with noAuthorizationorCookieheader. Designed for setups where a local reverse proxy injects credentials on the wire (SPNEGO/Kerberos, mTLS-at-edge, header injection).validateAuthConfigshort-circuits fornone, so token / email / cookie / mTLS fields are not required at any layer (CLI flags, env vars, profile file, interactive prompts).hasEnvAuthingetConfigacceptsCONFLUENCE_AUTH_TYPE=nonealone —CONFLUENCE_DOMAIN+CONFLUENCE_AUTH_TYPE=noneis enough to drive the env path.mtls/cookiesections; update the--auth-typeflag listing.Why
Behind a reverse proxy that auto-injects auth headers, users had to invent a placeholder token to satisfy the existing required-credentials checks. A first-class
nonemode makes the intent explicit and removes the workaround.Behavior preservation
basic,bearer,mtls,cookie) are unchanged.noneis only selected explicitly —normalizeAuthTypestill defaults tobasic/bearerbased on email presence.none-specific hint pointing at the proxy; other hints are untouched.Test plan
npm test— 689/689 pass (+4 new: 2 intests/config.test.js, 2 intests/confluence-client.test.js)npm run lint— cleannode bin/confluence.js init --auth-type none --domain confluence.example.com --protocol httpssucceeds without promptingCONFLUENCE_AUTH_TYPE=none— confirmed noauthorization/cookieon the outgoing request