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 1517886 - double ca acl provoke console error.
Summary: double ca acl provoke console error.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-27 16:19 UTC by German Parente
Modified: 2020-12-14 10:55 UTC (History)
9 users (show)

Fixed In Version: ipa-4.6.5-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:09:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2241 0 None None None 2019-08-06 13:09:20 UTC

Description German Parente 2017-11-27 16:19:04 UTC
Description of problem:

(logging this bug with low priority just for documentation of a customer issue)

There's a console "Operations Error" when accessing this in the console:

Authentication -> Certificates -> CA ACLs

When clicking on CA ACLs a dialog box pops up and states:
Operations Error

Version-Release number of selected component (if applicable): 
   ipa-server-4.4.0-14.el7_3.7.x86_64


the httpd logs are showing:

==========
[Wed Nov 22 17:07:59.459223 2017] [:error] [pid 2565] ipa: INFO: user: batch: caacl_show(u'hosts_services_caIPAserviceCert', no_members=True): SingleMatchExpected
==========

Then we search the ldap database and we find these objects:

dn: ipaUniqueID=f9f4a83a-ad67-11e5-a500-12958cd037e3,cn=caacls,cn=ca,dc=example,dc=com
ipaMemberCertProfile: cn=caIPAserviceCert,cn=certprofiles,cn=ca,dc=example,dc=com
serviceCategory: all
cn: hosts_services_caIPAserviceCert
objectClass: ipaassociation
objectClass: ipacaacl
hostCategory: all
ipaEnabledFlag: TRUE
ipaUniqueID: f9f4a83a-ad67-11e5-a500-12958cd037e3


dn: ipaUniqueID=f89ac5cc-ad68-11e5-aa96-001a4aa86515,cn=caacls,cn=ca,dc=example,dc=com
ipaMemberCertProfile: cn=caIPAserviceCert,cn=certprofiles,cn=ca,dc=example, dc=com
serviceCategory: all
cn: hosts_services_caIPAserviceCert
objectClass: ipaassociation
objectClass: ipacaacl
hostCategory: all
ipaEnabledFlag: TRUE
ipaUniqueID: f89ac5cc-ad68-11e5-aa96-001a4aa86515

So, once one deleted, the console is working fine. But we don't know how it has been generated.

A "ipa caacl-add" will check the cn attribute not to allow to have duplicates. But as the rdn of the distinguished name is ipaUniqueID instead of cn (why ?), a duplicated could be added into the database without any issue. 

the cn attribute uniqness is only enforced in ipa under:

uniqueness-attribute-name: cn
uniqueness-subtrees: cn=ng,cn=alt,dc=example,dc=com

uniqueness-attribute-name: cn
uniqueness-subtrees: cn=sudorules,cn=sudo,dc=example,dc=com

I consider this a bug since the console does not know how to cope when finding more than one caacls with same profile.

Comment 2 Florence Blanc-Renaud 2017-11-28 10:21:59 UTC
The issue is reproducible and is a valid bug.

1. create a caacl with
ipa caacl-add acl1

2. create a different caacl with
ipa caacl-add newcaacl

3. find the ipauniqueid of the 2nd caacl with 
ipa caacl-show newcaacl --all
  dn: ipaUniqueID=5b2b560a-d424-11e7-9a48-001a4a2313b8,cn=caacls,cn=ca,dc=example,dc=com
  ACL name: newcaacl
  Enabled: TRUE
  ipauniqueid: 5b2b560a-d424-11e7-9a48-001a4a2313b8
  objectclass: ipaassociation, ipacaacl

4. edit the 2nd caacl with ldapmodify and replace its cn:
ldapmodify -D cn=directory\ manager -w $PASSWORD
dn: ipaUniqueID=5b2b560a-d424-11e7-9a48-001a4a2313b8,cn=caacls,cn=ca,dc=example,dc=com
changetype: modify
replace: cn
cn: acl1

5. list the existing caacls
ipa caacl-show acl1
ipa: ERROR: The search criteria was not specific enough. Expected 1 and found 2.

The 4th step should have been forbidden, but as German said, the uniqueness attribute plugin does not operate on cn in the cn=caacls,cn=ca,$SUFFIX subtree.

Comment 3 Florence Blanc-Renaud 2017-12-06 13:20:14 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7304

Comment 4 Florence Blanc-Renaud 2018-02-20 08:41:08 UTC
Fixed upstream

master:
    0e9ce73 Add uniqueness constraint on CA ACL name

Comment 6 Christian Heimes 2019-03-28 20:50:11 UTC
Fixed upstream
ipa-4-6:
https://pagure.io/freeipa/c/2b442126cb7a47631cd6eb745790d2df944b2395

Comment 8 Sumedh Sidhaye 2019-06-14 08:17:02 UTC
Build used for verification:
[root@qe-blade-06 ~]# rpm -qa ipa-server sssd 389-ds-base pki-ca
ipa-server-4.6.5-9.el7.x86_64
389-ds-base-1.3.9.1-9.el7.x86_64
sssd-1.16.4-21.el7.x86_64
pki-ca-10.5.16-2.el7.noarch
[root@qe-blade-06 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.7 Beta (Maipo)
[root@qe-blade-06 ~]# ls /var/lib/pki/
pki-tomcat


Steps: 

[root@qe-blade-06 ~]# ipa caacl-add acl1
-------------------
Added CA ACL "acl1"
-------------------
  ACL name: acl1
  Enabled: TRUE
[root@qe-blade-06 ~]# ipa caacl-add newcaacl
-----------------------
Added CA ACL "newcaacl"
-----------------------
  ACL name: newcaacl
  Enabled: TRUE
[root@qe-blade-06 ~]# ipa caacl-show newcaacl --all
  dn: ipaUniqueID=745bcf02-8e7b-11e9-b3cb-00215e20333e,cn=caacls,cn=ca,dc=testrelm,dc=test
  ACL name: newcaacl
  Enabled: TRUE
  ipauniqueid: 745bcf02-8e7b-11e9-b3cb-00215e20333e
  objectclass: ipaassociation, ipacaacl


[root@qe-blade-06 ~]# ldapmodify -D cn="Directory Manager" -w Secret123
dn: ipaUniqueID=745bcf02-8e7b-11e9-b3cb-00215e20333e,cn=caacls,cn=ca,dc=testrelm,dc=test
changetype: modify
replace: cn
cn: acl1

modifying entry "ipaUniqueID=745bcf02-8e7b-11e9-b3cb-00215e20333e,cn=caacls,cn=ca,dc=testrelm,dc=test"
ldap_modify: Constraint violation (19)
	additional info: Another entry with the same attribute value already exists (attribute: "cn ")     <--------------------- ldapmodify operation fails since it is forbidden

[root@qe-blade-06 ~]# ipa caacl-show acl1
  ACL name: acl1
  Enabled: TRUE
[root@qe-blade-06 ~]# 

Based on above operations marking bugzilla verified.

Comment 10 errata-xmlrpc 2019-08-06 13:09:05 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-2019:2241


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