Skip to content

Auth: wire Spring Security + Spring Session JDBC end to end - #47

Open
RandyJDean wants to merge 1 commit into
07-09-auth_request-link_and_verify_flowsfrom
07-09-auth_wire_spring_security_spring_session_jdbc_end_to_end
Open

Auth: wire Spring Security + Spring Session JDBC end to end#47
RandyJDean wants to merge 1 commit into
07-09-auth_request-link_and_verify_flowsfrom
07-09-auth_wire_spring_security_spring_session_jdbc_end_to_end

Conversation

@RandyJDean

Copy link
Copy Markdown
Contributor
  • AuthController: POST /api/auth/request-link|verify|logout and
    GET /api/session; verify performs programmatic login (session id
    rotation + SecurityContextRepository save), session reads the member
    fresh so profile completion is never stale
  • SecurityConfig moved to auth/security and rewired: patchats_session
    cookie (HttpOnly, SameSite=Lax, Secure per profile, 30d) via
    DefaultCookieSerializer; dev/prod chains share CSRF-off posture
    documented in the javadoc; prod email rule kept fail-closed
  • ApiAuthenticationEntryPoint answers 401s in the ApiResponder envelope
  • AuthenticatedMember principal is Serializable (persisted by Spring
    Session) and exposes email as the indexed principal name
  • SecurityWiringTest exercises the real filter chain: anonymous 401,
    session-carried auth across requests, logout invalidation

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

RandyJDean commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@RandyJDean
RandyJDean marked this pull request as ready for review July 10, 2026 18:47
@RandyJDean
RandyJDean requested a review from a team as a code owner July 10, 2026 18:47
Comment thread src/main/java/org/patinanetwork/patchats/auth/AuthController.java
@RandyJDean
RandyJDean force-pushed the 07-09-auth_wire_spring_security_spring_session_jdbc_end_to_end branch from 37bcb7f to 81d33d2 Compare July 31, 2026 17:24
@RandyJDean
RandyJDean force-pushed the 07-09-auth_request-link_and_verify_flows branch from 9ebd548 to 2a9e88a Compare July 31, 2026 17:24
@graphite-app
graphite-app Bot requested review from Arshadul-Monir and arklian July 31, 2026 17:25
@graphite-app

graphite-app Bot commented Jul 31, 2026

Copy link
Copy Markdown

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (07/31/26)

2 reviewers were added to this PR based on Henry Chen's automation.

@RandyJDean
RandyJDean force-pushed the 07-09-auth_wire_spring_security_spring_session_jdbc_end_to_end branch from 81d33d2 to 3c0452c Compare July 31, 2026 18:17
@RandyJDean
RandyJDean force-pushed the 07-09-auth_request-link_and_verify_flows branch from 2a9e88a to 04a095e Compare July 31, 2026 18:17
- AuthController: POST /api/auth/request-link|verify|logout and
  GET /api/session; verify performs programmatic login (session id
  rotation + SecurityContextRepository save), session reads the member
  fresh so profile completion is never stale
- SecurityConfig moved to auth/security and rewired: patchats_session
  cookie (HttpOnly, SameSite=Lax, Secure per profile, 30d) via
  DefaultCookieSerializer; dev/prod chains share CSRF-off posture
  documented in the javadoc; prod email rule kept fail-closed
- ApiAuthenticationEntryPoint answers 401s in the ApiResponder envelope
- AuthenticatedMember principal is Serializable (persisted by Spring
  Session) and exposes email as the indexed principal name
- SecurityWiringTest exercises the real filter chain: anonymous 401,
  session-carried auth across requests, logout invalidation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RandyJDean
RandyJDean force-pushed the 07-09-auth_request-link_and_verify_flows branch from 04a095e to 5e4d0fb Compare August 10, 2026 18:15
@RandyJDean
RandyJDean force-pushed the 07-09-auth_wire_spring_security_spring_session_jdbc_end_to_end branch from 3c0452c to 3707e71 Compare August 10, 2026 18:15
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants