Red Hat Bugzilla – Bug 1461053
allow to modify list of UPNs of a trusted forest
Last modified: 2017-08-01 05:51:24 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.
Upstream ticket: https://pagure.io/freeipa/issue/7015
Fixed upstream ipa-4-5: https://pagure.io/freeipa/c/9a31b21bff7c83219a4973adf815c900628ab620 master: https://pagure.io/freeipa/c/abb638487580af99882b4751b64939d0aff0d38b
Fixed upstream master: https://pagure.io/freeipa/c/b25412f9889f3523974e7aeb43920d4e2347fcfa ipa-4-5: https://pagure.io/freeipa/c/e22b61832bb5b52eb9daadcbc12ca41e0923503c
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
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