cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] DaanHoogland commented on a change in pull request #3694: Ldap fixes
Date Fri, 20 Dec 2019 10:22:45 GMT
DaanHoogland commented on a change in pull request #3694: Ldap fixes
URL: https://github.com/apache/cloudstack/pull/3694#discussion_r360311276
 
 

 ##########
 File path: plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java
 ##########
 @@ -142,12 +142,15 @@ private LdapConfigurationResponse addConfigurationInternal(final String
hostname
     public boolean canAuthenticate(final String principal, final String password, final Long
domainId) {
         try {
             // TODO return the right account for this user
-            final LdapContext context = _ldapContextFactory.createUserContext(principal,
password,domainId);
+            final LdapContext context = _ldapContextFactory.createUserContext(principal,
password, domainId);
             closeContext(context);
+            if(LOGGER.isTraceEnabled()) {
+                LOGGER.trace(String.format("User(%s) authenticated for domain(%s)", principal,
domainId));
+            }
             return true;
-        } catch (NamingException | IOException e) {
-            s_logger.debug("Exception while doing an LDAP bind for user "+" "+principal,
e);
-            s_logger.info("Failed to authenticate user: " + principal + ". incorrect password.");
+        } catch (NamingException /* | AuthenticationException */ | IOException e) {
 
 Review comment:
   extended as explanation

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message