{
  "doc": {
    "id": "app/references/client-certificates",
    "title": "Configure Client Certificates in Cypress",
    "description": "Configure certificate authority (CA) and client certificates to use within tests on a per-URL basis.",
    "section": "app",
    "source_path": "/llm/markdown/app/references/client-certificates.md",
    "version": "24a73f8a97175663aaffd3b016289fb2a523a4ea",
    "updated_at": "2026-05-14T20:17:33.301Z",
    "headings": [
      {
        "id": "app/references/client-certificates#client-certificates",
        "text": "Client Certificates",
        "level": 1
      },
      {
        "id": "app/references/client-certificates#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "app/references/client-certificates#usage",
        "text": "Usage",
        "level": 2
      },
      {
        "id": "app/references/client-certificates#history",
        "text": "History",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "app/references/client-certificates#syntax",
      "doc_id": "app/references/client-certificates",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n**clientCertificates _(Object\\[\\])_**\n\nAn array of objects defining the certificates. Each object must have the following properties\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `url` | `String` | URL to match requests against. Wildcards following [minimatch](https://github.com/isaacs/minimatch) rules are supported. |\n| `ca` | `Array` | _(Optional)_ Paths to one or more CA files to validate certs against, relative to project root. |\n| `certs` | `Object[]` | A PEM format certificate/private key pair or PFX certificate container |\n\nEach object in the `certs` array can define either a **PEM format certificate/private key pair** or a **PFX certificate container**.\n\n**A PEM format certificate/private key pair can have the following properties:**\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `cert` | `String` | Path to the certificate file, relative to project root. |\n| `key` | `String` | Path to the private key file, relative to project root. |\n| `passphrase` | `String` | _(Optional)_ Path to a text file containing the passphrase, relative to project root. |\n\n**A PFX certificate container can have the following properties:**\n\n| Property | Type | Description |\n| --- | --- | --- |\n| `pfx` | `String` | Path to the certificate container, relative to project root. |\n| `passphrase` | `String` | _(Optional)_ Path to a text file containing the passphrase, relative to project root. |\n",
      "section": "app",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/app/references/client-certificates.json",
      "token_estimate": 319
    },
    {
      "id": "app/references/client-certificates#usage",
      "doc_id": "app/references/client-certificates",
      "heading": "Usage",
      "heading_level": 2,
      "content_markdown": "## Usage\n\nTo configure CA / client certificates within your Cypress configuration, you can add the `clientCertificates` key to define an array of client certificates as shown below:\n\n*   cypress.config.js\n*   cypress.config.ts\n\n```\nconst { defineConfig } = require('cypress')module.exports = defineConfig({  clientCertificates: [    {      url: 'https://a.host.com',      ca: ['certs/ca.pem'],      certs: [        {          cert: 'certs/cert.pem',          key: 'certs/private.key',          passphrase: 'certs/pem-passphrase.txt',        },      ],    },    {      url: 'https://b.host.com/a_base_route/**',      ca: [],      certs: [        {          pfx: '/home/tester/certs/cert.pfx',          passphrase: '/home/tester/certs/pfx-passphrase.txt',        },      ],    },    {      url: 'https://a.host.*.com/',      ca: [],      certs: [        {          pfx: 'certs/cert.pfx',          passphrase: 'certs/pfx-passphrase.txt',        },      ],    },  ],})\n```\n\n```\nimport { defineConfig } from 'cypress'export default defineConfig({  clientCertificates: [    {      url: 'https://a.host.com',      ca: ['certs/ca.pem'],      certs: [        {          cert: 'certs/cert.pem',          key: 'certs/private.key',          passphrase: 'certs/pem-passphrase.txt',        },      ],    },    {      url: 'https://b.host.com/a_base_route/**',      ca: [],      certs: [        {          pfx: '/home/tester/certs/cert.pfx',          passphrase: '/home/tester/certs/pfx-passphrase.txt',        },      ],    },    {      url: 'https://a.host.*.com/',      ca: [],      certs: [        {          pfx: 'certs/cert.pfx',          passphrase: 'certs/pfx-passphrase.txt',        },      ],    },  ],})\n```\n",
      "section": "app",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/app/references/client-certificates.json",
      "token_estimate": 203
    }
  ]
}