Bug 1118014
| Summary: | [RFE] Enhance ACIs to have more control over MODRDN operations | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Noriko Hosoi <nhosoi> |
| Component: | 389-ds-base | Assignee: | Noriko Hosoi <nhosoi> |
| Status: | CLOSED ERRATA | QA Contact: | Viktor Ashirov <vashirov> |
| Severity: | unspecified | Docs Contact: | Aneta Šteflová Petrová <apetrova> |
| Priority: | medium | ||
| Version: | 7.0 | CC: | nkinder, rmeggins, tbordaz, tcapek |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 389-ds-base-1.3.3.1-1.el7 | Doc Type: | Enhancement |
| Doc Text: |
ACIs offer better control over the MODDN and MODRDN operations
With the enhanced Access Control Instructions (ACIs), it is possible to define a source tree and a destination tree, allow or deny the MODDN and MODRDN operations, and also specify the source and destination targets in the same ACI. As a result, you can, for example, enable users to move an entry from one part of the tree to another, but at the same time forbid them to move an entry from or to other parts of the tree. You can also forbid users to delete or add entries.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-03-05 09:35:59 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: | 1185062 | ||
|
Description
Noriko Hosoi
2014-07-09 20:47:13 UTC
I have the following ACIs set in the suffix. The modrdn fails with Insufficient access. Please let me know if I am missing something. [root@intel-s3eb1-03 MMR_WINSYNC]# ldapsearch -LLL -x -p 9989 -D "cn=Directory Manager" -w Secret123 -h localhost -b dc=modrdn,dc=com aci dn: dc=modrdn,dc=com aci: (targetattr="userPassword")(version 3.0; acl "Replication Manager Access" ; allow (write,compare) userdn="ldap:///cn=SyncManager,cn=config";) aci: (target ="ldap:///dc=modrdn,dc=com")(targetattr !="userPassword")(version 3.0; acl "Anonymous read-sch access"; allow (read, search, compare)(userdn = "ldap:///anyone");) aci: (target ="ldap:///dc=modrdn,dc=com")(targetattr = "userpassword || teleph onenumber")(version 3.0; acl "Allow self entry modificn";allow (write)(userdn = "ldap:///self");) aci: (target_from="ldap:///ou=People,dc=modrdn,dc=com")(target_to="ldap:///ou= Groups,dc=modrdn,dc=com")(version 3.0; acl "MODDN from"; allow (moddn) userdn ="ldap:///uid=adminaci1,ou=Testing,dc=modrdn,dc=com";) dn: ou=People,dc=modrdn,dc=com aci: (target_from="ldap:///ou=People,dc=modrdn,dc=com")(target_to="ldap:///ou= Groups,dc=modrdn,dc=com")(version 3.0; acl "MODDN from"; allow (moddn) userdn ="ldap:///uid=adminaci1,ou=Testing,dc=modrdn,dc=com";) aci: (target_from="ldap:///uid=*,ou=People,dc=modrdn,dc=com")(target_to="ldap: ///ou=Groups,dc=modrdn,dc=com")(version 3.0; acl "MODDN from"; allow (moddn) userdn="ldap:///uid=adminaci1,ou=Testing,dc=modrdn,dc=com";) [root@intel-s3eb1-03 MMR_WINSYNC]# ldapmodify -x -p 9989 -h localhost -D "uid=adminaci1,ou=Testing,dc=modrdn,dc=com" -w Secret123 << EOF dn: uid=testusr1,ou=People,dc=modrdn,dc=com changetype: modrdn newrdn: uid=allnewtestaci2 deleteoldrdn: 1 newsuperior: ou=Groups,dc=modrdn,dc=com EOF modifying rdn of entry "uid=testusr1,ou=People,dc=modrdn,dc=com" ldap_rename: Insufficient access (50) [root@intel-s3eb1-03 MMR_WINSYNC]# ldapmodify -x -p 9989 -h localhost -D "uid=adminaci1,ou=Testing,dc=modrdn,dc=com" -w Secret123 << EOF dn: uid=testusr2,ou=People,dc=modrdn,dc=com changetype: modrdn newrdn: uid=allnewtestaci1 deleteoldrdn: 1 newsuperior: ou=Groups,dc=modrdn,dc=com EOF modifying rdn of entry "uid=testusr2,ou=People,dc=modrdn,dc=com" ldap_rename: Insufficient access (50) Hello Sankar,
Reading your question I did not see what was going wrong and I have to debug it.
The test case has two problems:
- First the MODDN (ability to move the entry from a subtree to an other) requires an ACI localized above in the tree. So that it covers the source and destination.
I moved the following acis at the suffix level:
dn: dc=example,dc=com
aci: (target_from="ldap:///ou=People,dc=example,dc=com")(target_to="ldap:///ou
=Groups,dc=example,dc=com")(version 3.0; acl "MODDN from"; allow (moddn)userd
n="ldap:///cn=adminaci,ou=testing,dc=example,dc=com";)
aci: (target_from="ldap:///cn=*,ou=People,dc=example,dc=com")(target_to="ldap:
///ou=Groups,dc=example,dc=com")(version 3.0; acl "MODDN from"; allow (moddn)
userdn="ldap:///cn=adminaci,ou=testing,dc=example,dc=com";)
This was enough to allow the "move" of the entry. But there is a second problem because your test case change the RDN.
- The second problem is that you need an extra aci to allow 'cn=adminaci' to 'write' the RDN attribute ('cn' in my test case, while it is 'uid' in your test case). So I added this aci
dn: dc=example,dc=com
aci: (targetattr="cn")(version 3.0; acl "MODDN write RDN"; allow (read, search
, compare, write) userdn="ldap:///cn=adminaci,ou=testing,dc=example,dc=com";)
With theses two changes I was able to MOVE+rename the test entry:
ldapmodify -h ... -D "cn=adminaci,ou=testing,dc=example,dc=com" -w Secret123 <<EOF
dn: cn=testuser,ou=People,dc=example,dc=com
changetype: modrdn
newrdn: cn=allnewtestuser
deleteoldrdn: 1
newsuperior: ou=Groups,dc=example,dc=com
EOF
Thanks Thierry for the detailed steps. I tested the following cases with the ACI set as this... aci: (target_from="ldap:///uid=*,ou=People,dc=modrdn,dc=com")(target_to="ldap: ///ou=Groups,dc=modrdn,dc=com")(version 3.0; acl "MODDN from"; allow (moddn) userdn="ldap:///uid=adminaci1,ou=Testing,dc=modrdn,dc=com";) 1. Move users from ou=People to ou=Groups, without changing the RDN of the entry. Result : PASS. [root@intel-s3eb1-03 MMR_WINSYNC]# ldapmodify -x -p 9189 -h localhost -D "uid=adminaci1,ou=Testing,dc=modrdn,dc=com" -w Secret123 << EOF dn: uid=peopleusr8,ou=People,dc=modrdn,dc=com changetype: modrdn newrdn: uid=peopleusr8 deleteoldrdn: 0 newsuperior: ou=Groups,dc=modrdn,dc=com EOF modifying rdn of entry "uid=peopleusr8,ou=People,dc=modrdn,dc=com" 2. Move users from ou=People to ou=Groups, change the RDN of the entry. Expected to FAIL with error 50. Result : PASS. [root@intel-s3eb1-03 MMR_WINSYNC]# ldapmodify -x -p 9189 -h localhost -D "uid=adminaci1,ou=Testing,dc=modrdn,dc=com" -w Secret123 << EOF dn: uid=peopleusr7,ou=People,dc=modrdn,dc=com changetype: modrdn newrdn: uid=peopleusr99 deleteoldrdn: 0 newsuperior: ou=Groups,dc=modrdn,dc=com EOF modifying rdn of entry "uid=peopleusr7,ou=People,dc=modrdn,dc=com" ldap_rename: Insufficient access (50) 3. Move users from ou=Groups to ou=People, change the RDN of the entry or without the change of RDN. Expected to FAIL with error 50. Result : PASS. [root@intel-s3eb1-03 MMR_WINSYNC]# ldapmodify -x -p 9189 -h localhost -D "uid=adminaci1,ou=Testing,dc=modrdn,dc=com" -w Secret123 << EOF dn: uid=peopleusr9,ou=Groups,dc=modrdn,dc=com changetype: modrdn newrdn: uid=peopleusr9 deleteoldrdn: 0 newsuperior: ou=People,dc=modrdn,dc=com EOF modifying rdn of entry "uid=peopleusr9,ou=Groups,dc=modrdn,dc=com" ldap_rename: Insufficient access (50) additional info: Insufficient 'moddn' privilege to move an entry to 'ou=People,dc=modrdn,dc=com'. 4. Add a new entry to ou=People. Expected to FAIL. Result: PASS [root@intel-s3eb1-03 MMR_WINSYNC]# ldapmodify -x -p 9189 -h localhost -D "uid=adminaci1,ou=Testing,dc=modrdn,dc=com" -w Secret123 -avf /tmp/testusr1.ldif > /dev/null ; echo $? ldap_initialize( ldap://localhost:9189 ) ldap_add: Insufficient access (50) additional info: Insufficient 'add' privilege to add the entry 'uid=mmrtestctt333,ou=people,dc=modrdn,dc=com'. 50 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/RHSA-2015-0416.html |