Skip to content

[boot-upgrade] [Spring-Security] Removed WebSecurityConfigurerAdapter #979

Closed

Description

@BoykoAlex

The WebSecurityConfigurerAdapter is deprecated in the last versions of Spring-Security 5.x used in Spring-Boot 2.7.x. As of Spring-Security 6.x and Spring-Boot 3.x the WebSecurityConfigurerAdapter is removed.

Migration guide for the Removed WebSecurityConfigurerAdapter

The migration guide splits migration in 5 cases (parts are completed in WebSecurityConfigurerAdapter recipe in rewrite-spring project:

  • HttpSecurity (done)
  • WebSecurity (done)
  • Authentication
    • In-Memory (done)
    • LDAP
    • JDBC

Remaining cases are LDAP and JDBC authentication which seem challenging as methods bodies requires significant changes even going outside the scope of one method. Looks like only some migration cases are possible to cover with rewrite. It is challenging to write code that would reliably determine conditions when it is possible to perform automated migration.

Activity

  1. added
    for: eclipse
    for: vscode
    and removed on Feb 24, 2023
  2. added this to the Backlog milestone on Feb 24, 2023
  3. BoykoAlex commented on Feb 27, 2023

    @BoykoAlex
    ContributorAuthor

    Marker and quickfix added to IDE: 7c5dee4

  4. BoykoAlex commented on Mar 9, 2023

    @BoykoAlex
    ContributorAuthor

    Done for 4.18.0 release.
    This is to be continued in future releases.
    The overall plan is:

    1. Modify the recipe to comment out methods that cannot be migrated and include the recipe into Boot 3 upgrade.
    2. Handle LDAP and JDBC authentication config cases
  5. martinlippert commented on Mar 9, 2023

    @martinlippert
    Member

    So we can close this one and open new and separate issues for the work to be continued in the 4.18.1 cycle? (@BoykoAlex )

  6. BoykoAlex commented on Mar 9, 2023

    @BoykoAlex
    ContributorAuthor

    Remaining bits moved to #1001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: eclipsefor: vscodetheme: refactoringtype: enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions