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

cybr conjur logon-non-interactive with env vars returns 401 #123

Closed infamousjoeg closed 3 years ago

infamousjoeg commented 3 years ago

Describe the bug When logging into Conjur using cybr-cli and environment variables non-interactively (cybr conjur logon-non-interactive), an HTTP 401 Unauthorized error is returned. This does not occur when using the same login details interactively using cybr conjur logon.

2021/10/19 20:39:44 Failed to initialize conjur client. Failed to authenticate to conjur. Status code returned '401'

To Reproduce Steps to reproduce the behavior:

  1. CONJUR_ACCOUNT=xxxxxxxxxxxx CONJUR_APPLIANCE_URL=xxxxxxxxxxx CONJUR_AUTHN_LOGIN=xxxxxxxxxxx CONJUR_AUTHN_API_KEY=xxxxxxxxxx cybr conjur logon-non-interactive

Expected behavior When all required environment variables are supplied with proper values and cybr conjur logon-non-interactive is ran, a successful login should occur and be reported to STDOUT.