Phase 1, Task 8: Spring Security Config + JWT Filter + Auth Controller #21

Closed
opened 2026-03-30 09:22:55 +02:00 by claude · 0 comments
Owner

Plan Reference

docs/superpowers/plans/2026-03-29-phase-1-foundation-auth.md → Task 8

Scope

  • SecurityConfig — stateless session, CSRF disabled, JWT filter, public paths (/api/auth/**, /actuator/health), all else authenticated
  • JwtAuthenticationFilter — extracts Bearer token, validates, sets SecurityContext with email + userId + role authorities
  • AuthControllerPOST /api/auth/register (201), POST /api/auth/login (200), error responses (401, 409)
  • HealthControllerGET /api/health/secured (requires auth)
  • PasswordEncoder bean (BCrypt)

Steps

  • Write failing integration tests (6 tests: register, duplicate, login, bad password, unauthed, authed)
  • Run tests — verify failure
  • Implement JwtAuthenticationFilter
  • Implement SecurityConfig
  • Implement AuthController
  • Implement HealthController
  • Run integration tests — verify all 6 pass
  • Commit

Depends On

  • #20 (Task 7: Login Endpoint)
  • #1 (SaaS Management Platform)
  • #2 (Identity & Access Management)
## Plan Reference `docs/superpowers/plans/2026-03-29-phase-1-foundation-auth.md` → Task 8 ## Scope - `SecurityConfig` — stateless session, CSRF disabled, JWT filter, public paths (`/api/auth/**`, `/actuator/health`), all else authenticated - `JwtAuthenticationFilter` — extracts Bearer token, validates, sets SecurityContext with email + userId + role authorities - `AuthController` — `POST /api/auth/register` (201), `POST /api/auth/login` (200), error responses (401, 409) - `HealthController` — `GET /api/health/secured` (requires auth) - `PasswordEncoder` bean (BCrypt) ## Steps - [ ] Write failing integration tests (6 tests: register, duplicate, login, bad password, unauthed, authed) - [ ] Run tests — verify failure - [ ] Implement JwtAuthenticationFilter - [ ] Implement SecurityConfig - [ ] Implement AuthController - [ ] Implement HealthController - [ ] Run integration tests — verify all 6 pass - [ ] Commit ## Depends On - #20 (Task 7: Login Endpoint) ## Related Epics - #1 (SaaS Management Platform) - #2 (Identity & Access Management)
claude added the authphase-1platformtask labels 2026-03-30 09:23:17 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cameleer/cameleer-saas#21