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 1781166 - hammer ping command is asking for user id and password after upgrade(Use any existing or non-existing credentials)
Summary: hammer ping command is asking for user id and password after upgrade(Use any ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.7.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.9.0
Assignee: Rahul Bajaj
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-09 13:02 UTC by Devendra Singh
Modified: 2024-10-01 16:25 UTC (History)
9 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_foreman-2.3.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1908855 (view as bug list)
Environment:
Last Closed: 2021-04-21 14:10:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31140 0 Normal Closed hammer ping should not prompt password 2021-02-02 15:36:23 UTC
Red Hat Knowledge Base (Solution) 5676741 0 None None None 2021-01-01 13:58:16 UTC
Red Hat Product Errata RHBA-2021:1314 0 None None None 2021-04-21 14:10:53 UTC

Description Devendra Singh 2019-12-09 13:02:46 UTC
Description of problem: hammer ping command is asking for user id and password after upgrade(Use any existing or non-existing credentials).

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

How reproducible:
always

Steps to Reproduce:
1. Perform Upgrade from 6.0 to 6.7
2. Upgrade completed successfully
3. Execute all upgrade related test cases and all of them were executed.
4. After that, I log in on the system and tried to run "hammer ping" command, and it asks for foreman credentials.

Actual results:
Hammer ping command asks for credentials and it works with non-existing credentials.

# hammer ping
[Foreman] Username: skd;skd'sfejfdflfmdcxcrlf;gd
[Foreman] Password for skd;skd'sfejfdflfmdcxcrlf;gd: 
database:       
    Status:          ok
    Server Response: Duration: 0ms
candlepin:      
    Status:          ok
    Server Response: Duration: 31ms
candlepin_auth: 
    Status:          ok
    Server Response: Duration: 28ms
pulp:           
    Status:          ok
    Server Response: Duration: 124ms
pulp_auth:      
    Status:          ok
    Server Response: Duration: 58ms
foreman_tasks:  
    Status:          ok
    Server Response: Duration: 8ms



Expected results:

Hammer ping command should not ask for credentials and If it asks then use valid credentials that exist in the system. 

Additional info:

Comment 4 Devendra Singh 2019-12-10 12:19:15 UTC
(In reply to Devendra Singh from comment #0)
> Description of problem: hammer ping command is asking for user id and
> password after upgrade(Use any existing or non-existing credentials).
> 
> Version-Release number of selected component (if applicable):
> 6.7
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1. Perform Upgrade from 6.0 to 6.7
> 2. Upgrade completed successfully
> 3. Execute all upgrade related test cases and all of them were executed.
> 4. After that, I log in on the system and tried to run "hammer ping"
> command, and it asks for foreman credentials.
> 
> Actual results:
> Hammer ping command asks for credentials and it works with non-existing
> credentials.
> 
> # hammer ping
> [Foreman] Username: skd;skd'sfejfdflfmdcxcrlf;gd
> [Foreman] Password for skd;skd'sfejfdflfmdcxcrlf;gd: 
> database:       
>     Status:          ok
>     Server Response: Duration: 0ms
> candlepin:      
>     Status:          ok
>     Server Response: Duration: 31ms
> candlepin_auth: 
>     Status:          ok
>     Server Response: Duration: 28ms
> pulp:           
>     Status:          ok
>     Server Response: Duration: 124ms
> pulp_auth:      
>     Status:          ok
>     Server Response: Duration: 58ms
> foreman_tasks:  
>     Status:          ok
>     Server Response: Duration: 8ms
> 
> 
> 
> Expected results:
> 
> Hammer ping command should not ask for credentials and If it asks then use
> valid credentials that exist in the system. 
> 
> Additional info:


Correcting reproduce step 1

1- Perform Upgrade from 6.6 to 6.7

Comment 7 Rahul Bajaj 2020-01-03 10:54:30 UTC
Hello,

I have tested this issue. Looks like after upgrade there is no issue with the `hammer ping` command.

Although, after running a few QE tests, there is change in the foreman.yml file and default username and
password are missing from that file which leads to further asking of username and password. Furthermore, I believe there
is something wrong with the QE tests and that I dont see any code changes required for this bug.

Therefore, I am closing this issue with a `NOTABUG`. Feel free to reopen the issue in case my finding are not
appropriate :)

Thank you,

Comment 11 Bryan Kearney 2020-10-26 17:00:29 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31140 has been resolved.

Comment 12 Gaurav Talreja 2020-11-19 07:45:58 UTC
Hi, 

I tested this with the following steps,
On Build Version: Satellite 6.9.0 Snap1 

1. Tried `hammer ping` with Default/Initial admin password.
2. Changed admin password from UI to see if `hammer ping` works without being dependent on password specified in `.hammer/cli.modules.d/foreman.yml`

And is it sufficient to test it on the newly installed satellite 6.9.0 instead of the upgraded satellite?

Could you please confirm the above steps are sufficient for verification or we are missing something?


Thank you,
Gaurav

Comment 13 Rahul Bajaj 2020-11-19 09:00:48 UTC
Hello,

Gaurav Talreja, you are working in the correct direction. To answer your question yes, it is okay to test on Sat 6.9.0. I am thinking maybe be we dont clear sessions when changing the password. Let me know your test results, if there is a bug, feel free to assign it to me. 

Thanks,

Comment 16 Gaurav Talreja 2021-01-20 08:52:42 UTC
Verified.

Tested on Satellite 6.9.0 Snap 9
Version: rubygem-foreman_maintain-0.7.4-1.el7sat.noarch

Steps:
1. `hammer ping` with Default/Initial admin password.
2. Changed admin password from WebUI to see if `hammer ping` works.
3. Changed password in `.hammer/cli.modules.d/foreman.yml` to see if `hammer ping` works.

Observation:
In all these steps followed, `hammer ping` works without the correct admin password and without being dependent on the password specified in `.hammer/cli.modules.d/foreman.yml`.

Comment 17 Gaurav Talreja 2021-01-20 09:18:18 UTC
I apologize for providing an incorrect version, Correcting it -

Tested on version: tfm-rubygem-hammer_cli_foreman-2.3.0-1.el7sat.noarch

Comment 20 errata-xmlrpc 2021-04-21 14:10:49 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 (Satellite 6.9 Satellite Tools Release), 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/RHBA-2021:1314


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