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 almost 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 #1

Updated by Tomáš Strachota almost 7 years ago

  • Subject changed from Stored credentials should be mutually exclusive with auth sessions to Stored credentials should be mutually exclusive with auth sessions
  • Status changed from New to Assigned
  • Target version set to 1.14.3
Actions #2

Updated by The Foreman Bot almost 7 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/320 added
Actions #3

Updated by Marek Hulán almost 7 years ago

  • Target version changed from 1.14.3 to 1.17.0-RC2
Actions #4

Updated by Marek Hulán almost 7 years ago

  • Related to Bug #20131: Unsuccessful `hammer auth login` takes down existing session added
Actions #5

Updated by Marek Hulán almost 7 years ago

The PR also fixes #20131

Actions #6

Updated by Tomáš Strachota almost 7 years ago

  • translation missing: en.field_release set to 243
Actions #7

Updated by Anonymous almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #8

Updated by The Foreman Bot almost 7 years ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/322 added
Actions

Also available in: Atom PDF