Bug 1461053 - allow to modify list of UPNs of a trusted forest
allow to modify list of UPNs of a trusted forest
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.4
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: IPA Maintainers
Scott Poore
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-13 08:36 EDT by Petr Vobornik
Modified: 2017-08-01 05:51 EDT (History)
8 users (show)

See Also:
Fixed In Version: ipa-4.5.0-17.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 05:51:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Vobornik 2017-06-13 08:36:09 EDT
Cloned from upstream: https://pagure.io/freeipa/issue/7015

There are two ways for maintaining user principal names (UPNs) in Active 
Directory:
 - associate UPN suffixes with the forest root and then allow for each user account to choose UPN suffix for logon;
 - directly modify userPrincipalName attribute in LDAP

Both approaches lead to the same result: AD DC accepts user@UPN-Suffix as a proper principal in AS-REQ and TGS-REQ.

The latter (directly modify userPrincipalName) case has a consequence that this UPN suffix is not visible via netr_DsRGetForestTrustInformation DCE RPC call. As result, FreeIPA KDC will not know that a particular UPN suffix does belong to a trusted Active Directory forest. As result, SSSD will not be able to authenticate and validate this user from a trusted Active Directory forest.

This is especially true for one-word UPNs which otherwise wouldn't work properly on Kerberos level for both FreeIPA and Active Directory.

Administrators are responsible for amending the list of UPNs associated with the forest in this case. With this commit, an option is added to 'ipa trust-mod' that allows specifying arbitrary UPN suffixes to a trusted forest root.
Comment 2 Petr Vobornik 2017-06-13 08:36:22 EDT
Upstream ticket:
https://pagure.io/freeipa/issue/7015
Comment 7 Scott Poore 2017-06-19 19:32:03 EDT
Verified.

Version ::

ipa-server-4.5.0-17.el7.x86_64

Results ::


A Simple functional test where this is needed:

# Setup is that we have AD Trust and one AD User with a userPrincipalName attribute set to something different than the domain.

[root@auto-hv-02-guest08 ~]# ldapsearch -o ldif-wrap=no -xLLL \
>     -D "$AD_ADMIN" -w Secret123 \
>     -h idm-qe-ipa-win7.ipaadcs12r2.test \
>     -b "cn=temp user1,cn=Users,$AD_BASEDN" \
>     "(objectClass=*)" userPrincipalName
dn: CN=temp user1,CN=Users,DC=ipaadcs12r2,DC=test
userPrincipalName: 1234@mytest



# First show failure to login as either user before the UPN is added to the trust in IPA:

[root@auto-hv-02-guest08 ~]# ssh -l 1234@mytest $(hostname)
Password: 
Password: 
Password: 
Received disconnect from UNKNOWN port 65535:2: Too many authentication failures
Authentication failed.

[root@auto-hv-02-guest08 ~]# ssh -l tempuser1@ipaadcs12r2.test $(hostname)
Password: 
Password: 
Password: 
Received disconnect from UNKNOWN port 65535:2: Too many authentication failures
Authentication failed.

# Now add the UPN:

[root@auto-hv-02-guest08 ~]# ipa trust-mod ipaadcs12r2.test --upn='MYTEST'
--------------------------------------------------------------------------
Modified trust "ipaadcs12r2.test" (change will be effective in 60 seconds)
--------------------------------------------------------------------------
  Realm name: ipaadcs12r2.test
  Domain NetBIOS name: IPAADCS12R2
  Domain Security Identifier: S-1-5-21-2104345585-122664420-2375807449
  UPN suffixes: MYTEST



[root@auto-hv-02-guest08 ~]# systemctl stop sssd; rm -rf /var/lib/sss/{db,mc}/*; systemctl start sssd

[root@auto-hv-02-guest08 ~]# ssh -l tempuser1@ipaadcs12r2.test $(hostname)
Password: 
Last failed login: Mon Jun 19 18:51:15 EDT 2017 from IPSCRUBBED on ssh:notty
There were 3 failed login attempts since the last successful login.
Last login: Mon Jun 19 18:50:14 2017 from IPSCRUBBED
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
         This System is part of the Red Hat Test System.              
                                                                      
      Please do not use this system for individual unit testing.      
                                                                      
      RHTS Test information:                                          
                         HOSTNAME=auto-hv-02-guest08.fqdn.scrubbed                          
                            JOBID=1884800                              
                         RECIPEID=3902568                           
                       LAB_SERVER=                         
                    RESULT_SERVER=[::1]:7080                      
                           DISTRO=RHEL-7.4                        
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **

-sh-4.2$ exit
logout
Connection to auto-hv-02-guest08.testrelm.test closed.

[root@auto-hv-02-guest08 ~]# ssh -l 1234@mytest $(hostname)
Password: 
Last login: Mon Jun 19 18:52:38 2017 from IPSCRUBBED
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
         This System is part of the Red Hat Test System.              
                                                                      
      Please do not use this system for individual unit testing.      
                                                                      
      RHTS Test information:                                          
                         HOSTNAME=auto-hv-02-guest08.fqdn.scrubbed.                          
                            JOBID=1884800                              
                         RECIPEID=3902568                           
                       LAB_SERVER=                         
                    RESULT_SERVER=[::1]:7080                      
                           DISTRO=RHEL-7.4                            
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **

-sh-4.2$ id
uid=1664401105(tempuser1@ipaadcs12r2.test) gid=1664401105(tempuser1@ipaadcs12r2.test) groups=1664401105(tempuser1@ipaadcs12r2.test),1664400513(domain users@ipaadcs12r2.test)

-sh-4.2$ whoami
tempuser1@ipaadcs12r2.test
Comment 8 errata-xmlrpc 2017-08-01 05:51:24 EDT
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-2017:2304

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