---
title: "POST /api/v1/auth/tls-cert-auth/identities/{identityId}"
method: POST
path: "/api/v1/auth/tls-cert-auth/identities/{identityId}"
tags: ["TLS Certificate Auth"]
---

# POST /api/v1/auth/tls-cert-auth/identities/{identityId}

`POST /api/v1/auth/tls-cert-auth/identities/{identityId}`

Attach TLS Certificate Auth configuration onto machine identity

## Path parameters

- `identityId` string, required

## Request body

- object
  - `allowedCommonNames` string, nullable — The comma-separated list of trusted common names that are allowed to authenticate with Infisical.
  - `allowedSubjectAltNames` string[], nullable — The comma-separated list of trusted subject alternative names that are allowed to authenticate with Infisical. Prefix entries by type (URI:, DNS:, IP:, EMAIL:). Bare entries are treated as DNS names.
  - `caCertificate` string, required — The PEM-encoded CA certificate to validate client certificates.
  - `verifyClientCertificateChain` boolean — When false (default), the CA certificate must be the direct issuer of the client's leaf certificate. When true, the CA certificate is treated as a trust anchor and the client-presented chain (leaf plus intermediates) is validated up to it, supporting issuers that rotate beneath a stable root such as SPIRE X.509-SVIDs.
  - `accessTokenTrustedIps` object[] — The IPs or CIDR ranges that access tokens can be used from.
    - `ipAddress` string, required
  - `accessTokenTTL` integer — The lifetime for an access token in seconds.
  - `accessTokenMaxTTL` integer — The maximum lifetime for an access token in seconds.
  - `accessTokenNumUsesLimit` integer — The maximum number of times that an access token can be used.

## Response `200`

Default Response

- object
  - `identityTlsCertAuth` object, required
    - `id` string, uuid, required
    - `accessTokenTTL` number
    - `accessTokenMaxTTL` number
    - `accessTokenNumUsesLimit` number
    - `accessTokenTrustedIps` unknown
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `identityId` string, uuid, required
    - `allowedCommonNames` string, nullable
    - `encryptedCaCertificate` unknown, required
    - `allowedSubjectAltNames` string[], nullable, required
    - `verifyClientCertificateChain` boolean

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/885aef3e6c11/schema)
