RANGER-5725: Remove SSO filter in Ranger Admin - #1157
Draft
kumaab wants to merge 1 commit into
Draft
Conversation
kumaab
marked this pull request as draft
August 14, 2026 20:58
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.
What changes were proposed in this pull request?
This PR completely removes the legacy Knox SSO authentication mechanism (RANGER-685) from Ranger Admin, which is no longer used in practice now that JWT/Bearer-token authentication (RANGER-3739) is handled by the shared
ranger-authnframework.Root problem addressed: the
ranger.sso.enabledflag was overloaded — it drove JWT user auto-provisioning, audit auth-type classification, and the auth-provider branch. This caused operational bugs (e.g. an empty<value></value>public key silently breaking unrelated auth flows, and header/JWT user provisioning being coupled to an unrelated "SSO" flag).Backend:
ranger.sso.enabledflag and everything it drove: the SSO branch inRangerAuthenticationProvider(isSsoEnabled/setSsoEnabled/getSSOAuthentication),RangerBizUtil.isSSOEnabled(),ServiceREST.checkSSO()(/checksso),UserSessionBase.isSSOEnabled, and thelocalloginscaffolding inRangerAuthenticationEntryPoint,RangerJwtAuthWrapper, andRestUtil.ranger.sso.enabled.SessionMgrnow provisions absent users based on the actual authentication mechanism of the request (SPNEGO/Kerberos, trusted-proxy header, JWT, or the internal healthcheck user).RangerJwtAuthFiltersets ajwtAuthenticatedrequest attribute that also drivesAUTH_TYPE_SSOaudit classification for token logins.ranger.sso.*toranger.admin.jwt.*, with a transparent backward-compatible fallback to the legacyranger.sso.*names so existing JWT deployments keep working. JWT now activates automatically when a provider URL or public key is configured (no separate enable flag), and empty-string config values are correctly treated as unset.Config:
ranger.sso.*block with theranger.admin.jwt.*namespace inranger-admin-site.xml,install.properties, andsetup.sh; removedsso_enabled=truefrom the docker admin install properties.UI (React):
checkKnoxSSO/plugins/checksso, the/knoxSSOWarningroute andcheckSSOTrueerror page, and the/localloginroute. Logout now simply clears state and redirects tologin.jsp.Intentionally kept (not part of Knox admin SSO): the
AUTH_TYPE_SSODB enum for historical audit records,RestUtil.constructForwardableURL/constructRedirectURL(used by Kerberos logout), and the entireranger-knox-plugin(Knox authorization).How was this patch tested?
mvn test-compileforsecurity-admin(main + test sources) passes.TestRangerAuthenticationProvider,TestSessionMgr,TestRangerBizUtil,TestRangerSecurityContextFormationFilter,TestRangerJwtAuthFilter,TestRangerJwtAuthWrapper,TestRangerAuthenticationEntryPoint,TestRangerKRBAuthenticationFilter,TestRangerCSRFPreventionFilter, andTestServiceREST. Existing tests were updated to reflect the mechanism-based auth-type/provisioning behavior and the removed SSO endpoints/flags.dev-support/checkstyle.xml, including test sources) passes for thesecurity-adminmodule.ranger.sso.*properties across the repository.