You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
cybr conjur logon-non-interactive with environment variables failing
To Reproduce
Steps to reproduce the behavior:
set environment variables
cybr conjur logon-non-interactive
Additional context
Looks like the "if err != nil" conditional is missing after getClientFromEnvironmentVariable()
so it always try's to getClientFromAuthenticator()
// If .conjurrc is empty, attempt to get client from environment variables
if account == "" && baseURL == "" && certPath == "" {
// Get client from environment variables
client, loginPair, err := getClientFromEnvironmentVariable()
// If partial environment variables were provided, try authenticator
client, loginPair, err = getClientFromAuthenticator()
// Partial environment variables were provided, assume user is attempting to use environment variables
if err != nil {
return &conjurapi.Client{}, &authn.LoginPair{}, err
}
// If no error returned, return client created from environment variables
if *client != (conjurapi.Client{}) {
return client, loginPair, nil
}
}
The text was updated successfully, but these errors were encountered:
* fix authn strategy logic
* allow no value in field
* if no cert provided, don't create cert pool
* allow variable for IgnoreSSLVerify
* Add local tests
* Added better error handling when client not created
Describe the bug
cybr conjur logon-non-interactive with environment variables failing
To Reproduce
Steps to reproduce the behavior:
Additional context
Looks like the "if err != nil" conditional is missing after getClientFromEnvironmentVariable()
so it always try's to getClientFromAuthenticator()
// If .conjurrc is empty, attempt to get client from environment variables
if account == "" && baseURL == "" && certPath == "" {
// Get client from environment variables
client, loginPair, err := getClientFromEnvironmentVariable()
// If partial environment variables were provided, try authenticator
client, loginPair, err = getClientFromAuthenticator()
// Partial environment variables were provided, assume user is attempting to use environment variables
if err != nil {
return &conjurapi.Client{}, &authn.LoginPair{}, err
}
// If no error returned, return client created from environment variables
if *client != (conjurapi.Client{}) {
return client, loginPair, nil
}
}
The text was updated successfully, but these errors were encountered: