smartcat-labs / berserker

Berserker is load generator with pluggable input source and configurable output.
Apache License 2.0
52 stars 8 forks source link

How to use Oath or similar flow with berserker? #43

Open milannister opened 6 years ago

milannister commented 6 years ago

Some APIs have Oath flow where it is necessary to obtain a token for a user. In that case the flow would go like this:

create or authenticate user(s) -> obtain token(s) from response -> use the token(s) in all requests

This is very common flow which hasn't been taken into consideration so far.

milannister commented 6 years ago

Vladimir and I have thought of several ways to implement this behavior:

  1. Create bunch of users/tokens with the script and save the responses (tokens) into CSV. The CSV with the tokens would, then, be used in Berserker for fetching the tokens.
  2. Use Ranger/Berseker programmatically and program the flow of obtaining the token, but use Ranger and some components of Berserker for creating and dispatching requests. I like the idea of programming the flow (or parts of it) because otherwise the configuration file will become really hard to comprehend.