Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1466505

Summary: 2FA with single prompt should be allowed for a user configurable set of services
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED DUPLICATE QA Contact: sssd-qe <sssd-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: grajaiya, jhrozek, lslebodn, mkosek, mzidek, pbrezina, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-29 20:33:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Hrozek 2017-06-29 20:21:14 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/SSSD/sssd/issue/3438

See

       if (resp[1].resp == NULL || *(resp[1].resp) == '\0'
                 || (pi->pam_service != NULL && strcmp(pi->pam_service, "sshd") == 0
                       && strcmp(resp[0].resp, resp[1].resp) == 0)) {
            /* Missing second factor, assume first factor contains combined 2FA
             * credentials.
             * Special handling for SSH with password authentication. Combined
             * 2FA credentials are used but SSH puts them in both responses. */

in

https://github.com/SSSD/sssd/blob/818d01b4a0d332fff06db33c0c985b8c0f1417c7/src/sss_client/pam_sss.c

This code allows only SSHD to combine two factors together but other services might be doing that too. 

User story:
From my application that uses PAM for authentication (WebApp/Radius/Tacacs) I would like to use SSSD for 2FA authentication against IdM. I would like to combine both factors in one prompt for the service I use so that I do not have to implement double prompting in my application.

Proposed approach:
1. SSSD config
single_prompt = sshd, my_app, another_app
2. Pseudo code

        if (resp[1].resp == NULL || *(resp[1].resp) == '\0'
                   || (pi->pam_service != NULL && in_single_prompt_list(pi->pam_service, single_prompt_list) == 0
                          && strcmp(resp[0].resp, resp[1].resp) == 0)) {
       ...

Comment 2 Jakub Hrozek 2017-06-29 20:33:14 UTC

*** This bug has been marked as a duplicate of bug 1466504 ***