Merge pull request #2111 from coreos-inc/ldap-trace
Change LDAP errors into debug statements to reduce log clutter
This commit is contained in:
commit
38ee1d0d2a
1 changed files with 4 additions and 4 deletions
|
@ -107,11 +107,11 @@ class LDAPUsers(FederatedUsers):
|
|||
subquery = u'(%s=%s)' % (self._uid_attr, username_or_email)
|
||||
return (conn.search_s(referral_dn, ldap.SCOPE_BASE, subquery), None)
|
||||
except ldap.LDAPError:
|
||||
logger.exception('LDAP referral search exception')
|
||||
logger.debug('LDAP referral search exception')
|
||||
return (None, 'Username not found')
|
||||
|
||||
except ldap.LDAPError:
|
||||
logger.exception('LDAP search exception')
|
||||
logger.debug('LDAP search exception')
|
||||
return (None, 'Username not found')
|
||||
|
||||
def _ldap_user_search(self, username_or_email, limit=20):
|
||||
|
@ -234,11 +234,11 @@ class LDAPUsers(FederatedUsers):
|
|||
self._allow_tls_fallback):
|
||||
pass
|
||||
except ldap.INVALID_CREDENTIALS:
|
||||
logger.exception('Invalid LDAP credentials')
|
||||
logger.debug('Invalid LDAP credentials')
|
||||
return (None, 'Invalid password')
|
||||
|
||||
except ldap.INVALID_CREDENTIALS:
|
||||
logger.exception('Invalid LDAP credentials')
|
||||
logger.debug('Invalid LDAP credentials')
|
||||
return (None, 'Invalid password')
|
||||
|
||||
return self._credential_for_user(found_response)
|
||||
|
|
Reference in a new issue