Bug 1265915 - idoverrideuser-find fails if any SID anchor is not resolvable anymore
idoverrideuser-find fails if any SID anchor is not resolvable anymore
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: IPA Maintainers
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-24 03:22 EDT by Sudhir Menon
Modified: 2016-11-04 01:46 EDT (History)
4 users (show)

See Also:
Fixed In Version: ipa-4.4.0-0.el7.1.alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 01:46:53 EDT
Type: Bug
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 Sudhir Menon 2015-09-24 03:22:57 EDT
Description of problem: When AD trust is deleted post winsync migrate, the Default trust View is not listed in UI. 


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


How reproducible: Always.


Steps to Reproduce:
1. Establish Winsync Agreement with AD
2. Ensure users are replicated to IPA.
3. Now AD trust with POSIX i.e ipa trust-add --range-type='ipa-ad-trust-posix'
4. Ensure trust is established successfully
5. Ensure that the users are listed in 'Default Trust View'
6. Now delete the trust.

Actual results:
The trust gets removed successfully, but when we navigate to IDViews tab it displays the below error in UI

Operations Error:  invalid 'sid': SID is not valid
An error has occurred (IPA Error 3009: ValidationError)

Error on Console.
[root@ipa01 ipa]# ipa idoverrideuser-find "Default Trust View"
ipa: ERROR: invalid 'sid': SID is not valid


Expected results:
Should the ID Views be removed here? Default Trust View shouldn't be removed.
If they are to be removed, shouldn't we fix the error seen on the UI and console.

Additional info:
Comment 2 Tomas Babej 2015-09-24 04:58:03 EDT
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/5322
Comment 3 Tomas Babej 2015-09-24 04:58:25 EDT
The "Default Trust View" should not be removed after the trust is deleted. However, the failure of idoverrideuser-find is a legitimate one, it should be able to cope with SIDs that are no longer resolvable.
Comment 4 Petr Vobornik 2015-10-19 16:51:48 EDT
master:
    4c2276f7ec9a049ea9088030b23badecd88c73e4 idoverride: Ignore ValidationErrors when converting the anchor
    eaeb40328cf80f615684ffc692b9416e1c08d544 tests: Add tests for idoverride object integrity 

ipa-4-2:
    52680a1a08a040b99e1a843126f5588e14237691 idoverride: Ignore ValidationErrors when converting the anchor
    cc085d240dc4c6a02ef39752043059c1d35b591a tests: Add tests for idoverride object integrity
Comment 5 Mike McCune 2016-03-28 18:43:24 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 7 Sudhir Menon 2016-07-21 03:18:22 EDT
Default Trust View is not removed.
Also the SID's are also handled which are no longer resolvable.

Fix is seen in ipa-server-4.4.0-2.1.el7.x86_64


[root@server ~]# ipa idoverrideuser-find
ID View Name: Default Trust View
---------------------------
5 User ID overrides matched
---------------------------
  Anchor to override: user1@pne.qe
  User login: user1
  UID: 1081400003
  GECOS: user1
  GID: 1081400003
  Login shell: /bin/sh

  Anchor to override: user2@pne.qe
  User login: user2
  UID: 1081400001
  GECOS: user2
  GID: 1081400001
  Login shell: /bin/sh

  Anchor to override: user3@pne.qe
  User login: user3
  UID: 1081400004
  GECOS: user3
  GID: 1081400004
  Login shell: /bin/sh

  Anchor to override: user4@pne.qe
  User login: user4
  UID: 1081400005
  GECOS: t
  GID: 1081400005
  Login shell: /bin/sh

  Anchor to override: user5@pne.qe
  User login: user5
  UID: 1081400006
  GECOS: user5
  GID: 1081400006
  Login shell: /bin/sh
----------------------------
Number of entries returned 5
----------------------------
[root@server ~]# ipa trust-del pne.qe
----------------------
Deleted trust "pne.qe"
----------------------
[root@server ~]# ipa idoverrideuser-find 'Default Trust View'
---------------------------
5 User ID overrides matched
---------------------------
  Anchor to override: :SID:S-1-5-21-3912719521-1967590360-1136226524-1403
  User login: user1
  UID: 1081400003
  GECOS: user1
  GID: 1081400003
  Login shell: /bin/sh

  Anchor to override: :SID:S-1-5-21-3912719521-1967590360-1136226524-1405
  User login: user2
  UID: 1081400001
  GECOS: user2
  GID: 1081400001
  Login shell: /bin/sh

  Anchor to override: :SID:S-1-5-21-3912719521-1967590360-1136226524-1413
  User login: user3
  UID: 1081400004
  GECOS: user3
  GID: 1081400004
  Login shell: /bin/sh

  Anchor to override: :SID:S-1-5-21-3912719521-1967590360-1136226524-1415
  User login: user4
  UID: 1081400005
  GECOS: t
  GID: 1081400005
  Login shell: /bin/sh

  Anchor to override: :SID:S-1-5-21-3912719521-1967590360-1136226524-1419
  User login: user5
  UID: 1081400006
  GECOS: user5
  GID: 1081400006
  Login shell: /bin/sh
----------------------------
Number of entries returned 5
----------------------------
Comment 9 errata-xmlrpc 2016-11-04 01:46:53 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://rhn.redhat.com/errata/RHBA-2016-2404.html

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