Chapter 11. Configuring reCAPTCHA for 3scale


This document describes how to configure reCAPTCHA for Red Hat 3scale API Management On-premises to protect against spam.

Prerequisites

  • An installed and configured 3scale On-Premises instance on a supported OpenShift version.
  • Get a site key and the secret key for reCAPTCHA v2. See the Register a new site web page.
  • Add the Developer Portal domain to an allowlist if you want to use domain name validation.

To configure reCAPTCHA for 3scale, perform the steps outlined in the following procedure:

11.1. Configuring reCAPTCHA for spam protection in 3scale

To configure reCAPTCHA for spam protection, you have two options how to patch the secret file that contains the reCAPTCHA. These options are in the OpenShift Container Platform (OCP) user interface or using the command line interface (CLI).

Procedure

  1. OCP 4.x: Navigate to Project: [Your_project_name] > Workloads > Secrets.
  2. Edit the system-recaptcha secret file.

    The PRIVATE_KEY and PUBLIC_KEY from the reCAPTHCA service must be in base64 format encoding. Transform the keys to base64 encoding manually.

Note

The CLI reCAPTCHA option does not require base64 format encoding.

  • CLI: Type the following command:

    oc patch secret/system-recaptcha -p '{"stringData": {"PUBLIC_KEY": "public-key-from-service", "PRIVATE_KEY": "private-key-from-service"}}'

Post-procedure steps

  • Redeploy the system pod after you have completed one of the above options.
  • In the 3scale Admin Portal turn on spam protection against users that are not signed:

    1. Navigate to Audience > Developer Portal > Spam Protection.
    2. Select one of the following options:

      • Always - reCAPTCHA will always appear when a form is presented to a user who is not logged in.
      • Suspicious only - reCAPTCHA is only shown if the automated checks detect a possible spammer.
      • Never - turns off Spam protection.

After system-app has redeployed, the pages that use spam protection on the Developer Portal will show the reCAPTCHA I’m not a robot checkbox.

I’m not a robot

Additional resources

  • See ReCAPTCHA home page for more information, guides, and support.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.