Support header-based login (Remote-User) for reverse proxies #3143
+85
−0
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.
This PR brings header-based login to huginn, supporting a common SSO pattern used with reverse proxies.
For many SSO setups, authentication can be handled entirely by the reverse proxy, and then services behind the proxy can receive HTTP headers describing the successfully authenticated user. For a more detailed explanation of this type of authentication, see the traefik docs here.
The feature is both controlled (on/off) and configured via environment variables. Users that don't already exist in the system are created, and if additional info is available in the headers, huginn can be configured to use that info to create new users (including a basic admin detecting strategy). More configuraiton details are available in .env.example.