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.59k stars 297 forks source link

Request Coverage is not successful #439

Open santikris2003 opened 2 years ago

santikris2003 commented 2 years ago

Request Coverage is not successful , though the compiling of my swagger.json worked fine and it generated the required files under sub-directory Compile but when I run Restler with test , Request coverage is not successful ,any guess what Im missing , my api server requires authentication which I did not include just get started with initial run :~/restler_bin/restler# ./Restler test --grammar_file "Compile/grammar.py" --dictionary_file "Compile/dict.json" --settings "Compile/engine_settings.json" --target_ip 10.xx.xx.xx --target_port xxxx Starting task Test... Using python: 'python3' (Python 3.7.3) Request coverage (successful / total): 0 / 944 No bugs were found. Task Test succeeded. Collecting logs... :~/restler_bin/restler#

marina-p commented 2 years ago

Hello @santikris2003,

If your service requires authentication, you can configure this via the instructions in the doc Authentication.md

Thanks,

Marina

santikris2003 commented 2 years ago

I was able to access Authentication.md , Im using Ubuntu Linux host , how to generate Authentication Token in that case as I could see .exe in the instructions for Authentication

santikris2003 commented 2 years ago

Also attaching logs for previous run without authentication restler-20220107-025508.log

marina-p commented 2 years ago

Hello @santikris2003,

The authentication script can be any command that will work in a Linux environment (i.e. when invoked separately, it should print the token as described in Authentication.md). For quick testing, you can generate a token separately using your usual process, then create a Python file print_token.py that simply outputs the metadata and token to the console, and your command could be

<path_to_python> print_token.py

Thanks,

Marina

marina-p commented 2 years ago

Adding 'documentation' tag to add a Linux example to the Authentication.md.