The Mutual TLS security scheme in OpenAPI
Mutual TLS (mTLS) is a security protocol that enhances the security of API communication by requiring both the client and server to authenticate each other using digital certificates. This two-way authentication ensures that only trusted parties can establish a connection, providing an additional layer of security.
OpenAPI lets you define a Mutual TLS security scheme using the mutualTLS type.
Defining a Mutual TLS security scheme
Define a Mutual TLS security scheme in OpenAPI using the following structure:
components:
securitySchemes:
MutualTLS:
type: mutualTLS
description: Mutual TLS authentication for secure API communication.The mutualTLS type requires no additional fields, as its primary purpose is
to indicate that the API requires mutual TLS authentication. However, you can use the
description field to provide API users with additional information about how to
obtain a certificate.
components:
securitySchemes:
MutualTLS:
type: mutualTLS
description: >
To access this API, you must provide a valid client certificate.
Please submit a request to the [infrastructure team](https://example.com) with
full information about what this application is to obtain a certificate.Learn more about mutual TLS in the OpenAPI Specification
Last updated on