The following examples specify $management_access_token, or a Management API access token. This must be replaced with an access token that contains at least the following scopes:
create:custom_domainsread:custom_domainscreate:clientsupdate:clientsupdate:client_credentialsupdate:client_keysupdate:tenant_settings
Create a custom domain
At the tenant level, you must configure a custom domain to accept mTLS headers with the Management API. Because the customer edge is responsible for validating the client certificates, set thetype as self_managed_certs in the POST request:
Patch an existing custom domain
You can configure an existing custom domain to accept mTLS headers with the Management API. However, you cannot update thetype for an already existing custom domain.
Only custom domains with the
self_managed_certs type can be used for mTLS. Auth0 currently does not support the auth0_managed_certs type for mTLS.Verify the custom domain
Before Auth0 accepts requests to create and update the custom domain, it must first verify the domain. Use the Management API to send the following POST request to verify the custom domain:status field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.
When Auth0 verifies the custom domain for the first time, the response includes the cname_api_key, which you need to configure your edge/reverse proxy. This key must be kept secret and is used to validate the forwarded requests.
For more information, see the Verify a custom domain API documentation.
Enable mTLS endpoint aliases
When the mTLS handshake requests a client certificate from the client, the web browser presents users with a modal dialog to select a certificate. This introduces friction in the user experience and should be avoided for endpoints where mTLS is unnecessary such as the/authorize endpoint. As a result, customers that support mTLS and non-mTLS traffic on different domains should enable mTLS endpoint aliases.
mTLS endpoint aliases indicate that clients should send mTLS traffic to the endpoints specified in the mtls_endpoint_aliases property of the OIDC discovery document. Clients will send non-mTLS traffic to the normal endpoints. For more information about the mtls_endpoint_aliases property, see Call the resource server.
You can enable mTLS endpoint aliases with the and the .
- Auth0 Dashboard
- Management API
To enable mTLS endpoint aliases using the Auth0 Dashboard:
- Navigate to Auth0 Dashboard and select Settings from the side menu.
- Under Tenant Settings, select the Advanced tab.
- Find Allow mTLS Endpoint Aliases and toggle it on. This will route mTLS traffic to an endpoint called
mtls.<your custom domain>.