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.0a21.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.0a21-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: collective_rercaptcha-1.0.0a21.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.0a21.tar.gz
Algorithm Hash digest
SHA256 71210550bd6cf6d09d7f61d71051fe5c457493a9c3daf3946ae7de96a00b0b55
MD5 62b8239b67f96217209576423ace9059
BLAKE2b-256 44fd4c31cb8aa90983a8a8a678af9fe63c845fb0bd2ac0deceb62b62eae2a475

See more details on using hashes here.

File details

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

File metadata

  • Download URL: collective_rercaptcha-1.0.0a21-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.0a21-py3-none-any.whl
Algorithm Hash digest
SHA256 5b10e018ea382a1dcc14b81487142c00fca03cc778382a2d87b4e1d24e2c593a
MD5 44a0f32e7c0d95bae04f3b6eb3145340
BLAKE2b-256 82a04f15704bfb5e7e3f176de53509305c271c7b65bb6679a8cab132023488b1

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