cyberark-conjur-cli
cyberark-conjur-cli copied to clipboard
Add support for `/etc/conjur.identity` and `/etc/conjur.conf`
Is your feature request related to a problem? Please describe.
When attempting to use the conjur.client with Conjur identity files stored in /etc/
like other clients, you encounter an error that the ~/.conjurrc
and ~/.netrc
files can't be found.
Describe the solution you would like
The client should be able to read credential details from either the user profile or /etc
. Being able to use Conjur identity files stored in /etc
will make the client more compatible with other clients.
Describe alternatives you have considered
A clear and concise description of any alternative solutions or features that may be related to this that you have considered.
Additional context
Client was called via a script as below with Conjur identity stored in /etc/conjur.conf
and /etc/conjur.identity
. This results in an error that the ~/.conjurrc
and ~/.netrc
files weren't present. Copying the Conjur identity files to the user profile with the expected names resolved the issue, however we don't want to store the Conjur identity files in the user profile. Note: ~
was expanded to the user profile path as expected.
#!/usr/bin/env python3
from conjur import Client
client = Client()
print("Fetching variable...")
new_value = client.get('conjur/my/variable')
print("Variable value is:", new_value.decode('utf-8'))