microsoft / restler-fuzzer

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.
MIT License
2.52k stars 283 forks source link

While replaying the replay_log file, is there an option to inform RESTler pick the host name from compiled service files #819

Open SwamyNallamalli opened 9 months ago

SwamyNallamalli commented 9 months ago

Description

I am looking at https://github.com/microsoft/restler-fuzzer/blob/main/docs/user-guide/Replay.md, but it is not clear.

We have replay files generated from one service instance and want to replay them on different service instance. We already have compiled the service specs and specs already have the service urls in the file. Can we inform RESTler ignore the hostnames from log file and just use the one from spec file. We see the option of host parameter, but we cannot go with that route as in that route we have to parse the swagger.json and extract the hostname ourseleves.

marina-p commented 9 months ago

Hello @SwamyNallamalli,

The Replay log today is not designed for this scenario - it was intended to contain all of the information required for replay, without requiring the grammar.

To support this use case, the replay command would need to be able to "replay the sequence on a different service instance defined by the specified Swagger/OpenAPI spec or compiler config" - this would allow, for example, plugging in different custom payloads into the dictionary as well as using a different host. This will be supported sometime in the next few months.

Thanks,

Marina

restler replay --replay_file main_driver_500.replay.txt --api_spec swagger.json - and have it override any data specified in the