Skip to content

Expose and Secure a Workload with a Certificate ​

This tutorial shows how to expose and secure a workload with mutual authentication using TLS Gateway.

Prerequisites ​

Procedure ​

Access the Secured Resources ​

Call the secured endpoints of the HTTPBin Service.

In the following command, replace the name of the workload's subdomain and domain. Send a GET request to the Service with the client certificates that you used to create mTLS Gateway:

bash
curl --key ${CLIENT_CERT_KEY_FILE} \
      --cert ${CLIENT_CERT_CRT_FILE} \
      --cacert ${CLIENT_ROOT_CA_CRT_FILE} \
      -ik -X GET https://{SUBDOMAIN}.{DOMAIN}/headers

If successful, the call returns the 200 OK response code. If you call the Service without the proper certificates or with invalid ones, you get the error 403 Forbidden.