Skip to content

feat: add browser sessions and API authorization - #3

Merged
marcelopenas merged 1 commit into
mainfrom
feature/browser-session
Nov 9, 2026
Merged

marcelopenas merged 1 commit into
mainfrom
feature/browser-session

Conversation

@marcelopenas

Copy link
Copy Markdown
Member

Static browser applications need same-origin authentication without exposing JWTs to JavaScript. Add CSRF preparation, login-to-HttpOnly-cookie exchange, current-profile lookup and logout endpoints, while retaining explicit Bearer clients. Permit anonymous catalog GETs, require ROLE_ADMIN for product/account administration, and block public internal credential routes.

Cookie authentication requires CSRF for unsafe requests; login also requires CSRF. Cookies default to Secure, HttpOnly and SameSite=Lax with /api scope. Local HTTP Compose explicitly overrides Secure.

Validation: Maven verify passed eight tests and the configured coverage gate, including a real CSRF cookie/header and login/profile exchange against local upstream fixtures. The workstation override was -Djava.version=24; the repository target remains Java 25. No new dependencies.

AI-assisted implementation/docs. Full Product authorization and production configuration require separate acceptance.

@marcelopenas
marcelopenas marked this pull request as ready for review November 9, 2026 08:14
@marcelopenas
marcelopenas merged commit 02cb5ab into main Nov 9, 2026
7 checks passed
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.

1 participant