docs: correct the SSO, LDAP and SSO troubleshooting pages against oauth.py and auths.py - #1407
Merged
Merged
Conversation
…th.py and auths.py
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
I compared the SSO overview, the SSO troubleshooting page and the LDAP page with
utils/oauth.py,routers/auths.py,config.pyand the admin Authentication settings ondev.SSO overview:
WEBUI_URLis not what builds the redirect URI. The provider's*_REDIRECT_URIvariable does, or the incoming request URL when that is unset.WEBUI_URLonly decides where the browser is sent after the callback. The Microsoft and OIDC redirect variables are optional overrides, not requirements.OPENID_PROVIDER_URLis no longer needed for Google or Microsoft sign-out. The discovery document is resolved from the provider the session was created with.ENABLE_PROFILE_IMAGE_URL_FORWARDINGdoes not govern SSO avatars: the login flow stores the IdP picture as a data URI. The picture is fetched with the access token during the callback, so it does not depend on a refresh token either.OAUTH_ALLOWED_ROLESandOAUTH_ADMIN_ROLEShave defaults, a non-matching role is refused with 403 rather than given the default role, the groups claim defaults togroups, an empty claim leaves memberships alone, and admins are synced like everyone else.SSO troubleshooting:
ENABLE_OAUTHis the master switch andENABLE_OAUTH_SIGNUPis only for account creation, the OAuth handshake timeout isOAUTH_TIMEOUT(the OAuth client is httpx-based, soAIOHTTP_CLIENT_TIMEOUTdoes nothing for it), Microsoft does not needOPENID_PROVIDER_URL, and the callback error text varies by failure.LDAP: the switch is labeled LDAP under Authentication, settings apply on the next login without a restart, new accounts get the instance default role (
pendingby default) with the first account becoming admin, the defaults forLDAP_USE_TLSandLDAP_VALIDATE_CERTare true, and StartTLS is not supported sinceLDAP_USE_TLSonly opens implicit TLS.Related issue or discussion
None.
Checklist
Notes for reviewers
Sources on
dev: the redirect URI resolution and picture handling inutils/oauth.py, the role and group mapping there, the sign-out discovery resolution and the LDAPServer(...)construction inrouters/auths.py,oauth_client_kwargsinconfig.pyfor the timeout,insert_new_authinmodels/auths.py, and the LDAP section ofAuthentication.svelte.