Uploaded image for project: 'Seam Security'
  1. Seam Security
  2. SEAMSECURITY-121

[Regression] 3.1.0.Beta4 eats exceptions in IdentityImpl + returns RESPONSE_LOGIN_FAILED instead of RESPONSE_LOGIN_EXCEPTION

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.1.0.Beta4
    • Fix Version/s: 3.1.0.Final
    • Labels:
      None

      Description

      org.jboss.seam.security.IdentityImpl#authenticate line 237 eats exceptions:

              } catch (Exception ex) {
                  authenticating = false;
                  if (ex instanceof AuthenticationException) throw (AuthenticationException) ex;
                  return false;
              }
      

      As a result, my @PostConstruct weld exception isn't show in the log between these 2 lines:

      INFO  26-10 12:05:00,849 (DemoAuthenticator.java:authenticate:65) 	 Demo login for user (admin) succeeded.
      INFO  26-10 12:39:19,825 (SecurityServiceImpl.java:login:70) 	 Logging in user [admin]
      

      Extra bug:

          public String login() {
              try {
                  ...
                  boolean success = authenticate();
      
                  ...
                  return RESPONSE_LOGIN_FAILED;
              } catch (Exception ex) { // Doesn't happen any more because authenticate() eat the exception
                  ...
                  return RESPONSE_LOGIN_EXCEPTION;
              }
          }
      

      Regression since Beta3 in Beta4.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  shane.bryzak Shane Bryzak
                  Reporter:
                  ge0ffrey Geoffrey De Smet
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: