archerysec / archerysec-cli

A commandline tool that wraps the Archerysec REST API for controlling Archery and executing quick, targeted scans.
Other
11 stars 2 forks source link

Upload/Import files are not working #8

Closed mich4e1 closed 7 months ago

mich4e1 commented 3 years ago

I found the source of issues mentioned here https://github.com/archerysec/archerysec-cli/issues/2#issuecomment-822183684.

The issue is improper usage of the Authorization header!!! The archerysec-cli is used: Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhb...

instead of: Authorization: JWT eyJ0eXAiOiJK....

Once I manually changed the header in the POST request - it works properly.

Also, changed the code here: ./lib/python3.8/site-packages/archerysec_cli/cli.py: headers = {'Authorization': 'Bearer ' + token}

to: ./lib/python3.8/site-packages/archerysec_cli/cli.py: headers = {'Authorization': 'JWT ' + token}