Skip to content

feat: persist auth sessions in PostgreSQL - #7

Merged
ramioooz merged 2 commits into
mainfrom
feature/45-auth-postgres-session-persistence
Sep 4, 2026
Merged

ramioooz merged 2 commits into
mainfrom
feature/45-auth-postgres-session-persistence

Conversation

@ramioooz

@ramioooz ramioooz commented Sep 4, 2026

Copy link
Copy Markdown
Member

Closes digital-bank-java/.github#45
Related: digital-bank-java/.github#28

Summary

  • Replace production InMemorySessionRepository wiring with a transactional PostgreSQL/JPA adapter behind the existing SessionRepository port.
  • Add Flyway migration for durable auth sessions and idempotent revocation.
  • Serialize same-username REVOKE_PREVIOUS opens with a PostgreSQL transaction advisory lock for replica-safe behavior.
  • Keep login, logout, token/session lookup, ports, domain behavior, and fixture credential boundaries unchanged.
  • Add SIT Helm datasource wiring through the existing postgres Secret and minimal Testcontainers persistence/concurrency coverage.

Verification

  • ./mvnw --batch-mode --no-transfer-progress verify passed: 19 unit tests and 9 integration tests.
  • helm lint helm --strict --values helm/values-sit.yaml passed.
  • helm template auth-service helm --namespace digital-bank-sit --values helm/values-sit.yaml passed.
  • git diff --check passed.

Related work and merge order

Refresh tokens, login redesign, MFA implementation, customer identity integration, and gateway exposure remain out of scope.

@ramioooz
ramioooz merged commit 5534ec3 into main Sep 4, 2026
3 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.

STORY: Create auth-service with login and logout

1 participant