Project

General

Profile

Bug #14832

hammer template dump does not request password when output redirected to a file

Added by Bryan Kearney about 3 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1315255
Description of problem:

Using hammer to dump templates out, it will not prompt
for the password when redirecting the output to a file,
resulting in an error.

Passing the --password option to hammer does work but
is not acceptable as this leaves the password in clear
text in the users history.

Version-Release number of selected component (if applicable):

6.1.7

How reproducible:

100%

Steps to Reproduce:
1. # hammer --username admin template dump --name epel > snippet-epel.erb
2.
3.

Actual results:

  1. hammer --username admin template dump --name epel > snippet-epel.erb
    Invalid username or password

Expected results:

As per when hammer is run without redirecting to a file

  1. hammer --username admin template dump --name epel
    [Foreman] Password for admin:

Additional info:

Customer has suggested that dump should have a switch to send
the output to a file, in the same way as the create has a switch
to import from a file.


Related issues

Related to Hammer CLI - Bug #6935: hammer should use the tty for the interactive output to allow output redirectionClosed

Associated revisions

Revision fe2efe11 (diff)
Added by Oleh Fedorenko 9 months ago

Fixes #14832 - Request password regardless of redirection

History

#1 Updated by Tomáš Strachota almost 2 years ago

  • Related to Bug #6935: hammer should use the tty for the interactive output to allow output redirection added

#2 Updated by Oleh Fedorenko 10 months ago

  • Assignee set to Oleh Fedorenko
  • Status changed from New to Assigned

#3 Updated by The Foreman Bot 10 months ago

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

#4 Updated by Oleh Fedorenko 9 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Martin Bacovsky 9 months ago

  • Fixed in Releases hammer-cli-0.15.1, hammer-cli-0.16.0 added

Also available in: Atom PDF