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.
npx claudepluginhub joaquimscosta/arkhe-claude-plugins --plugin spring-bootThis skill uses the workspace's default tool permissions.
Implements authentication and authorization with Spring Security 7's mandatory Lambda DSL.
Guides Spring Security implementation for authentication, authorization, OAuth2, JWT, CORS, CSRF in Spring Boot applications.
Creates Spring Security @Configuration class with filterChain for authentication, authorization, and HTTP protection. Use for REST APIs, OAuth2/OIDC login, or JWT resource servers.
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.
Share bugs, ideas, or general feedback.
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)