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 1787105

Summary: Change hammer auth login oauth option to oidc
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: HammerAssignee: Rahul Bajaj <rabajaj>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: apatel, kgaikwad, mshira, ofedoren, pcreech, rabajaj
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_foreman-0.19.6-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 15:54:09 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:

Description Nikhil Kathole 2019-12-31 06:49:25 UTC
Description of problem:

As all of the option under hammer auth login oauth are related to oidc and protocol we are using for authentication is openidc, it is calid to change from oauth to oidc.


Version-Release number of selected component (if applicable):
Satellite 6.7 snap 7
tfm-rubygem-hammer_cli-0.19.0-2.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. # hammer auth login oauth -h
Usage:
    hammer auth login oauth [OPTIONS]

Options:
 -a, --oidc-authorization-endpoint OPENIDC-AUTHORIZATION-ENDPOINT Openidc provider URL which issues authentication code
 -c, --oidc-client-id OPENIDC-CLIENT-ID                           Client id used in the Openidc provider
 -f, --two-factor                                                 Authenticate with two factor
 -h, --help                                                       Print help
 -p, --password PASSWORD                                          Password to access the remote system
 -r, --oidc-redirect-uri OPENIDC-REDIRECT-URI                     Redirect URI for the authencation code grant flow
 -t, --oidc-token-endpoint OPENIDC-TOKEN-ENDPOINT                 Openidc provider URL which issues access token
 -u, --username USERNAME                                          Username to access the remote system

Actual results:

Command is hammer auth login oauth 


Expected results:
Command should be hammer auth login oidc

Additional info:

Also there is typo, good to have it fixed

-r, --oidc-redirect-uri OPENIDC-REDIRECT-URI                     Redirect URI for the authencation code grant flow 

s/authencation/authentication

Comment 3 Nikhil Kathole 2019-12-31 08:53:48 UTC
Also please update help description for 

-a, --oidc-authorization-endpoint OPENIDC-AUTHORIZATION-ENDPOINT Openidc provider URL which issues authentication code

to 

-a, --oidc-authorization-endpoint OPENIDC-AUTHORIZATION-ENDPOINT Openidc provider URL which issues authentication code (two factor only)

Comment 4 Rahul Bajaj 2020-01-03 10:49:12 UTC
Hello Nikhil,

Thank you for observing the typo's in there and reporting that.

The main issue about remaining the `oauth` to `oidc` is in my opinion not a good idea. 
Reasoning: OpenID Connect(OIDC) uses simple JSON Web Tokens (JWT), which we obtain using flows(password grant and code flow) conforming to the OAuth 2.0 specifications.
So OAuth is responsible for getting us the token with the help of OIDC. SO options specify the OpenID provider and its features while we are actually using OAuth to perform
the required task.

Let me know if you are not convinced with the above explanation :) 

Thank you,

Comment 5 Bryan Kearney 2020-01-07 11:08:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28628 has been resolved.

Comment 6 Nikhil Kathole 2020-01-15 16:58:12 UTC
VERIFIED

Version tested:
Satellite 6.7 snap 8

# hammer auth login oauth -h
Usage:
    hammer auth login oauth [OPTIONS]

Options:
 -a, --oidc-authorization-endpoint OPENIDC-AUTHORIZATION-ENDPOINT Openidc provider URL which issues authentication code (two factor only)
 -c, --oidc-client-id OPENIDC-CLIENT-ID                           Client id used in the Openidc provider
 -f, --two-factor                                                 Authenticate with two factor
 -h, --help                                                       Print help
 -p, --password PASSWORD                                          Password to access the remote system
 -r, --oidc-redirect-uri OPENIDC-REDIRECT-URI                     Redirect URI for the authentication code grant flow
 -t, --oidc-token-endpoint OPENIDC-TOKEN-ENDPOINT                 Openidc provider URL which issues access token
 -u, --username USERNAME                                          Username to access the remote system

Comment 9 errata-xmlrpc 2020-04-14 15:54:09 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/RHBA-2020:1455