Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4761

Unchecked exceptions in login modules are eaten by Picketbox

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • 11.0.0.Alpha1
    • 8.2.0.Final
    • Security
    • None
    • Workaround Exists
    • Hide

      Patch picketbox-infinispan-4.0.21.Final.jar by modified class org.jboss.security.authentication.JBossCachedAuthenticationManager where runtime errors in the second part of implementation of defaultLogin method are caught and rethrown wrapped by LoginException.

      Show
      Patch picketbox-infinispan-4.0.21.Final.jar by modified class org.jboss.security.authentication.JBossCachedAuthenticationManager where runtime errors in the second part of implementation of defaultLogin method are caught and rethrown wrapped by LoginException.

    Description

      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.

      Attachments

        Activity

          People

            darran.lofthouse@redhat.com Darran Lofthouse
            matejliszka_jira Matěj Liszka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: