Исправить обход отзыва сессии при сбое Valkey

resolve() больше не доверяет кэшу: валидность сессии всегда проверяется в PostgreSQL, поэтому неудавшаяся инвалидация при недоступном Valkey не воскрешает отозванный токен. Valkey остаётся read-through кэшем неизменяемого профиля. Добавлены scripts/check-revocation.py и student-tests/test_session_revocation.py.
This commit is contained in:
2026-10-23 19:46:34 +03:00
parent eeee24d3d7
commit c60c78b51e
18 changed files with 198 additions and 36 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
Pausing Valkey (messenger-lab3-valkey-1) ...
Logout returned 204 while the cache was unavailable.
Valkey resumed; waiting 6.0s for the cache circuit breaker ...
PASS: revoked session stays 401 through 2 replica(s) and cannot post after a failed cache invalidation.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
messenger-lab3-valkey-1
messenger-lab3-valkey-1
Pausing Valkey; valid traffic must keep working (cache bypassed).
statuses during pause: [200, 200, 200, 200, 200]
ready: 200
PASS: valid traffic served from PostgreSQL with Valkey unavailable.