Gatling and JWT

Hi all,

I recently needed to write a load test that sends requests with a JWT token for authentication. I thought others might run into this too, so I started to put the glue-code to generate the JWT signature from a Gatling Scenario in a separate module: https://bitbucket.org/atlassianlabs/gatling-jwt

It’s essentially just a wrapper around http() called httpWithJwt() that sports an extra method sign(), which appends an extra query param holding the JWT token. The token is derived from the request’s path, method and other query params, plus some extra info about the principal.

It’s in very early stages (for example, it only supports GET for now), and has only been tested/used in my specific Scenario, but I thought it might be useful to get it out there nonetheless.

Cheers,
Robin

Hi,

Thanks a lot for sharing this with us.
I included the link in our doc, https://github.com/excilys/gatling/wiki/Third-parties

Cheers
Nicolas

Hi
I need to do Post Request to with JWT. Your code was very helpful. Maybe you can help to implement the post request with Body. Any help will be apreciatte.

Helping with implementing has a name: consulting :slight_smile:

That’s helpful :slight_smile: