Add support for reCAPTCHA Enterprise

Created on 11 August 2021, over 3 years ago
Updated 9 March 2023, almost 2 years ago

Problem/Motivation

There is currently no option in the configuration page to select which version of reCAPTCHA (Free or Enterprise) to integrate with.

Steps to reproduce

Navigate to admin/config/services/simple_recaptcha

Proposed resolution

Add a checkbox in the config page with label: Use Enterprise JS and a textfield for the Enterprise Project ID.
This will determine the Javascript API to be loaded - https://www.google.com/recaptcha/api.js for Free version; https://www.google.com/recaptcha/enterprise.js for Enterprise version. Project ID is the ID of the Google Cloud project for which the reCAPTCHA Enterprise API is enabled.

User interface changes

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    Reroll against latest dev.

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States oheller

    At this point we should be using "v1" instead of the "v1beta1" per the documentation (https://cloud.google.com/recaptcha-enterprise/docs/migration-v1).

    If you are using v1beta1 to create and annotate assessments, we recommend using v1because the new features, such as reCAPTCHA Enterprise account defender are available only on v1. v1 supports both API key and service account authentication.

    Also the url that's constructed is pointing to the site secret and for enterprise it should be pointing to the site key instead.

  • Assigned to richardbporter
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    38 pass
  • πŸ‡ΊπŸ‡ΈUnited States richardbporter

    Started an MR with the patch applied and the URL targeting v1 - required updating how the score is accessed in the API response.

    Also the url that's constructed is pointing to the site secret and for enterprise it should be pointing to the site key instead.

    @oheller - can you clarify this?

  • Issue was unassigned.
  • πŸ‡ΊπŸ‡ΈUnited States richardbporter
  • First commit to issue fork.
  • Pipeline finished with Success
    about 2 months ago
    Total: 256s
    #382042
  • πŸ‡ΊπŸ‡ΈUnited States lisagodare@gmail.com

    Not really sure what's going on with the last commits to the merge request, but it doesn't apply to 1.x-dev or 1.0.0-beta9. I have attached a version that does apply.

  • πŸ‡§πŸ‡ͺBelgium weseze

    Since Google is transitioning to the Enterprise model before the end of the year, this looks super important to get in?

    Is the patch something that I can use on a production website? Or is more testing needed?
    Is this backwards compatible with captcha keys that have not been migrated yet?

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    @weseze we've been using it on production for a long time. I'm not sure what you mean regarding BC though.

  • πŸ‡§πŸ‡ͺBelgium weseze

    If we would include this patch on our Drupal setup, would sites that have "old" / "unmigrated" keys still work?
    All of our websites that have recaptcha shoul be on a Google Cloud project and can use the enterprise variant of the script.
    But I want to sure that if there are still websites with captcha keys that have not been migrated (yet), they will also work on the enterprise script.
    Or is that simply not an issue?

Production build 0.71.5 2024