Closed mich4e1 closed 7 months 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...
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhb...
instead of: Authorization: JWT eyJ0eXAiOiJK....
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}
./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}
./lib/python3.8/site-packages/archerysec_cli/cli.py: headers = {'Authorization': 'JWT ' + token}
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}