add-security

Community

Add Spring Security without breaking tests

Authordprice-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Adding Spring Security to a Spring Boot 4 project often causes every existing controller test to fail with unexpected 401/403 responses, because the security filter chain changes request authorization behavior at runtime.

Core Features & Use Cases

  • Dependency-ready security setup: Adds the right Spring Security starters for baseline security plus JWT Resource Server and OAuth2 Client scenarios.
  • Production-style SecurityFilterChain configuration: Provides stateless JWT and Basic Auth patterns, including explicit health endpoint access for Kubernetes probes.
  • End-to-end test ripple fixes: Shows how to update @WebMvcTest, @SpringBootTest, E2E, and acceptance/Pact test setups so security-aware requests behave correctly.
  • OpenAPI and pact alignment: Guides adding bearerAuth to the OpenAPI spec and handling authentication as an orthogonal concern for Pact provider verification.

Quick Start

Use the add-security skill when you need to secure an existing Spring Boot 4 API and keep your unit, component, E2E, acceptance, and contract tests passing after enabling authentication and authorization.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-security
Download link: https://github.com/dprice-dev/claude-java-skills/archive/main.zip#add-security

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.