Hi, we're using <https://docs.pact.io/implementati...
# pact-jvm
p
Hi, we're using Pact Spring6/Springboot3 + JUnit5 Support for our Spring Pact Verification tests and our self hosted Pact broker uses a self signed certificate. To allow the tests to interact with the broker we're setting JVM system properties (
<http://javax.net|javax.net>.ssl.trustStore
and
<http://javax.net|javax.net>.ssl.trustStorePassword
) for the trust store and password. Is this the recommended approach for this or is there another better way we can configure the http client used to interact with the Pact broker?
I'm primarily wondering if there is something similar to what *Pact Maven plugin* has: https://docs.pact.io/implementation_guides/jvm/provider/maven#specifying-a-custom-trust-store Although even when I've tried using that on the consumer side, it doesn't work as expected and I've also had to use the JVM system properties
r
Those are the standard JVM properties to use
Depends on how you are running things, if you are just using JUnit 5, you could extend the JUnit 5 support classes and create your own.
There are also settings like
enableInsecureTls()
on
@PactBroker
and
pactbroker.enableInsecureTls
system property which turn off hostname and certificate validation.
p
Thanks, will probably stick with the JVM properties then as we don't want to use
enableInsecureTls