Skip to content

Restructure AuthenticationServiceException handling #12134

Open
@jzheaux

Description

@jzheaux

An AuthenticationServiceException represents something that went wrong on the server side. As such, it shouldn't be handled by AuthenticationEntryPoints.

This means that likely is shouldn't be handled by ExceptionTranslationFilter or any of the authentication filters.

However, because this class extends AuthenticationException, it is required for each component to somehow opt-out of handing to its AuthenticationEntryPoint.

One way to address this is to change AuthenticationServiceException to no longer inherit from AuthenticationException. Another way would be to add a new exception like AuthenticationServerErrorException -- similar to spring-web's HttpServerErrorException -- that doesn't inherit from AuthenticationException.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreAn issue in spring-security-coretype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions