spring-security
Installation
SKILL.md
When to use this skill
Use this skill whenever the user wants to:
- Configure authentication and authorization in Spring Boot applications
- Set up SecurityFilterChain, UserDetailsService, and PasswordEncoder
- Implement JWT-based stateless authentication
- Integrate OAuth2 client or resource server
- Use method-level security with @PreAuthorize and @Secured
- Configure CORS, CSRF, session management, and security headers
How to use this skill
Workflow
- Add the Spring Security starter dependency
- Configure SecurityFilterChain to define URL-based access rules
- Implement authentication: in-memory, JDBC, LDAP, or custom UserDetailsService
- Add authorization: role-based or expression-based access control