infamousjoeg / cybr-cli

A "Swiss Army Knife" command-line interface (CLI) for easy human and non-human interaction with @CyberArk suite of products.
Apache License 2.0
72 stars 16 forks source link

logon-non-interactive fix #183

Closed David-Lang closed 1 year ago

David-Lang commented 1 year ago
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

infamousjoeg commented 1 year ago

There's more to this than meets the eye. I'm going to have to add on to this PR. I need to come up with a better logic for handling fallback authentication strategies.

If CONJUR_AUTHN_API_KEY environment variable is missing and .conjurrc file is missing from the user's home, it can be assumed an authenticator is being used (which is just authn-iam for now).

If all environment variables exist, it's going to be environment variable authn.

If neither of those are true and .conjurrc exists, it's going to use that.

I need to decide on an order and pull that logic into separate local functions and then deal with it that way.

It'll be way cleaner in the end but may take some time.

infamousjoeg commented 1 year ago

Spoke with @David-Lang at GKO... requested optional flags for --username and --password to be provided in-line with the command to override need for environment variables.

infamousjoeg commented 1 year ago

This is being completed in PR #184. Please reference that going forward.