chronicle / cbn-tool

Command line tool to interact with Chronicle's Config Based Normalizer (CBN) APIs.

Home Page:https://chronicle.security

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Despite specifying --credentials_file, cbn_cli still looks for credentials in .chronicle_credentials.json.

applmak opened this issue · comments

When I run the command:

$ python3 cbn_cli.py gen --credentials_file ~/bk_credentials.json --log_type=GCP_DNS --start_date=2021-01-01 --end_date=2021-04-29

I get the following error:

usage: cbn_cli.py [-h] [--region {US,EUROPE,ASIA}] [--credentials_file CREDENTIALS_FILE] {generate,g,gen,run,r,submit,status,list,history,archive,download,error,e,err} ...
cbn_cli.py: error: argument --credentials_file: /home/applmak/.chronicle_credentials.json does not exist

which is unexpected. Either the flag-parsing is wrong, or the script is ignore the argument.

Ah, I see. It's the order of the arguments. gen must be after the --credentials_file parameters. Oops!