mTLS Setup

Hello Stéphane & team,

I’m new to Gatling and I want to test an API (created in AWS) using Gatling. I secured my API using mTLS and API key.

I believe that I can pass the API key through a header using the following Scala code:

val httpProtocol = http
.baseUrl("https://domain.com/stage?")
.header(“x-api-key”, “enter key here”)

However, how do I tell Gatling where to get the .key and .pem files?

In the gatling.conf file, I don’t see a place to specify my certificate (.pem file).

Also, despite specifying ‘type’ and ‘file’ location of my key file, I get the following error:

Exception in thread “main” java.security.KeyStoreException: key not found

Could you please advise?

Thanks,
Andrew

Sorry, no idea what goes wrong for you but gatling.conf is definitely the place.