HTTPS on WireMock Cloud mock APIs
Every mock API hosted in WireMock Cloud can be called over both HTTPS and HTTP at its base URL, for examplehttps://my-mock-api.wiremockapi.cloud. There is no certificate to configure.
Mutual TLS on mock APIs
Mock APIs don’t request a client certificate from callers, so they can’t verify mutual TLS, whether hosted in WireMock Cloud or run locally with the CLI or Runner. To control who can call a hosted mock API, use HTTP Basic, header match or OpenID Connect authentication instead - see Mock API security. If your test needs the mock to require a client certificate, run WireMock OSS with client certificate verification enabled.Serving local mock APIs over HTTPS
When you run mock APIs locally with the WireMock CLI or in your own infrastructure with the WireMock Runner, you can serve them over HTTPS with your own certificate. Add anhttps section to the service in .wiremock/wiremock.yaml:
global.https. If no certificate is configured, WireMock’s
default self-signed certificate is used.
See TLS/HTTPS configuration for every option.
Recording from an API that requires mutual TLS
Recording in WireMock Cloud can’t present a client certificate, so to record from an API that requires mutual TLS, use the WireMock CLI. Pass a PEM file containing the private key and X509 certificate:wiremock record-many. See Recording via the CLI and
Multi-domain recording for details.