You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Minder (JIRA)" <ji...@apache.org> on 2015/07/23 22:10:04 UTC

[jira] [Commented] (KNOX-575) Add more logging for LDAP Authentication issues with ShiroProvider

    [ https://issues.apache.org/jira/browse/KNOX-575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14639431#comment-14639431 ] 

Kevin Minder commented on KNOX-575:
-----------------------------------

This code all looks a bit strange to me.
{code}
ShiroLog.failedLoginInfo(token);
ShiroLog.failedLoginStackTrace(e);
try {
    ShiroLog.failedLoginAttempt(e.getCause());
} catch (Exception ex) {
    ShiroLog.failedLoginAttempt(e);
}
{code}
I would suggest something more like this for the defensive get cause code.  I don't think the try/catch is required.
{code}
ShiroLog.failedLoginAttempt(e.getCause()==null?e:e.getCause());
{code}
I also don't really understand why this can't be collapsed down into a single log statement.

> Add more logging for LDAP Authentication issues with ShiroProvider
> ------------------------------------------------------------------
>
>                 Key: KNOX-575
>                 URL: https://issues.apache.org/jira/browse/KNOX-575
>             Project: Apache Knox
>          Issue Type: Improvement
>    Affects Versions: 0.6.0
>            Reporter: Zachary Blanco
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: KNOX-575-01.patch
>
>
> Logging for when the LDAP server isn't running and/or Knox fails to connect to the LDAP server with a given topology is lacking in logging information. This can make debugging issues with authentication and Knox difficult and more complex than they should be.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)