Repository: ambari Updated Branches: refs/heads/branch-2.4 71db67fbe -> c1c3e40b5
Revert "AMBARI-19692. LDAP regression in Ambari 2.4: Login alias is not resolved during authentication (oleewere)" This reverts commit 71db67fbe8d07b1cfcf04ef3f1cc6eb7d0e071bb. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c1c3e40b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c1c3e40b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c1c3e40b Branch: refs/heads/branch-2.4 Commit: c1c3e40b55b5479d3616812cd685bbaac12fbf12 Parents: 71db67f Author: oleewere <[email protected]> Authored: Wed Jan 25 17:56:13 2017 +0100 Committer: oleewere <[email protected]> Committed: Wed Jan 25 17:56:13 2017 +0100 ---------------------------------------------------------------------- .../authorization/AmbariLdapAuthenticationProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c1c3e40b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java index ac16730..6905757 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProvider.java @@ -190,18 +190,18 @@ public class AmbariLdapAuthenticationProvider implements AuthenticationProvider } private Integer getUserId(Authentication authentication) { - String userName = AuthorizationHelper.resolveLoginAliasToUserName(authentication.getName()); + String userName = authentication.getName(); UserEntity userEntity = userDAO.findLdapUserByName(userName); // lookup is case insensitive, so no need for string comparison if (userEntity == null) { - LOG.info("user not found ('{}')", userName); + LOG.info("user not found "); throw new InvalidUsernamePasswordCombinationException(); } if (!userEntity.getActive()) { - LOG.debug("User account is disabled ('{}')", userName); + LOG.debug("User account is disabled"); throw new InvalidUsernamePasswordCombinationException(); }
