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 1912387 - [TOTP/RHSSO] - Two factor authentication while accepting missing parameters fails on authentication
Summary: [TOTP/RHSSO] - Two factor authentication while accepting missing parameters f...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Authentication
Version: 6.9.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: 6.9.0
Assignee: Rahul Bajaj
QA Contact: Omkar Khatavkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-04 10:53 UTC by Omkar Khatavkar
Modified: 2021-03-08 07:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-02 11:33:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31698 0 Normal New [TOTP/RHSSO] - Hammer Auth Login Oauth is not working for TOTP users 2021-02-08 19:17:32 UTC

Description Omkar Khatavkar 2021-01-04 10:53:29 UTC
Description of problem:
[TOTP/RHSSO] - Hammer Auth Login Oauth is not working for TOTP users, This works fine with --two-factor 

Version-Release number of selected component (if applicable):
Satellite 6.9 Snap7

How reproducible:
always

Steps to Reproduce:
1. Setup the Satellite with RHSSO and try

hammer> auth login oauth
Openidc Provider Token Endpoint: https://rhsso.redhat.com/auth/realms/satqe/protocol/openid-connect/token
Client ID: satellite.redhat.com-foreman-openidc
Username: foobar
Password: 
401 Unauthorized


Actual results:
Login is not working 

Expected results:
Login should work, or if the not correct message should be mentioned  

Additional info:

Comment 2 Ondřej Ezr 2021-01-21 09:53:49 UTC
Created redmine issue https://projects.theforeman.org/issues/31698 from this bug

Comment 5 Rahul Bajaj 2021-02-01 06:34:31 UTC
Hello,

After updating my hammer instance and hammer-cli-foreman instance, I was trying to reproduce the issue and looks like everything is working fine.

```
[vagrant@centos7-hammer-devel hammer-cli-foreman]$ hammer auth login oauth --two-factor
Openidc Provider Token Endpoint: https://keycloak.example.org/auth/realms/hammer-cli/protocol/openid-connect/token
Openidc Provider Authorization Endpoint: https://keycloak.example.org/auth/realms/hammer-cli/protocol/openid-connect/auth
Client ID: rest-api-client
Redirect URI: urn:ietf:wg:oauth:2.0:oob
Enter URL in browser: https://keycloak.example.org/auth/realms/hammer-cli/protocol/openid-connect/auth?response_type=code&client_id=rest-api-client&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=openid
Code: f34f8433-65a8-4309-a989-a1b7d6483c92.26a4bf95-04e4-4886-9394-d993c2ddd694.319510a3-b275-415e-957a-53a3059b51e0
Successfully logged in as 'rabajaj'.
```

@Omkar can you test again and if you are still facing the issue please provide me with a reproducer.

Thank you,

Comment 6 Rahul Bajaj 2021-02-02 11:33:37 UTC
Hello, 

I just noticed the original issue raised, the steps mentioned:

```
hammer> auth login oauth
Openidc Provider Token Endpoint: https://rhsso.redhat.com/auth/realms/satqe/protocol/openid-connect/token
Client ID: satellite.redhat.com-foreman-openidc
Username: foobar
Password: 
401 Unauthorized
```

Now, CAC card and TOTP are two-factor authentication methods and we support only two-factor authentication with RHSSO. The above steps is missing that parameter and therefore the issue. Even, if you wish to not use the --two-factor method, you will have to use a user that does not have OTP biding to it.

This is NOTABUG, I am closing this issue, if you think otherwise, feel free to open the BZ.

Thank you,


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