Skip to content

Add remaining lambda methods to configuration #13003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
6 tasks
marcusdacoregio opened this issue Apr 12, 2023 · 1 comment
Open
6 tasks

Add remaining lambda methods to configuration #13003

marcusdacoregio opened this issue Apr 12, 2023 · 1 comment
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement

Comments

@marcusdacoregio
Copy link
Contributor

marcusdacoregio commented Apr 12, 2023

  • WebSecurity#ignoring
  • LdapAuthenticationProviderConfigurer#passwordCompare
  • AuthenticationManagerBuilder#ldapAuthentication
  • AuthenticationManagerBuilder#inMemoryAuthentication
  • AuthenticationManagerBuilder#jdbcAuthentication
  • AuthenticationManagerBuilder#userDetailsService

The non-lambda methods should be deprecated

Related to:

@marcusdacoregio marcusdacoregio added in: config An issue in spring-security-config type: enhancement A general enhancement labels Apr 12, 2023
@marcusdacoregio marcusdacoregio added this to the 6.1.0-RC1 milestone Apr 12, 2023
@marcusdacoregio marcusdacoregio self-assigned this Apr 12, 2023
@marcusdacoregio marcusdacoregio removed this from the 6.1.0-RC1 milestone Apr 13, 2023
@marcusdacoregio
Copy link
Contributor Author

marcusdacoregio commented Apr 20, 2023

There is a discussion already to deprecate the AuthenticationManagerBuilder, thus not required to create new lambda methods.

@marcusdacoregio marcusdacoregio removed their assignment Apr 27, 2023
plietar added a commit to mrc-ide/packit that referenced this issue Sep 25, 2024
Spring Security has two forms of DSLs for configuring the HttpSecurity
object, one based on method chaining and [one based on lambdas][lambda-dsl].
The latter is generally more readable, as it makes it clear the scope of each
configuration block. In fact the method chaining syntax is deprecated in Spring
Security 6.2, and [will be removed in 7.0][migration].

We were using an inconsistent mix of the two. This cleans it up and uses
the lambda DSL throughout. The only exception to this is the
`AuthenticationManager` configuration, which [for some reason doesn't
have a lambda DSL][sec13003]

[lambda-dsl]: https://spring.io/blog/2019/11/21/spring-security-lambda-dsl
[migration]: https://docs.spring.io/spring-security/reference/migration-7/configuration.html
[sec13003]:  spring-projects/spring-security#13003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant