Requirements:
- Google reCAPTCHA account and API keys
Installation:
1. Activate CKAN virtualenv
2. Clone and install:
git clone https://github.com/DataShades/ckanext-recaptcha.git
cd ckanext-recaptcha
pip install -e .
pip install -r requirements.txt
Add to ckan.plugins:
recaptcha
Configuration:
(Note: Specific config settings to be documented)
Google reCAPTCHA site key (public key)
ckanext.recaptcha.site_key = YOUR_SITE_KEY
Google reCAPTCHA secret key (private key)
ckanext.recaptcha.secret_key = YOUR_SECRET_KEY
reCAPTCHA version (v2 or v3)
ckanext.recaptcha.version = v2
Setup:
1. Register site at https://www.google.com/recaptcha/admin
2. Select reCAPTCHA type (v2 Checkbox, v2 Invisible, or v3)
3. Add your domain(s)
4. Copy site key and secret key to CKAN config
5. Restart CKAN
Features:
- CAPTCHA protection for public forms
- Prevents automated bot submissions
- Protects user registration
- Protects login forms
- Protects contact/feedback forms
- Google reCAPTCHA integration
Development:
git clone https://github.com/DataShades/ckanext-recaptcha.git
cd ckanext-recaptcha
python setup.py develop
pip install -r dev-requirements.txt
Testing: pytest –ckan-ini=test.ini