Skip to main content

MTLS Enforcement Policy

MTLS Enforcement Policy​

MTLS Enforcement Policy is a policy designed to be engaged in the request flow of any request that requires MTLS to be mandatory. It will perform the below tasks.

  • Mandates MTLS for the request using the request context
  • Mandates MTLS for the request when the transport certificate is sent as a header

Create an API Level Policy by following the Creating API Level Policy and add to all API resources which require MTLS enforcement. Find the details to create the policy below.

General Details​

FieldDescription
NameMTLS Enforcement Policy
Version1 (can be any)
DescriptionPolicy to enforce MTLS validation
Applicable FlowsRequest
Supported API TypesHTTP

Policy File​

Upload the mtlsEnforcementPolicy.j2 policy file which resides inside the <APIM_HOME>/<OB_APIM_ACCELERATOR _HOME>/repository/resources/mediation-policies folder.

Policy Attributes​

Attribute NameDisplay NameDescriptionRequiredTypeExample Values
transportCertAsHeaderEnabledIs the Transport Certificate Present as a Header in the Request?Switch to determine if the transport certificate is sent as a header in the requestfalseBoolean
transportCertHeaderNameTransport Certificate Header NameThe name of the transport certificate headerfalseStringx-wso2-client-certificate
isClientCertificateEncodedIs the Transport Certificate Present as a Header in the Request Encoded?Switch to determine if the transport certificate sent as a header in the request is encodedfalseBoolean

Was this page helpful?