Skip to content

Fix CORS request pattern matching in authenticators#10342

Merged
nielsm5 merged 2 commits intomasterfrom
bug/fix-cors-options-pattern-matcher-in-authenticators
Jan 28, 2026
Merged

Fix CORS request pattern matching in authenticators#10342
nielsm5 merged 2 commits intomasterfrom
bug/fix-cors-options-pattern-matcher-in-authenticators

Conversation

@nielsm5
Copy link
Member

@nielsm5 nielsm5 commented Jan 28, 2026

Not sure since when, but most likely since Spring 7, we are now getting the following exception:

2026-01-28 12:48:23,456 TRACE [http-nio-8080-exec-5] {} access.ExceptionTranslationFilter - Sending to authentication entry point since authentication failed
org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
	...
	at org.springframework.security.authorization.AuthenticatedAuthorizationManager.authorize(AuthenticatedAuthorizationManager.java:117) ~[spring-security-core-7.0.2.jar:7.0.2]
	... suppressed 15 lines
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-7.0.3.jar:7.0.3]
	... suppressed 3 lines
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-7.0.3.jar:7.0.3]
	... suppressed 4 lines
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) ~[spring-web-7.0.3.jar:7.0.3]
	... suppressed 2 lines
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-7.0.3.jar:7.0.3]
	... suppressed 2 lines
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-7.0.3.jar:7.0.3]
	... suppressed 3 lines
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113) ~[spring-web-7.0.3.jar:7.0.3]
	at org.springframework.web.filter.ServletRequestPathFilter.doFilter(ServletRequestPathFilter.java:52) ~[spring-web-7.0.3.jar:7.0.3]
....

instead of 'no authentication object ==> allowed'.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
27.6% Coverage on New Code (required ≥ 65%)

See analysis details on SonarQube Cloud

@nielsm5 nielsm5 merged commit 86a1356 into master Jan 28, 2026
21 of 23 checks passed
@nielsm5 nielsm5 deleted the bug/fix-cors-options-pattern-matcher-in-authenticators branch January 28, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants