Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1154382

Summary: [RFE] Ability to use tokenized authentication to hammer in lieu of username/password in configuration file.
Product: Red Hat Satellite Reporter: Rich Jerrido <rjerrido>
Component: HammerAssignee: Tomas Strachota <tstrachota>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.4CC: anerurka, aperotti, bbuckingham, beiming.wang, bkearney, chrobert, daniele, dcaplan, ebills, egolov, fcami, fgarciad, jalviso, janarula, jyejare, kfiresmith, mhulan, pmutha, rankumar, sauchter, sthirugn, tcarlin, tstrachota, vcojot, vvasilev, xdmoon
Target Milestone: UnspecifiedKeywords: FutureFeature, PrioBumpPM, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/8016
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 12:29:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1317008, 1353215, 1451556    

Description Rich Jerrido 2014-10-19 11:50:45 UTC
Description of problem:
This RFE requests the ability to configure hammer with either

* a token for login that is separate from the username/pass OR
* a session based credential cache so that the user can be prompted for login once at the beginning of their CLI session. 

The goal is to keep the user from placing an administrative username/password within hammer's configuration file, in cleartext. 

Version-Release number of selected component (if applicable):
rubygem-hammer_cli-0.1.1-12.el6sat.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2014-10-19 12:03:00 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Dominic Cleal 2014-10-21 15:45:38 UTC
Created redmine issue http://projects.theforeman.org/issues/8016 from this bug

Comment 6 David O'Brien 2016-04-18 00:48:40 UTC
Reset docs contact <> daobrien

Comment 8 Thom Carlin 2016-05-16 14:23:21 UTC
This would also allow persistent authentication for the REST API?

Comment 11 Bryan Kearney 2016-09-30 10:04:35 UTC
Upstream bug assigned to tstrachota

Comment 12 Brad Buckingham 2016-09-30 13:26:28 UTC
When resolving this bugzilla, please refer to any associated duplicates for additional input.

Comment 13 Brad Buckingham 2016-09-30 13:26:33 UTC
*** Bug 1380045 has been marked as a duplicate of this bug. ***

Comment 14 Bryan Kearney 2016-12-09 19:01:29 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/8016 has been resolved.

Comment 20 Jitendra Yejare 2017-12-05 12:57:55 UTC
Verified !

@ Satellite 6.3 snap 27

Steps:
# hammer auth login
> [Foreman] Username: admin
> [Foreman] Password for admin: 

# hammer auth status
>  Session exists, currently logged in as 'admin

# hammer domain list (That didnt prompt for passwd)
---|---------------------------
ID | NAME                      
---|---------------------------
13 | BqgPSNLeQt                
10 | FyWhgdcbSn                
11 | GbqGiKuCws                
18 | hCbPdswEni                
12 | ibNwVTpdkU                
9  | KktExDTarl                
19 | lab.bos.redhat.com        
14 | LoUVeZpkrC                
15 | nSMsOicbPH                
16 | OFKLpavbjh                
17 | xQOQIFghpj                
---|---------------------------

# hammer auth logout
> Logged out.


So the sessionized(tokenized) authentication is working as expected. Changing the state of bug to verified.

Note: This tokenized auth doesnt works with curl as mentioned in comment 9.

Comment 23 errata-xmlrpc 2018-02-21 12:29:34 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-2018:0336

Comment 24 Bryan Kearney 2018-07-17 16:45:16 UTC
*** Bug 1299016 has been marked as a duplicate of this bug. ***