-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is validtype: bugA general bugA general bug
Description
version
org.springframework.boot:spring-boot-starter-security:3.0.3-SNAPSHOT
which comes with spring-security 6.0.1
Describe the bug
when using authorizeHttpRequests
instead of the deprecated authorizeRequests
the AuthenticationProvider
is not used / basically ignored.
To Reproduce
Download linked repository and switch the commented code with the uncommented in SecurityConfig
then call http://localhost:8080/secure
// using this works 200
.authorizeRequests {
it.requestMatchers("/unsecure").permitAll()
it.anyRequest().authenticated()
}
// this block causes 403
// .authorizeHttpRequests {
// it.requestMatchers("/unsecure").permitAll()
// it.anyRequest().authenticated()
// }
Expected behavior
authorizeHttpRequests
and authorizeRequests
should behave the same.
Sample
Metadata
Metadata
Assignees
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is validtype: bugA general bugA general bug