You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2010/12/17 10:08:03 UTC

[jira] Resolved: (SSHD-102) Add error logging to org.apache.sshd.server.jaas.JaasPasswordAuthenticator.authenticate()

     [ https://issues.apache.org/jira/browse/SSHD-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SSHD-102.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.6.0
         Assignee: Guillaume Nodet

I've slightly changed the log to log the root cause exception, as if we have to log something, i'd rather log the whole cause and not miss any details.


Committing to https://svn.apache.org/repos/asf/mina/sshd/trunk ...
	M	sshd-core/src/main/java/org/apache/sshd/server/jaas/JaasPasswordAuthenticator.java
Committed r1050323


> Add error logging to org.apache.sshd.server.jaas.JaasPasswordAuthenticator.authenticate()
> -----------------------------------------------------------------------------------------
>
>                 Key: SSHD-102
>                 URL: https://issues.apache.org/jira/browse/SSHD-102
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.4.0, 0.5.0
>         Environment: sshd JAAS used with LDAP based authentication.
>            Reporter: Torsten Mielke
>            Assignee: Guillaume Nodet
>             Fix For: 0.6.0
>
>         Attachments: JaasPasswordAuthenticator.patch
>
>
> The JaasPasswordAuthenticator.authenticate() method currently silently ignores any exceptions being raised and simply returns false in case of any authentication erorrs. 
> In environments where sshd is used in other frameworks like OSGi, it becomes very difficult to trouble shoot the reasons for the authentication failure. 
> Rather than simply returning false, I propose to print a logging statement at the least.
>     catch (Exception e) {
>             log.error("Authentication failed with error: " + 
>                       e.getMessage() + 
>                       ", cause: " + 
>                       e.getCause() );
>             return false;
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.