Skip to content

Reactive OAuthResourceServerSpec should allow custom error handling #6052

Closed

Description

@jzheaux

Servlet-based Spring Security allows for custom error handling via the DSL:

http
    .oauth2ResourceServer()
        .accessDeniedHandler(...)
        .authenticationEntryPoint(...)
        ....

It would be nice if Spring Security WebFlux Resource Server could do the same.

Activity

  1. added
    in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
    on Nov 6, 2018
  2. added this to the 5.2.x milestone on Nov 6, 2018
  3. sepanniemi commented on Nov 7, 2018

    @sepanniemi

    Should it be possible to customize the error handling via ExceptionHandlingSpec in ServerHttpSecurity?

    It seems that currently defining access denied handler like this has an effect

    serverHttpSecurity
                .exceptionHandling()
                    .accessDeniedHandler(accessDeniedHandler)
    

    but defining authentication entry point in a similar way does not have an effect.

    serverHttpSecurity
                .exceptionHandling()
                    .authenticationEntryPoint(authEntryPoint)
    

    and that's because AuthWebFilter is getting a hardcoded authentication entry point in the configuration?

    https://github.com/spring-projects/spring-security/blob/master/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java#L988

  4. self-assigned this
    on Nov 7, 2018
  5. added a commit that references this issue on Nov 7, 2018
    4946fa5
  6. removed this from the 5.2.x milestone on Nov 7, 2018
  7. added a commit that references this issue on Nov 7, 2018
    9a13f9a
  8. added this to the 5.2.0.M1 milestone on Nov 7, 2018
  9. added a commit that references this issue on Nov 12, 2018
  10. added a commit that references this issue on Nov 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions