This is an automated email from the ASF dual-hosted git repository. pdallig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new d4d4103 [ZEPPELIN-5567] add Logging to LdapRealm on login Error d4d4103 is described below commit d4d4103f08037d4534262da2ab8973c2912e6115 Author: Johannes Schillinger <johannes.schillin...@dm.de> AuthorDate: Tue Oct 19 09:02:57 2021 +0200 [ZEPPELIN-5567] add Logging to LdapRealm on login Error ### What is this PR for? Add a bit of Logging to LdapRealm on User Login failure to see which user was affected ### What type of PR is it? Improvement ### Todos ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-5567 ### How should this be tested? * Verify that on Login Failure with LDAP an Warning Log MEssage is printed containing the Username ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Johannes Schillinger <johannes.schillin...@dm.de> Closes #4258 from chillinger/master and squashes the following commits: 2a0e88b90 [Johannes Schillinger] [ZEPPELIN-5567] implement proposed improvements fc78cc9ea [Johannes Schillinger] [ZEPPELIN-5567] add Logging to LdapRealm on login Error --- .../src/main/java/org/apache/zeppelin/realm/LdapRealm.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java index dc7494e..51c92c8 100644 --- a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java +++ b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java @@ -206,7 +206,12 @@ public class LdapRealm extends DefaultLdapRealm { @Override protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws org.apache.shiro.authc.AuthenticationException { - return super.doGetAuthenticationInfo(token); + try { + return super.doGetAuthenticationInfo(token); + } catch (org.apache.shiro.authc.AuthenticationException e){ + LOGGER.warn("Encountered Error while authenticating {}: {}", token.getPrincipal(), e.getMessage()); + throw e; + } } @Override