Skip to content

RANGER-5753: LDAP/Active Directory authentication does not validate local Ranger account status - #1174

Open
vyommani wants to merge 1 commit into
apache:masterfrom
vyommani:RANGER-5753
Open

RANGER-5753: LDAP/Active Directory authentication does not validate local Ranger account status#1174
vyommani wants to merge 1 commit into
apache:masterfrom
vyommani:RANGER-5753

Conversation

@vyommani

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

When Ranger Admin is configured for LDAP or Active Directory authentication
(ranger.authentication.method=LDAP or ACTIVE_DIRECTORY), RangerAuthenticationProvider
did not check the local Ranger account's status after a successful directory bind. This meant
a user's local account status could be out of sync with their actual ability to sign in when
directory-based authentication was used, unlike local/JDBC authentication, which already
respects account status via the STATUS column read by the JDBC user-details query.

This change adds a status check, UserMgr#isUserDisabled, and calls it from
RangerAuthenticationProvider#authenticate right after each successful LDAP, LDAP-bind,
AD-bind, AD, PAM, and UNIX authentication branch, before the method returns — so a disabled
local account is rejected consistently across all supported authentication methods.

How was this patch tested?

added new unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant