Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1712923 - "hammer full-help" command asks for credentials in the middle of command execution.
Summary: "hammer full-help" command asks for credentials in the middle of command exec...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: 6.6.0
Assignee: Oleh Fedorenko
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-22 13:32 UTC by Jameer Pathan
Modified: 2019-10-22 19:51 UTC (History)
8 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_foreman-0.17.0.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 19:51:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 26894 0 None None None 2019-05-28 15:37:30 UTC

Description Jameer Pathan 2019-05-22 13:32:59 UTC
Description of problem:
"hammer full-help" command asks for credentials in the middle of command execution.

Version-Release number of selected component (if applicable):
@satellite-6.5.0-11.el7sat.noarch
@tfm-rubygem-hammer_cli-0.15.1.2-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. run # hammer full-help

Actual results:
# hammer full-help
Hammer CLI help
===============
hammer
------
***** output omited ********

hammer > global-parameter > list
--------------------------------
List all global parameters

Usage:
    hammer > global-parameter > list [OPTIONS]

Options:
 --location LOCATION_NAME                Location name
 --location-id LOCATION_ID                
 --location-title LOCATION_TITLE         Location title
 --order ORDER                           Sort field and order, eg. ‘id DESC’
 --organization ORGANIZATION_NAME        Organization name
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-title ORGANIZATION_TITLE Organization title
 --page PAGE                             Paginate results
 --per-page PER_PAGE                     Number of entries per request
 --search SEARCH                         Filter results
 --show-hidden SHOW_HIDDEN               Display hidden values
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

[Foreman] Username: admin
[Foreman] Password for admin:

**** command continues after providing credentials  ****

Expected results:
- command should not ask for credentials.

Additional info:
- In Satellite 6.4 it works as expected and does not ask for credentials.

Comment 3 Oleh Fedorenko 2019-05-23 15:52:53 UTC
Hello, 

Could you please provide debug output (hammer -d full-help with help output omitted)? I couldn't reproduce the bug on hammer 0.15.1 version neither on the latest.

Comment 4 Jameer Pathan 2019-05-24 11:49:20 UTC
Created attachment 1572883 [details]
debug output(hammer -d full-help with help output omitted)

Comment 5 Jameer Pathan 2019-05-24 11:51:20 UTC
Oleh,

I am facing this issue when .hammer/cli.modules.d/foreman.yml 
doesn't contain credentials and/or when it has invalid password in it.(e.g when admin password got changed)
Now I don't if it's a valid issue or not. But still hammer
should have asked for credentials at start of executing command.
Also one thing I noticed is, hammer ask for credentials when it's executing
command "hammer global-parameter set --help".

I have also attached debug output(hammer -d full-help with help output omitted)
- Can you confirm if this is still a valid issue or not?

Comment 6 Oleh Fedorenko 2019-05-27 17:09:45 UTC
Jameer,

Yes, it is a valid issue. I've managed to reproduce the bug, now I'm working on the fix. Thanks.

Comment 7 Oleh Fedorenko 2019-05-27 17:11:06 UTC
Created redmine issue https://projects.theforeman.org/issues/26894 from this bug

Comment 8 Martin Bacovsky 2019-05-28 15:37:30 UTC
I set the severity to low as this occurs only on "hammer global-parameter set --help" when credentials are not available and is not affecting other hammer commands.

Comment 9 Bryan Kearney 2019-07-19 12:02:20 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26894 has been resolved.

Comment 11 Jameer Pathan 2019-08-20 09:49:24 UTC
Verified

Verified with:
- Satellite 6.6.0 snap 16
- tfm-rubygem-hammer_cli_foreman-0.17.0.5-1.el7sat.noarch

Test steps:
- Run "hammer full-help"
- Have invalid credentials in .hammer/cli.modules.d/foreman.yml 
- Run "hammer full-help"

Observation:
- Command "hammer full-help" didn't ask for hammer credentials.
- Command "hammer full-help" executed successfully.

Comment 12 Bryan Kearney 2019-10-22 19:51:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3172


Note You need to log in before you can comment on or make changes to this bug.