Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

collective.rercaptcha

Integration with captcha validator in Plone

Features

This project implements an event subscriber that catch every IBeforeTraverseEvent event and an expander for using the functionality from the frontend.

In order to be checked by the captcha service, a request:

  • has to be a POST request
  • has to be included in a list (configurable from the controlpanel)

The custom frontend form will send a request to an eternal captcha valdidator service and recieve a token that will be sent to the backend with all the POST payload. The backend will then verify the legitimacy of the request by checking the same external service for a confirmation.

All requests that are not POST will not be checked. All POST requests that are not on the configurable list will not be checked. All POST requests on the list that don't have the token in the payload will be blocked. All POST requests on the list that have a token not validated by the external service will be blocked.

Configuration

A custom controlpanel is added for easy configurability:

  • use_captcha, a boolean value that enables the checks
  • captcha_uri, the url to the external validator
  • whitelisted_routes, the routes (last portions of urls) that will be subject to the validator.
  • captcha_site_key and captcha_secret, used during the validator phase in the backend, in the shape shown below:
requests.post(
    f"{captcha_uri}/{captcha_site_key}/siteverify",
    data={"secret": captcha_secret, "response": token})

every custom form that implements this service will have to read the custom expander:

"rercaptcha-data": {
    "@id": ...,
    "captcha-url": captcha_uri,
    "captcha-site-key": captcha_site_key,
}

Installation

Install collective.rercaptcha with uv.

uv add collective.rercaptcha

Create the Plone site.

make create-site

Contribute

Prerequisites ✅

Installation 🔧

  1. Clone this repository.

    git clone git@github.com:RegioneER/collective-rercaptcha.git
    cd collective-rercaptcha/backend
    
  2. Install this code base.

    make install
    

Add features using plonecli or bobtemplates.plone

This package provides markers as strings (<!-- extra stuff goes here -->) that are compatible with plonecli and bobtemplates.plone. These markers act as hooks to add all kinds of features through subtemplates, including behaviors, control panels, upgrade steps, or other subtemplates from bobtemplates.plone. plonecli is a command line client for bobtemplates.plone, adding autocompletion and other features.

To add a feature as a subtemplate to your package, use the following command pattern.

make add <template_name>

For example, you can add a content type to your package with the following command.

make add content_type

You can add a behavior with the following command.

make add behavior
You can check the list of available subtemplates in the [`bobtemplates.plone` `README.md` file](https://github.com/plone/bobtemplates.plone/?tab=readme-ov-file#provided-subtemplates).
See also the documentation of [Mockup and Patternslib](https://6.docs.plone.org/classic-ui/mockup.html) for how to build the UI toolkit for Classic UI.

License

The project is licensed under GPLv2.

Credits and acknowledgements 🙏

Generated from the cookieplone-templates template on 2026-03-02 13:59:22.. A special thanks to all contributors and supporters!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective_rercaptcha-1.0.0a20.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

collective_rercaptcha-1.0.0a20-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file collective_rercaptcha-1.0.0a20.tar.gz.

File metadata

  • Download URL: collective_rercaptcha-1.0.0a20.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for collective_rercaptcha-1.0.0a20.tar.gz
Algorithm Hash digest
SHA256 dc671ba49fb2fca1ec1f7b60a30ba33873a734479e022abb81aae9347d42aaea
MD5 88bbcce2af19fc905cf3162ed66953b1
BLAKE2b-256 e5dfcd4455d439b1ba29b890b0ddc537636209075d911c02735873ec7cddbc11

See more details on using hashes here.

File details

Details for the file collective_rercaptcha-1.0.0a20-py3-none-any.whl.

File metadata

  • Download URL: collective_rercaptcha-1.0.0a20-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for collective_rercaptcha-1.0.0a20-py3-none-any.whl
Algorithm Hash digest
SHA256 6586e144b538d6d2a247918b01181a48846897920d8e1bf0c219510b7d1568bc
MD5 7398417b97be89b96b970da811f3bf65
BLAKE2b-256 4630b5e4b3e880e78eb10bdf9ddce370af44ab05ba32dc6ff1178f3a25d32fc0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page