Добавлена Яндекс.Капча
This commit is contained in:
@@ -306,12 +306,14 @@ Frontend передаёт необязательные `han_device_id`, `han_fin
|
||||
3. SPI product send limits per phone HMAC;
|
||||
4. verify-attempt limit per challenge/phone/IP hash;
|
||||
5. cooldown after repeated failures;
|
||||
6. CAPTCHA/risk engine — future extension.
|
||||
6. невидимая Yandex SmartCaptcha перед каждым первичным и повторным заказом OTP SMS.
|
||||
|
||||
Realm включает brute-force protection с temporary lockout и bounded wait. Permanent lockout для consumer phone login без recovery runbook нежелателен. Error messages не различают unknown phone/wrong code/locked account сверх безопасной UX причины. `Retry-After`/remaining time выдаётся только если не помогает enumeration.
|
||||
|
||||
IP берётся только из trusted proxy chain; Keycloak настроен доверять forwarded headers от root nginx.
|
||||
|
||||
SmartCaptcha включается только через `KEYCLOAK_YANDEX_CAPTCHA_ENABLED`; client/server keys обязательны при `true`. Одноразовый token проверяется server-side до `OtpFlow.start()`/counter reservation. `status=failed`, отсутствующий token и non-temporary HTTP 4xx блокируют SMS; timeout, I/O, HTTP 408/429/5xx и malformed response работают fail-open с безопасным логом. Сложность и traffic rules принадлежат одной CAPTCHA в Yandex Cloud. CSP с доменами SmartCaptcha задаётся точечно в nginx только для login endpoints; custom realm CSP запрещён из-за риска поломки Admin Console/`3p-cookies`.
|
||||
|
||||
## 10. Claims и token contract
|
||||
|
||||
Access token минимум:
|
||||
@@ -735,4 +737,4 @@ TLS client→nginx; Keycloak→managed PG TLS. Internal nginx→Keycloak HTTP д
|
||||
- K-TBD6: signing-key rotation interval/HSM и emergency revocation.
|
||||
- K-TBD7: RPO/RTO/event retention/legal deletion.
|
||||
- K-TBD8 закрыт module-11 для v1: vendor i-Digital Direct, credentials/template/sender/callback принадлежат `sms-service`; failover вне v1.
|
||||
- K-TBD9: CAPTCHA/risk scoring после mock.
|
||||
- K-TBD9 закрыт для v1: одна невидимая Yandex SmartCaptcha защищает initial send и resend; динамический risk scoring остаётся вне scope.
|
||||
|
||||
Reference in New Issue
Block a user