Bug 736455

Summary: [ipa webui] Sudo Rule includes indirect hosts and users members in its list to add
Product: Red Hat Enterprise Linux 6 Reporter: Namita Soman <nsoman>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: benl, dpal, edewata, jgalipea, mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.1.2-1.el6 Doc Type: Bug Fix
Doc Text:
Do not document
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 18:30:50 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 Namita Soman 2011-09-07 17:48:29 UTC
Description of problem:
For a Sudo Rule, after a hostgroup or usergroup is added to its list, it still list members of the group when adding hosts or users

Version-Release number of selected component (if applicable):
ipa-server-2.1.1-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Add  a host, hostgroup. Add the host as a member to this hostgroup
2. Add a Sudo rule, Edit it
3. Add the hostgroup to its list in Accessing section
4. Add a host in Accessing section
  
Actual results:
host which is member of the hostgroup is listed

Expected results:
host which is member of the hostgroup should not be listed, since the hostgroup is already added to the list

Additional info:
Same scenario - when adding users that already belong to a usergroup which is already added to Sudo Rule in Who section. the user is listed, but should not be.

This host adder dialog in HBAC works as expected.

The cli output is as expected as well:

 -- ADD HOSTGROUP TO SUDO RULE -- 
ipa  sudorule-add-host --hostgroups=testhostgroup qesudorule
  Rule name: qesudorule
  Enabled: TRUE
  Host Groups: testhostgroup
-------------------------
Number of members added 1
-------------------------

 -- RUN HOST-FIND --
ipa host-find --not-in-sudorule=qesudorule
---------------
1 host matched
---------------
  Host name: qe-blade-05.testrelm
  Principal name: host/qe-blade-05.testrelm@TESTRELM
  Keytab: True
  Password: False
  Managed by: qe-blade-05.testrelm
----------------------------
Number of entries returned 1
----------------------------


ipa host-find --in-sudorule=qesudorule
--------------
1 host matched
--------------
  Host name: qehost.testrelm
  Principal name: host/qehost.testrelm@TESTRELM
  Keytab: False
  Password: False
  Member of host-groups: testhostgroup
  Indirect Member of netgroup: testhostgroup
  Managed by: qehost.testrelm
----------------------------
Number of entries returned 1
----------------------------

Comment 2 Dmitri Pal 2011-09-07 20:52:07 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/1768

Comment 3 Martin Kosek 2011-09-12 08:27:08 UTC
Fixed upstream:
master: a95b44face7f3001a27e2ff42c07a5ae1edabc83
ipa-2-1: 68a468f4b0bff67fa3b4e93f1d4ac345c0ef68ab

Comment 6 Namita Soman 2011-10-11 16:10:23 UTC
Verified using ipa-server-2.1.2-2.el6.x86_64
Lists only hosts/users that are not already included by enrolled groups

Comment 8 Martin Kosek 2011-11-01 13:17:41 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Do not document

Comment 9 errata-xmlrpc 2011-12-06 18:30:50 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.

http://rhn.redhat.com/errata/RHSA-2011-1533.html