Skip to content

refactor(security): migrate to component-based SecurityFilterChain (r…#1174

Open
Nikhil-0710 wants to merge 1 commit into
viru0909-dev:mainfrom
Nikhil-0710:refactor/issue-834-spring-security
Open

refactor(security): migrate to component-based SecurityFilterChain (r…#1174
Nikhil-0710 wants to merge 1 commit into
viru0909-dev:mainfrom
Nikhil-0710:refactor/issue-834-spring-security

Conversation

@Nikhil-0710
Copy link
Copy Markdown

Description

This PR addresses the technical debt associated with the Spring Boot 3 upgrade by completely removing the deprecated WebSecurityConfigurerAdapter and replacing it with the modern component-based SecurityFilterChain architecture.

Closes #834

Changes Made:

  • Removed extends WebSecurityConfigurerAdapter from SecurityConfig.java.
  • Implemented @Bean for SecurityFilterChain utilizing lambda DSLs.
  • Implemented @Bean for AuthenticationManager.
  • Replaced deprecated antMatchers with requestMatchers.
  • Maintained all existing CORS, CSP, and RBAC endpoint rules.
  • Retained the custom validateJwtSecretConfiguration lifecycle hook.

Checklist:

  • I have performed a self-review of my own code.
  • Code compiles locally without errors (mvn clean compile).
  • No unrelated environment files or target directories are included in this PR.
  • Commit message follows Conventional Commits.

@Nikhil-0710 Nikhil-0710 requested a review from viru0909-dev as a code owner June 4, 2026 18:53
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 4, 2026

@Nikhil-0710 is attempting to deploy a commit to the CodeBlooded's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Hi @Nikhil-0710, thanks for contributing to Nyay Setu! 🎉

I have automatically:

  • 👤 Assigned this PR to you.
  • 🏷️ Applied the gssoc:approved label.

Our workflows will now analyze your changes to classify:

  • 📈 PR Difficulty: level:*
  • 🧩 PR Type: type:*
  • 🌟 PR Quality: quality:*

Tip

Ensure your PR description references the issue it resolves (e.g. Closes #123). This allows the bot to inherit any additional labels from that issue!

Happy coding! 🚀

Copy link
Copy Markdown
Owner

@viru0909-dev viru0909-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved and merging. The test suite passes cleanly. Good work.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] Remove deprecated Spring Security WebSecurityConfigurerAdapter

2 participants