From spring-boot
Configures Spring Security 7 authentication, authorization, OAuth2/JWT resource servers, method security, CORS/CSRF for Spring Boot 4. Covers Lambda DSL migration, SecurityFilterChain, @PreAuthorize, password encoding.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spring-boot:spring-boot-securityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Implements authentication and authorization with Spring Security 7's mandatory Lambda DSL.
Implements authentication and authorization with Spring Security 7's mandatory Lambda DSL.
| Removed API | Replacement | Status |
|---|---|---|
and() method | Lambda DSL closures | Required |
authorizeRequests() | authorizeHttpRequests() | Required |
antMatchers() | requestMatchers() | Required |
WebSecurityConfigurerAdapter | SecurityFilterChain bean | Required |
@EnableGlobalMethodSecurity | @EnableMethodSecurity | Required |
See WORKFLOW.md for detailed step-by-step instructions with code examples.
See EXAMPLES.md for complete working examples including:
and() chaining)Argon2PasswordEncoder.defaultsForSpring7()CookieCsrfTokenRepository.withHttpOnlyFalse()@EnableGlobalMethodSecurity| Need | Skill |
|---|---|
| Testing secured endpoints | spring-boot-testing |
| Actuator endpoint security | spring-boot-observability |
| Dependency verification | spring-boot-verify |
| Anti-Pattern | Fix |
|---|---|
Using and() chaining | Use Lambda DSL closures |
antMatchers() | Replace with requestMatchers() |
authorizeRequests() | Replace with authorizeHttpRequests() |
| CSRF disabled without JWT | Keep CSRF for session-based auth |
| Hardcoded credentials | Use environment variables or Secret Manager |
permitAll() on sensitive endpoints | Audit all permit rules |
Missing authenticated() default | End with .anyRequest().authenticated() |
and() chaining in Security 7requestMatchers before general ones@EnableMethodSecurity@WithMockUser and JWT test support (see spring-boot-testing)npx claudepluginhub joaquimscosta/arkhe-claude-plugins --plugin spring-bootReviews existing Spring Security configs or implements JWT auth, OAuth2, method-level security, CORS, and CSRF in Spring Boot projects. Audits for OWASP issues like exposed actuators and weak hashing.
Generates a Spring Security configuration class with authentication, authorization, and HTTP protection. Supports OAuth2/OIDC login and JWT resource server setup.
Implements JWT authentication and authorization patterns for Spring Boot 3.5.x using Spring Security 6.x and JJWT: token generation, Bearer/cookie auth, refresh tokens, OAuth2 integration, RBAC permissions. Use for securing REST APIs.