Actions
Bug #20315
closedStored credentials should be mutually exclusive with auth sessions
Status:
Closed
Priority:
Normal
Assignee:
Category:
Other commands
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
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:
Actions