Client certificate variables

Last updated Apr 17, 2026 When a request includes a client certificate for mTLS authentication, Cloudflare exposes certificate details as variables in the Ruleset Engine and as properties on the Workers request.cf object.

Ruleset Engine fields

Client certificate fields are available as mTLS fields in Ruleset Engine-based products such as WAF custom rules and request header modification rules.

Workers variables

These variables are also available as part of the request.cf.tlsClientAuth object via Cloudflare Workers. Refer to the linked Rules language field for the full definition.

Note

Some tlsClientAuth properties have a different type than their Rules language field equivalent. Those differences are called out in the following list.

Was this helpful?

YesNo

On this page

Client certificate variables - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ssl/client-certificates/client-certificate-variables/#page","headline":"Client certificate variables","description":"Variables available in WAF rules when using client certificates.","url":"https://developers.cloudflare.com/ssl/client-certificates/client-certificate-variables/","inLanguage":"en","image":"https://developers.cloudflare.com/ssl/client-certificates/client-certificate-variables/og.png?v=1092325fc5b2749f","dateModified":"2026-04-17","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["mTLS"]}


description: This tutorial demonstrates how to configure your Internet-of-things (IoT) device and mobile application to use client certificates with API Shield. title: Configure your mobile app or IoT device image: https://developers.cloudflare.com/ssl/client-certificates/configure-your-mobile-app-or-iot-device/og.png?v=6ab04df5b7dcb745


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/ssl/llms.txt
Use this file to discover all available pages before exploring further.