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
.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” key not found

Could you please advise?


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