Commit Graph

4 Commits

Author SHA1 Message Date
SlimusMinus
ba6935bb1f Document multi-instance setup, rate limits and the new ad flow
README: new environment variables, ShedLock jobs and the multi-instance
section, rate limits and login lockout, profile privacy and token reissue,
WebSocket fan-out, 429 errors, tests and the updated limitations.
docs/advertising.md: serve -> impression -> click with signed tokens,
per-campaign daily caps, stats endpoint, campaign auto-finish, ads.* settings.
docs/redis.md: all new keys, pub/sub, locks, rate limiting, failure modes.
docs/images-storage.md: uploads outside transactions and orphan cleanup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:46:18 +03:00
SlimusMinus
83270a8ece Rewrite README and add docs for advertising, Redis and image storage
README described Spring Boot 3.2.5/Java 21, an open /api/v1/test, the removed
MapCacheService and a single smoke test. It now matches the code: setup,
environment variables, architecture, packages, security rules, API, WebSocket
topics, post lifecycle, errors, tests, deploy and known limitations.

docs/advertising.md, docs/redis.md and docs/images-storage.md describe the
subsystems with references to the classes. .env.example lists the remaining
optional variables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:15:37 +03:00
SlimusMinus
5cd60b6318 Harden auth: separate access/refresh JWT, atomic refresh rotation, admin checks
- Refresh JWT carried no role but was accepted by JwtAuthenticationFilter and
  the STOMP CONNECT as an access token; tokens now carry a typ claim and the
  filters accept only access tokens (legacy tokens are told apart by role).
- Refresh rotation uses GETDEL, so one refresh token cannot be spent twice;
  refresh tokens are no longer written to logs.
- isCurrentUserAdmin and file deletion compared authorities with "ADMIN"
  instead of "ROLE_ADMIN", so admins were never recognised.
- getCurrentUser answers 401 for anonymous requests; profile update keeps the
  login when the field is not sent; registration rejects empty login/password.
- GlobalExceptionHandler turned AccessDenied, BadCredentials, EntityNotFound,
  Spring MVC 4xx errors and upload limits into 500.
- Presigned URL TTL is capped at 7 days.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 00:56:38 +03:00
SlimusMinus
818c8f6a11 Add Docker build and deploy pipeline
All checks were successful
deploy-backend / deploy (push) Successful in 8m24s
2026-10-07 22:56:56 +03:00