Project

General

Profile

Actions

Bug #20315

closed

Stored credentials should be mutually exclusive with auth sessions

Added by Tomáš Strachota almost 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Other commands
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1471099

Description of problem:

If .hammer/cli.modules.d/foreman.yml has username and password specified as well as use_sessions enabled, the stored credentials will take precedence over the session.

If you specify ":use_sessions: true" and don't erase username/password, you'll see:

~]# hammer -u admin2 -p changeme organization list
...

~]# hammer auth status
Session exist, currently logged in as 'admin2'

~]# hammer organization list
...

~]# hammer auth status
Session exist, currently logged in as 'admin'

So after running "hammer organization list" the session is reset to what is specified in the file.

Also if you specify just username in the file, you are prompted for password on a command run, but it creates problems when attempting to change session to a different user:

~]# hammer -u admin2 -p changeme organization list
...

~]# hammer auth status
Session exist, currently logged in as 'admin2'

~]# hammer organization list
[Foreman] Password for admin:


Related issues 1 (0 open1 closed)

Related to Hammer CLI - Bug #20131: Unsuccessful `hammer auth login` takes down existing sessionClosedTomáš Strachota06/28/2017Actions
Actions

Also available in: Atom PDF