cyberark / cyberark-conjur-cli

CyberArk Conjur command line interface written in Python
https://www.conjur.org
Apache License 2.0
17 stars 16 forks source link

conjur-cli is failing to read .conjurrc correctly and is throwing error "Account cannot be empty" #14

Closed AndrewCopeland closed 5 years ago

AndrewCopeland commented 5 years ago

When using the conjur-cli with .conjurrc the url, account and ca_bundle variables are set to None resulting in a "Account cannot be empty" exception. The reason for this is how we update the config dictionary here. https://github.com/cyberark/conjur-api-python3/blob/master/conjur/client.py#L72-L74

To fix this issue we must filter the config of all values that are None:

filtered_config = {k:v for k, v in config.items() if v is not None}
on_disk_config.update(filtered_config)
config = on_disk_config
sgnn7 commented 5 years ago

@AndrewCopeland This is now fixed on master and should be released in the next version of the APIs (v0.0.3).