Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Provide Access to Spring WebSocket's Configured PathMatcher [SPR-12845] #17443
Spring Security should be able to default to using the same PathMatcher that Spring WebSockets is using. This is ideal so that they both use the same PathMatcher (i.e. using . or / separators).
Using SimpAnnotationMethodMessageHandler PathMatcher property does not work because it fails with a circular bean reference. This happens because:
You can find my attempt at https://github.com/rwinch/spring-security/tree/SEC-2864 The exact test is AbstractSecurityWebSocketMessageBrokerConfigurerTests#msmsRegistryCustomPatternMatcher
Note that I cannot use MessageBrokerRegistry directly because it is not exposed as a Bean and the accessor is protected.
Rob Winch commented
I tried to update to use
I'm not sure this can be done without one of the following options: