docs(sso): document the SAML role-attribute risk and the SameSite requirement - #477
Open
marevol wants to merge 1 commit into
Open
docs(sso): document the SAML role-attribute risk and the SameSite requirement#477marevol wants to merge 1 commit into
marevol wants to merge 1 commit into
Conversation
…uirement Three additions to the 15.8 SAML page in all seven languages. - Role attribute: saml.attribute.role.name makes the IdP attribute values Fess roles verbatim, and authentication.admin.roles defaults to admin, so an IdP that sends a role value of admin grants Fess administrator rights. The page previously described the property without noting that. - Troubleshooting: the assertion reaches the ACS as a cross-site POST from the IdP, so with the shipped tomcat.sameSiteCookies = lax the browser does not send the session cookie and the login loops back to the IdP. Added to the "cannot return to Fess after authentication" entry with the fix. - Security settings: mention the Insecure SAML settings warning that Fess writes when weak settings remain, so operators know what it refers to.
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.
Three additions to
15.8/config/sso-saml.rst, applied to all seven languages (ja, en, de, es, fr, ko, zh-cn).1. The role attribute can hand out administrator rights
saml.attribute.role.nameis documented as a plain attribute mapping, butSamlCredential#getDefaultRolesAsArraycopies the IdP attribute values into the Fess roles verbatim, andauthentication.admin.rolesdefaults toadmininfess_config.properties. Any user whose role attribute containsadmintherefore becomes a Fess administrator.This is how Fess SSO works generally — the Entra ID authenticator maps Graph
directoryRoleobjects into roles the same way — so this is a warning on the page rather than a code change. But the page gave no hint of it, and the example it shows issaml.attribute.role.name=roles, which is exactly the configuration where it matters.2. SameSite breaks the ACS callback
tomcat_config.propertiesshipstomcat.sameSiteCookies = lax, whichFessBootapplies to every context's cookie processor, soJSESSIONIDcarriesSameSite=Lax.The SAML assertion reaches
/sso/as a cross-site POST from the IdP's auto-submitting form, and a cookie with an explicitSameSite=Laxis not sent with it.getLoginCredential()then sees no session, treats the request as a fresh visit and issues another AuthnRequest — the login loops between Fess and the IdP.Added to the existing "cannot return to Fess after authentication" troubleshooting entry, with
tomcat.sameSiteCookies = noneas the fix and the note thatSameSite=Nonerequires HTTPS. The comment intomcat_config.propertiesonly mentioned OAuth/OIDC, whose callback is a top-level GET and is unaffected; codelibs/fess#3224 corrects that comment.3. The insecure-settings warning
codelibs/fess#3224 makes Fess log
Insecure SAML settings: ...when java-saml reports weak configuration. Mentioned in the security section so operators can connect the log line to the settings on this page.Verification
Each file was parsed with docutils (Sphinx-only directives and roles filtered out) — no structural, indentation or escape errors in any of the seven. The zh-cn text follows the existing
\ ``literal``\spacing convention used elsewhere on the page.