You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/12/20 10:22:45 UTC
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request
#3694: Ldap fixes
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