[jboss-jira] [JBoss JIRA] (WFLY-4761) Unchecked exceptions in login modules are eaten by Picketbox

Unni N (JIRA) issues at jboss.org
Thu Nov 12 14:33:00 EST 2015


    [ https://issues.jboss.org/browse/WFLY-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128484#comment-13128484 ] 

Unni N commented on WFLY-4761:
------------------------------

To reproduce you can try the following.

Take out the dependency your custom module is using. For example, for me log4j dependency was missing. But its hard to identity unless you debug the  org.jboss.security.authentication.JBossCachedAuthenticationManager

> Unchecked exceptions in login modules are eaten by Picketbox
> ------------------------------------------------------------
>
>                 Key: WFLY-4761
>                 URL: https://issues.jboss.org/browse/WFLY-4761
>             Project: WildFly
>          Issue Type: Bug
>          Components: Security
>    Affects Versions: 8.2.0.Final
>            Reporter: Matěj Liszka
>            Assignee: Darran Lofthouse
>
> In one of ABB software projects, during development of a custom login module (extending org.jboss.security.auth.spi.DatabaseServerLoginModule) I was not able to trace any errors in the log while the module apparently failed to execute its code. After debugging the Picketbox library (it is picketbox-infinispan-4.0.21.Final.jar) I found out that unchecked exceptions in the login module are eaten by return statement from finally blocks of calling methods. This happened in case of runtime errors in method initialize as well as in case of unsatisfied module dependencies (missing dependencies in module.xml). The workaround (which could be also the bug fix for this problem) was to modify org.jboss.security.authentication.JBossCachedAuthenticationManager by catching runtime errors in the second part of implementation of defaultLogin method and by rethrowing them wrapped as LoginException.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jboss-jira mailing list