Hi all,
I am wrapping up a function I have create and had a few questions:
- Does Resilient not come configured with a keystore? I ask b/c the function I've created needs to stored user credentials and I'd rather not have them store in plaintext within the app.conf file. Reading the function documentation I see you can insert keystore values (ex. ^integration_password) and "run res-keyring" to put a value in the keystore for "integration_password". However after doing this and trying to run resilient-circuits I get the below error.
- Is it expected that stacktraces are shown to users when errors occur within a function or should a more user friendly error be shown? If its the later how would I go about doing that. I've attached a screenshot of what I am looking at. From the function documentation and other examples I've seen on git I yield a FunctionError().
-bash-4.2$ vi .resilient/app.config
-bash-4.2$ res-keyring
Configuration file: /home/resadmin/.resilient/app.config
Secrets are stored with 'keyring.backends.chainer'
[cyber_triage] password: <not set>
Enter new value (or <ENTER> to leave unchanged): test
Confirm new value: test
Value set.
[cyber_triage] api_key: <not set>
Enter new value (or <ENTER> to leave unchanged):
Done.
-bash-4.2$ resilient-circuits run
Traceback (most recent call last):
File "/usr/local/bin/resilient-circuits", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/resilient_circuits/bin/resilient_circuits_cmd.py", line 611, in main
config_file=args.config_file)
File "/usr/local/lib/python2.7/site-packages/resilient_circuits/bin/resilient_circuits_cmd.py", line 88, in run
app.run(**kwargs)
File "/usr/local/lib/python2.7/site-packages/resilient_circuits/app.py", line 311, in run
application = App(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/resilient_circuits/app.py", line 171, in __init__
self.do_initialization()
File "/usr/local/lib/python2.7/site-packages/resilient_circuits/app.py", line 174, in do_initialization
self.opts = AppArgumentParser(config_file=self.config_file).parse_args()
File "/usr/local/lib/python2.7/site-packages/resilient_circuits/app.py", line 145, in parse_args
parse_parameters(opts)
File "/usr/local/lib/python2.7/site-packages/resilient/co3argparse.py", line 272, in parse_parameters
return _parse_parameters(names, options)
File "/usr/local/lib/python2.7/site-packages/resilient/co3argparse.py", line 280, in _parse_parameters
val = _parse_parameters(names + (key,), val)
File "/usr/local/lib/python2.7/site-packages/resilient/co3argparse.py", line 289, in _parse_parameters
val = keyring.get_password(service, val)
File "/usr/local/lib/python2.7/site-packages/keyring/core.py", line 57, in get_password
return _keyring_backend.get_password(service_name, username)
File "/usr/local/lib/python2.7/site-packages/keyring/backends/fail.py", line 24, in get_password
raise RuntimeError(msg)
RuntimeError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.
-bash-4.2$
------------------------------
Chris Ray
------------------------------