Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/content/docs/cloudflare-challenges/concepts/clearance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ sidebar:
---
import { Render } from "~/components";

## `cf-clearance` cookies
## `cf_clearance` cookies

A `cf-clearance` cookie proves to Cloudflare that the visitor is a verified human and has passed the Challenge presented to them.
A `cf_clearance` cookie proves to Cloudflare that the visitor is a verified human and has passed the Challenge presented to them.

If a visitor passes an Interactive Challenge (highest security level), then the `cf-clearance` cookie indicates this to the origin and allows the visitor to bypass any other Challenge on the website, whether it is another Interactive Challenge, a Managed Challenge, or a non-interactive JavaScript Challenge for as long as the cookie is valid.
If a visitor passes an Interactive Challenge (highest security level), then the `cf_clearance` cookie indicates this to the origin and allows the visitor to bypass any other Challenge on the website, whether it is another Interactive Challenge, a Managed Challenge, or a non-interactive JavaScript Challenge for as long as the cookie is valid.

If a visitor receives a `cf-clearance` cookie on a page that uses a WAF rule with Managed or JavaScript Challenge (lower security levels), then encountering a different page with a higher security clearance level Challenge will prompt them to solve the Challenge again.
If a visitor receives a `cf_clearance` cookie on a page that uses a WAF rule with Managed or JavaScript Challenge (lower security levels), then encountering a different page with a higher security clearance level Challenge will prompt them to solve the Challenge again.

The original `cf-clearance` cookie that was issued to the visitor from a lower security clearance level Challenge will be replaced with the new `cf-clearance` cookie from a higher security clearance level Challenge.
The original `cf_clearance` cookie that was issued to the visitor from a lower security clearance level Challenge will be replaced with the new `cf_clearance` cookie from a higher security clearance level Challenge.

## Pre-clearance support in Turnstile

Pre-clearance in [Turnstile](/turnstile/) allows websites to streamline user experiences by using `cf-clearance` cookies. The `cf-clearance` cookie enables visitors to bypass WAF Challenges downstream, based on the security clearance level set by the customer. This can be particularly useful for trusted visitors, enhancing usability while maintaining security.
Pre-clearance in [Turnstile](/turnstile/) allows websites to streamline user experiences by using `cf_clearance` cookies. The `cf_clearance` cookie enables visitors to bypass WAF Challenges downstream, based on the security clearance level set by the customer. This can be particularly useful for trusted visitors, enhancing usability while maintaining security.

By default, Turnstile issues a one-time use token to the visitor when they solve a Challenge via the widget. The token goes to your website's backend that needs to be validated by Siteverify API.

Expand All @@ -30,12 +30,12 @@ The clearance token cannot be used again.

| Challenge type | Issued clearance |
| --- | --- |
| Challenge Page | `cf-clearance` cookie (default)
| Turnstile widget | Token (default) <br /> `cf-clearance cookie` (optional addition) |
| Challenge Page | `cf_clearance` cookie (default)
| Turnstile widget | Token (default) <br /> `cf_clearance` cookie (optional addition) |

When you enable pre-clearance support on Turnstile, a `cf-clearance` cookie is issued to the visitor in addition to the default Turnstile token.
When you enable pre-clearance support on Turnstile, a `cf_clearance` cookie is issued to the visitor in addition to the default Turnstile token.

You can integrate Cloudflare Challenges by allowing Turnstile to issue a `cf-clearance` cookie as pre-clearance to your visitor. The pre-clearance level is set upon widget creation or widget modification using the Turnstile API's clearance_level. Possible values for the configuration are:
You can integrate Cloudflare Challenges by allowing Turnstile to issue a `cf_clearance` cookie as pre-clearance to your visitor. The pre-clearance level is set upon widget creation or widget modification using the Turnstile API's clearance_level. Possible values for the configuration are:

- `interactive`
- `managed`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ For example, the solve rate values in your analytics may look like this:

- **Non-interactive solves**: Challenges solved without requiring the visitor to click a checkbox.
- **Interactive solves**: Challenges solved that required visitor interaction to be solved.
- [**Pre-clearance solves**](/turnstile/concepts/pre-clearance-support/): Challenges solved that issued the `cf-clearance` cookie along with the Turnstile token.
- [**Pre-clearance solves**](/turnstile/concepts/pre-clearance-support/): Challenges solved that issued the `cf_clearance` cookie along with the Turnstile token.

A low solve rate might indicate increased bot activity attempting to bypass Turnstile or anomalous traffic patterns that require further investigation.