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 1461053 - allow to modify list of UPNs of a trusted forest
Summary: allow to modify list of UPNs of a trusted forest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Scott Poore
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-13 12:36 UTC by Petr Vobornik
Modified: 2017-08-01 09:51 UTC (History)
8 users (show)

Fixed In Version: ipa-4.5.0-17.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 09:51:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2304 0 normal SHIPPED_LIVE ipa bug fix and enhancement update 2017-08-01 12:41:35 UTC

Description Petr Vobornik 2017-06-13 12:36:09 UTC
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 12:36:22 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7015

Comment 7 Scott Poore 2017-06-19 23:32:03 UTC
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 $(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 $(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) gid=1664401105(tempuser1) groups=1664401105(tempuser1),1664400513(domain users)

-sh-4.2$ whoami
tempuser1

Comment 8 errata-xmlrpc 2017-08-01 09:51:24 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-2017:2304


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