Repository navigation
feat(oauth): add optional host-based automatic Generic OAuth login - #1654
Open
NicolasRoelofs wants to merge 4 commits into
Open
NicolasRoelofs wants to merge 4 commits into
NicolasRoelofs wants to merge 4 commits into
Conversation
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.
feat(oauth): add optional host-based automatic Generic OAuth login
Summary
Add an optional, disabled-by-default feature to automatically initiate Generic OAuth authentication when an unauthenticated visitor accesses the CWA home page using a configured hostname.
This eliminates the need to manually select "Log in with SSO" after passing through an external authentication gateway.
Motivation
Some deployments use an external OIDC authentication gateway in front of CWA while retaining anonymous access through a separate local network address.
After successful gateway authentication, CWA may still display its anonymous Guest session.
Users must then manually initiate CWA's own OAuth login to access their personal account.
This feature provides an optional automatic transition into the existing Generic OAuth flow.
Configuration
The setting is optional and disabled by default.
Multiple hosts may be specified as a comma-separated list.
Expected behavior
Security considerations
The hostname setting controls login initiation only. It does not grant authorization or establish user identity.
Normal OAuth token validation and CWA account permissions remain authoritative.
Reverse proxy configurations must continue to enforce their own authentication and access restrictions.
Compatibility
The feature is opt-in and should not change existing CWA installations when the environment variable is unset.
Validation
The equivalent host-specific redirect behavior was manually validated with CWA v4.0.8 behind an external OIDC authentication gateway.
The generalized environment-variable implementation still requires regression tests and review against the current development branch.
Scope
This PR introduces optional automatic Generic OAuth initiation.
It does not modify identity-to-account linking or depend on a specific identity provider, reverse proxy, or network appliance.