veza/veza-backend-api/internal
senke d9b6510802 security: migrate access token to httpOnly cookie (Actions 5.1.1.1-5.1.1.3)
Backend changes (Action 5.1.1.1):
- Set access_token cookie in Login, Register, and Refresh handlers
- Cookie uses same configuration as refresh_token (httpOnly, Secure, SameSite)
- Expiry matches AccessTokenTTL (5 minutes)
- Update logout handler to clear access_token cookie

Backend middleware (Action 5.1.1.1):
- Update auth middleware to read access token from cookie first
- Fallback to Authorization header for backward compatibility
- Update OptionalAuth with same cookie-first logic

Frontend changes (Actions 5.1.1.2 & 5.1.1.3):
- Remove localStorage token storage from TokenStorage service
- TokenStorage now returns null for getAccessToken/getRefreshToken (httpOnly cookies not accessible)
- Remove Authorization header logic from API client
- Remove token expiration checks (can't check httpOnly cookies from JS)
- Update AuthContext to remove localStorage usage
- Update tokenRefresh to work without reading tokens from JS
- Simplify refresh logic: periodic refresh every 4 minutes (no expiration checks)

Security improvements:
- Access tokens no longer exposed to XSS attacks (httpOnly cookies)
- Tokens automatically sent with requests via withCredentials: true
- Backend reads tokens from cookies, not Authorization headers
- All users will need to re-login after deployment (breaking change)

Breaking change: All users must re-login after deployment
2026-01-16 01:03:23 +01:00
..
api security: create /api/v1/validate endpoint for pre-validation 2026-01-15 20:04:16 +01:00
common refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
config state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
core security: reduce access token expiry to 5 minutes 2026-01-15 20:15:45 +01:00
database state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
dto feat: Visual masterpiece - true light mode & premium UI 2026-01-11 02:32:21 +01:00
email STABILISATION: phase 3–5 – API contract, tests & chat-server hardening 2025-12-06 17:21:59 +01:00
errors refactor(marketplace): enforce unified api response envelope 2025-12-06 17:39:04 +01:00
eventbus adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
features adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
handlers security: migrate access token to httpOnly cookie (Actions 5.1.1.1-5.1.1.3) 2026-01-16 01:03:23 +01:00
infrastructure STABILISATION: phase 3–5 – API contract, tests & chat-server hardening 2025-12-06 17:21:59 +01:00
interfaces adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
jobs STABILISATION: phase 3–5 – API contract, tests & chat-server hardening 2025-12-06 17:21:59 +01:00
logging state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
metrics [BE-DB-018] be-db: Add database performance monitoring 2025-12-24 15:58:48 +01:00
middleware security: migrate access token to httpOnly cookie (Actions 5.1.1.1-5.1.1.3) 2026-01-16 01:03:23 +01:00
models incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
monitoring stabilizing veza-backend-api: P1 & P2 2025-12-16 13:34:08 -05:00
recovery incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
repositories [BE-DB-003] be-db: Add soft delete support to all models 2025-12-24 15:07:25 +01:00
repository adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
response state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
security adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
services security: reduce access token expiry to 5 minutes 2026-01-15 20:15:45 +01:00
shutdown incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
testutils stabilizing veza-backend-api: phase 1 2025-12-16 11:23:49 -05:00
tracing incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
types adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
upload [INT-015] int: Add file upload format standardization 2025-12-25 15:40:01 +01:00
utils incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
validators incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
websocket incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
workers stabilizing veza-backend-api: phase 1 2025-12-16 11:23:49 -05:00