Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 747730

Summary: command: ipa selfservice-mod "edit address" --permissions="" delete a selfservice permission
Product: Red Hat Enterprise Linux 6 Reporter: Yi Zhang <yzhang>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2CC: dpal, jgalipea, mkosek, spoore
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-2.2.0-1.el6 Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:15:38 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:
Bug Depends On:    
Bug Blocks: 756082    

Description Yi Zhang 2011-10-20 21:02:17 UTC
Description of problem:
when give no value for "--permission", ipa server seen like delete this selfservice permission


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


How reproducible:


Steps to Reproduce:
1. install ipa server
2. create a selfservice permission with this command:
[yi@i386a(101) ~] ipa selfservice-add "edit address" --permission=write,read --attrs=l
--------------------------------
Added selfservice "edit address"
--------------------------------
  Self-service name: edit address
  Permissions: write, read
  Attributes: l

3. confirm the above action with selfservice-find
[yi@i386a(101) ~] ipa selfservice-find
----------------------
3 selfservices matched
----------------------
  Self-service name: Self can write own password
  Permissions: write
  Attributes: userpassword, krbprincipalkey, sambalmpassword, sambantpassword

  Self-service name: User Self service
  Permissions: write
  Attributes: givenname, sn, cn, displayname, title, initials, loginshell, gecos, homephone, mobile, pager, facsimiletelephonenumber, telephonenumber, street,
              roomnumber, l, st, postalcode, manager, secretary, description, carlicense, labeleduri, inetuserhttpurl, seealso, employeetype, businesscategory,
              ou

  Self-service name: edit address
  Permissions: write, read
  Attributes: l
----------------------------
Number of entries returned 3
----------------------------

4. run the problematic command: 
[yi@i386a(101) ~] ipa selfservice-mod "edit address" --permissions=""
ipa: ERROR: 'permissions' is required

5. the error msg look fine, but when run selfservice-find, the permission "edit address" disappeared:
[yi@i386a(101) ~] ipa selfservice-find
----------------------
2 selfservices matched
----------------------
  Self-service name: Self can write own password
  Permissions: write
  Attributes: userpassword, krbprincipalkey, sambalmpassword, sambantpassword

  Self-service name: User Self service
  Permissions: write
  Attributes: givenname, sn, cn, displayname, title, initials, loginshell, gecos, homephone, mobile, pager, facsimiletelephonenumber, telephonenumber, street,
              roomnumber, l, st, postalcode, manager, secretary, description, carlicense, labeleduri, inetuserhttpurl, seealso, employeetype, businesscategory,
              ou
----------------------------
Number of entries returned 2
----------------------------


Additional info: there is no error msg in /var/log/httpd/error_log

Comment 1 Yi Zhang 2011-10-20 21:04:04 UTC
to verify:
1. create selfservice permission:
ipa selfservice-add "edit address" --permission=write,read --attrs=l

2. check with selfservice-find
ipa selfservice-add "edit address" --permission=write,read --attrs=l

3. run problematic statement:
ipa selfservice-mod "edit address" --permissions=""

4. check selfservice permissions with find
ipa selfservice-find


if the "edit address" exist, then test pass

Comment 3 Dmitri Pal 2011-10-20 22:25:48 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2013

Comment 6 Scott Poore 2012-03-16 20:45:28 UTC
Verified.

Version :: ipa-server-2.2.0-4.el6.x86_64

Automated Test Results ::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: selfservice_bz_747730 ipa selfservice-mod edit address --permissions="" delete a selfservice permission
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: BZ Test Running: ipa selfservice-mod selfservice_bz_747730 --permissions="" > /tmp/tmp.V5BS5xp3mS/selfservice_bz_747730.26503.out 2>&1
:: [   LOG    ] :: Duration: 12s
:: [   LOG    ] :: Assertions: 0 good, 0 bad
:: [   PASS   ] :: RESULT: selfservice_bz_747730 ipa selfservice-mod edit address --permissions="" delete a selfservice permission

Manual Test Results ::

[root@hp-xw6600-01 ipa-selfservice]# ipa selfservice-add bz747730 --attrs=l
----------------------------
Added selfservice "bz747730"
----------------------------
  Self-service name: bz747730
  Permissions: write
  Attributes: l

[root@hp-xw6600-01 ipa-selfservice]# ipa selfservice-mod bz747730 --permissions=""
ipa: ERROR: 'permissions' is required

[root@hp-xw6600-01 ipa-selfservice]# ipa selfservice-show bz747730
  Self-service name: bz747730
  Permissions: write
  Attributes: l

Comment 8 Martin Kosek 2012-04-18 20:50:40 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:
No documentation needed.

Comment 10 errata-xmlrpc 2012-06-20 13:15:38 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/RHBA-2012-0819.html