Moving the authorized client to JdbcOAuth2AuthorizedClientService makes tokens work across replicas, so the session-in-Redis plus tokens-in-PostgreSQL split holds. The table then shows what sharing cannot fix: the primary key is (client_registration_id, principal_name) with no session in it, so a second login for the same user updates the same row rather than adding one. The refresh token sits in bytea as the raw JWT, readable with convert_from, and logout clears only the Redis session while the plaintext token row and the Keycloak SSO session both survive. The schema itself failed silently first because the default DDL uses blob, which PostgreSQL does not have, and continue-on-error swallowed it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
15 lines
519 B
Plaintext
15 lines
519 B
Plaintext
=== Q1 검증 ④ — 로그아웃 후 두 저장소 상태 ===
|
|
Redis 세션 : 0 키
|
|
PostgreSQL 토큰 : 1 행
|
|
|
|
principal_name | access_token_issued_at | access_token_expires_at
|
|
----------------+----------------------------+----------------------------
|
|
labuser | 2026-09-04 05:12:13.018828 | 2026-09-04 05:13:13.018828
|
|
(1 row)
|
|
|
|
|
|
★ Redis 는 비었는데 PostgreSQL 에 행이 남아 있으면 → 한쪽만 정리된 것
|
|
|
|
=== Keycloak 쪽 SSO 세션은? ===
|
|
Keycloak 온라인 세션: 2
|