Bug 921162
Summary: | Possible to add nonexistent target to ACI | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ján Rusnačko <jrusnack> |
Component: | 389-ds-base | Assignee: | Rich Megginson <rmeggins> |
Status: | CLOSED ERRATA | QA Contact: | Viktor Ashirov <vashirov> |
Severity: | unspecified | Docs Contact: | |
Priority: | low | ||
Version: | 7.0 | CC: | nhosoi, nkinder, sramling |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 389-ds-base-1.3.3.1-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 09:30:21 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ján Rusnačko
2013-03-13 15:21:15 UTC
I'm not sure if this is something that we should change. With the current behavior, one can create an ACI for a target that doesn't exist yet, but they may add the target later. I don't see much downside to this other then the following: - If you make a typo in the target, you might not notice it unless you test the new ACI. - There is an extra ACI to evaluate that will never match any target. If we decide to change the behavior, we have a few options: - Reject an ACI with a non-existent target, but this would prevent someone from pre-creating their ACIs for targets that will be added later. - Return/log a warning when an ACI is added with a non-existent target, but allow the operation to go through. The problem with this is that I'm not sure if most LDAP clients will not display the error message since the result code is 0. It is also not likely that the person adding the ACI will then check the errors log. (In reply to comment #1) > I'm not sure if this is something that we should change. With the current > behavior, one can create an ACI for a target that doesn't exist yet, but > they may add the target later. I don't see much downside to this other then > the following: > > - If you make a typo in the target, you might not notice it unless you > test the new ACI. > > - There is an extra ACI to evaluate that will never match any target. > > If we decide to change the behavior, we have a few options: > > - Reject an ACI with a non-existent target, but this would prevent > someone from pre-creating their ACIs for targets that will be added > later. > > - Return/log a warning when an ACI is added with a non-existent target, > but allow the operation to go through. The problem with this is that > I'm not sure if most LDAP clients will not display the error message > since the result code is 0. It is also not likely that the person > adding the ACI will then check the errors log. Logging an error/warning message might be helpful when the user finds that one of the ACI is not working. I am sure most of the users/customers will look at the error logs when something stops working or not working as expected. But, I agree that it deoesn't require a validation on the fly considering that the target might be created a later point of time. Upstream ticket: https://fedorahosted.org/389/ticket/626 Invalid ACI throws error message in the logs.
[root@vm-idm-035 ~]# ldapmodify -x -p 1189 -h localhost -D "cn=Directory Manager" -w Secret123 << EOF
> dn: dc=example,dc=com
> changetype: modify
> add: aci
> aci: (targetattr != "userPassword") (target = "ldap:///ou=invalid,dc=example,dc=com") (version 3.0;acl "Enable anonymous access";allow (read,compare,search)(userdn = "ldap:///anyone");)
> EOF
modifying entry "dc=example,dc=com"
==> /var/log/dirsrv/slapd-M1/errors <==
[01/Dec/2014:10:09:11 +051800] NSACLPlugin - The ACL target ou=invalid,dc=example,dc=com does not exist
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 |