General Information
Policy Type
Endpoints
List Policies
Add Policy
Update Policy
Delete Policy
List Policies
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Response
Success Response (200 OK)
cURL Example
Add Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example - Full Validation
Full JSON Body Example - Certificate Validation Only
Request Body Fields
operationMetadata
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| targetScope | string | Yes | - | Policy scope: ALL or ENDPOINT |
| targetEndpoint | string | No* | - | Endpoint path (required if targetScope=ENDPOINT) |
| targetEndpointHTTPMethod | string | No* | - | HTTP method (required if targetScope=ENDPOINT) |
| targetPipeline | string | Yes | - | Pipeline: REQUEST, RESPONSE, or ERROR |
| deploy | boolean | No | true | Whether to deploy after adding policy |
| deployTargetEnvironmentNameList | array | No | [] | List of environment names to deploy to |
| order | integer | No | null | Policy execution order (starts from 1) |
ALL- Policy applies to all endpointsENDPOINT- Policy applies only to specified endpoint
REQUEST- Executes in request pipeline (authenticates request)RESPONSE- Executes in response pipelineERROR- Executes in error pipeline
GET,POST,PUT,DELETE,PATCH,OPTIONS,HEAD
policy
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Policy type: policy-auth-mtls |
| description | string | No | - | Policy description |
| active | boolean | No | true | Whether policy is active |
| validateCertificate | boolean | No | true | Validate client certificate |
| validateACLForIssuer | boolean | No | true | Validate ACL for certificate issuer |
Note
validateCertificate: Whentrue, validates client certificate (signature, expiration, chain).validateACLForIssuer: Whentrue, validates that certificate issuer is in the allowed ACL list.- Both validations are enabled by default for maximum security.
Response
Success Response (200 OK)
cURL Example
Update Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Delete Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Notes and Warnings
-
Certificate Validation:
- When
validateCertificate: true, validates certificate signature, expiration, and certificate chain - Certificate must be valid and not expired
- Certificate chain must be trusted
- When
-
Issuer ACL Validation:
- When
validateACLForIssuer: true, validates that certificate issuer is in the allowed ACL list - ACL must be configured separately in Apinizer
- Only certificates from allowed issuers are accepted
- When
-
TLS Configuration:
- mTLS requires TLS to be enabled on the API Proxy
- Client certificates must be presented during TLS handshake
- Server must request client certificate during handshake
-
Certificate Format:
- Supports X.509 certificates (PEM, DER formats)
- Certificate must include public key and signature
- Certificate chain validation requires intermediate and root CA certificates
-
Security:
- mTLS provides strong authentication based on PKI
- More secure than password-based authentication
- Requires proper certificate management
- Performance: Certificate validation adds minimal overhead to TLS handshake
-
Pipeline:
REQUESTpipeline validates client certificate before processing request- Authentication failure results in 401 Unauthorized response
- Error Handling: Invalid or missing certificates cause authentication to fail
-
Deployment: Policy changes require deployment to take effect. Set
deploy: trueor deploy manually.
Related Documentation
- List Policies - List all policies
- Add Policy - General policy addition guide
- Update Policy - General policy update guide
- Delete Policy - General policy deletion guide
- Basic Authentication Policy - HTTP Basic Authentication
- JWT Authentication Policy - JWT Token Authentication

