feat: added ability to set user name for federated auth #3202
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.
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
dev
branch.Changelog Entry
Description
this PR adds an optional environment variable named
WEBUI_AUTH_TRUSTED_NAME_HEADER
, which sets the user's name to the contents of that header. this only happens if the user is just being created, just like how the trusted e-mail header works.if the environment variable or header is not present, we fall back to the original behavior which is to re-use the user e-mail address.
Added
Changed
None
Deprecated
None
Removed
None
Fixed
N/A
Security
N/A
Breaking Changes
N/A, it will fall back to original behavior if the header or environment variable does not exist.
Additional Information
The GitHub actions are failing due to uppercase characters in my username, so to test, I first fixed that (#3204), merged both changes in a separate branch, and merely ran the actions. The images are available in the images containing
ci-cd-test
in the Packages section of my fork. I deployed the resulting image to my homelab and it's working fine so far.Documentation changes are at open-webui/docs#117 and the discussion post is #3201 .
Screenshots or Videos
N/A