login-register module) asks for a reCAPTCHA v2 (invisible) on the email login, the LDAP login, registration and password reset. Create the key and read what each setting does in reCAPTCHA; this page puts it into Kubernetes.
Configuration
1
Site key into the ConfigMap
2
Secret key and device history key into the Secret
DEVICE_HISTORY_SECRET must be 64 hex characters; the container does not generate it.3
Apply and restart
Several replicas
All replicas must shareDEVICE_HISTORY_SECRET, which they do when it is in the Secret. With different values a browser that passed on one replica would get the captcha again on another. The rate limits are counted in Redis across all replicas.
Tested on Kubernetes
Against a mock of Google’s verification endpoint (trusted throughNODE_EXTRA_CA_CERTS from overleaf-certs), on Kubernetes 1.37, our end-to-end tests for reCAPTCHA pass (13 cases): on one replica, login, registration and password reset each refused without a captcha or with a failed one and accepted with a passed one, the device history from DEVICE_HISTORY_SECRET letting a browser skip the captcha, and CAPTCHA_TRUSTED_USERS; on three replicas behind HAProxy, the LDAP login with the captcha.
