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.
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.
Created attachment 1572883 [details] debug output(hammer -d full-help with help output omitted)
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?
Jameer, Yes, it is a valid issue. I've managed to reproduce the bug, now I'm working on the fix. Thanks.
Created redmine issue https://projects.theforeman.org/issues/26894 from this bug
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.
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26894 has been resolved.
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.
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