Google reCAPTCHA

reCAPTCHA is a Google service that protects your CAS deployment from spam and abuse. It uses advanced risk analysis techniques to tell humans and bots apart. CAS supports the reCAPTCHA API v2 and v3.

Support is enabled by including the following module in the WAR Overlay:

implementation "org.apereo.cas:cas-server-support-captcha:${project.'cas.version'}"
<dependency>
  <groupId>org.apereo.cas</groupId>
  <artifactId>cas-server-support-captcha</artifactId>
  <version>${cas.version}</version>
</dependency>
dependencyManagement {
  imports {
    mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
  }
}

dependencies {  
  implementation "org.apereo.cas:cas-server-support-captcha"
}

The following settings and properties are available from the CAS configuration catalog:

The configuration settings listed below are tagged as Required in the CAS configuration metadata. This flag indicates that the presence of the setting is not strictly necessary in the end-user CAS configuration, because a default value may be assigned or the feature in question may not be immediately intended for use. You may want to own the setting and update it assigned value, assuming the intended feature controlled by the setting is utilized.

  • cas.google-recaptcha.enabled=true
  • Whether google reCAPTCHA should be enabled.

  • cas.google-recaptcha.score=0.5
  • reCAPTCHA v3 returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot). reCAPTCHA learns by seeing real traffic on your site. For this reason, scores in a staging environment or soon after implementing may differ from production. As reCAPTCHA v3 doesn't ever interrupt the user flow, you can first run reCAPTCHA without taking action and then decide on thresholds by looking at your traffic in the admin console. By default, you can use a threshold of 0.5.

  • cas.google-recaptcha.secret=
  • The google reCAPTCHA site secret.

  • cas.google-recaptcha.site-key=
  • The google reCAPTCHA site key.

  • cas.google-recaptcha.verify-url=https://www.google.com/recaptcha/api/siteverify
  • The google reCAPTCHA endpoint for verification of tokens and input.

    The configuration settings listed below are tagged as Optional in the CAS configuration metadata. This flag indicates that the presence of the setting is not immediately necessary in the end-user CAS configuration, because a default value is assigned or the activation of the feature is not conditionally controlled by the setting value.