How to configure MTLS without using perUserKeyManagerFactory?

I want to configure MTLS for my scenario. I want to reuse connections, when using the option perUserKeyManagerFactory and shareConnections together, the key manager factory configured is ignored. While this seems logical, it means I can’t have a client certificate and a shared pool of connection.

So how can I achieve this?

Bonus: some validation should be added imho to fail fast in case of non compatible configurations.

val apiProtocol: HttpProtocolBuilder =
HttpDsl.http
.baseUrl(Configuration.apiBaseUrl)
.acceptHeader(“application/json”)
.contentTypeHeader(“application/json”)
.maxConnectionsPerHost(50)
.header(“Content-Type”, “application/json”)
.perUserKeyManagerFactory { _ → getClientKeyManagerFactory() } –> Is there some other option to configure the key store?

You can configure a global KeyManager in gatling.conf.

Thanks for your answer but is it the only solution? I have several apis with different requirements to test as part of the scenario. It is also more convenient to be able to configure it programmatically.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.