Announcement Announcement Module
Collapse
No announcement yet.
LockedException is not publishing AuthenticationFailureLockedEvent Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • LockedException is not publishing AuthenticationFailureLockedEvent

    Hi,

    I'm using Spring Security 3.1.0. I want to be able to log authentication attempts on locked accounts. The LoggerListener class logs attempts when it receives a AuthenticationFailureLockedEvent. The DefaultAuthenticationEventPublisher publishes that event when its publishAuthenticationFailure() is called with a LockedException. And a ProviderManager calls publishAuthenticationFailure() when there is a LockedException.

    The problem is that I have two ProviderManagers for some reason, a parent and a child. The parent has my AuthenticationProviders and a DefaultAuthenticationEventPublisher. The child has no AuthenticationProviders and a ProviderManager$NullEventPublisher. The authenticate() method of the child calls the one in the parent. When the authenticate() method of the parent gets the LockedException (as an AccountStatusException) it immediately throws it to the child (line 165). The child tries to publish the event, but because it has a NullEventPublisher, the event is never published, the LoggerListener never sees it, and nothing gets logged.

    I have a bog standard configuration, so I'm wondering why I have two ProviderManagers, whether I've misconfigured something, or whether this is a bug in the code.

    Any help would be appreciated,
    Emerson

  • #2
    Hi,
    Just wondering if you had any luck with this as I have just come across the same problem. Seems to be throwing a

    Code:
    AuthenticationFailureServiceExceptionEvent
    Instead?

    Thanks
    David

    Comment


    • #3
      I haven't pursued it further, got side tracked. I opened a JIRA (https://jira.springsource.org/browse/SEC-1940) and was asked to provide more details. I'm using a vanilla configuration, so not sure what I'm supposed to provide. Can you vote it up and give more info on JIRA?

      Comment


      • #4
        Cheers, I added more info to that JIRA so hopefully that will help

        Comment

        Working...
        X