I've uploaded a quick workaround to check the above acl, it can be
downloaded from here:
ftp://ftp.openldap.org/incoming/its7347.patch
=> Test result: It works for me.
In the sense of the ITS title it's just a half-way workaround: It
addresses only subtractive ACLs, additive ACLs are not addressed.
A clean solution, separating the bitmasks is of course preferable.
In my opinion ITS#6900 should be closed.
On Aug 6, 2012, at 1:55 PM, daniel(a)pluta.biz wrote:
> Full_Name: Daniel Pluta
> Version: MASTER
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (2001:470:9feb:ff03:e455:e36f:5b06:b2f1)
>
>
> The "Enhancement for dnattr=... ACL" we've described within the LDAPcon2011
> paper (http://www.daasi.de/ldapcon2011/downloads/plutahommelweinert-paper.pdf,
> Chapter VI, Section G., pdf page 7, left column bottom) seems to be still very
> useful in our opinion.
>
> We (Peter an me) have discussed the idea behind this enhancement together with
> Howard during dinner the day before the LDAPCon2011 officially started. We
> described the enhancement as some kind of
> "dnattr-based-administrator-less-2-way-handshake-entry-responsibility(-owner)-transition".
>
> Until today ITS#6900 contains a prototypical patch (very dirty hack), to
> demonstrate the described enhancement's mode of operation.
>
> The good news:
> Probably this hack isn't needed anymore in the future and thus ITS#6900 could be
> closed, but just in case ...
>
> The bad news:
> ... another (hopefully) less intrusive and generally useful patch, that seems to
> be implementable without introducing new keywords can be realized instead:
>
> In http://www.openldap.org/lists/openldap-technical/201208/msg00040.html Kurt
> explained that the acl privilege levels "a" and "z" share one bit with the "w"
> privilege's bit set. Thus currently neither "a" nor "z" can be independently
> substracted from "w" in the way either "z" or "a" remains in the privilege set.
> Subtracting "a" or "z" results in removing the complete "w" privilege (including
> "a" and "z").
Looking back at the devel discussion about the introduction of a/z privs (April 2005), there seems to have been no consideration of subtractive access controls. That is, I think the we all just missed the a/z feature was not implemented in a manner which supported subtractive access controls. Or, more simply put, whoops.
Using qualifiers was the mistake. Just should of replaced one bit with 2 bits, with some operations requesting one or the other or both bits.
> In case the bit masks of the privileges "a", "z", and "w" can be separated
> (introducing exclusive masks for ACL_WADD, ACL_WDEL and ACL_WRITE), the
> following acl set offers the above described mode of operation (out-of-the-box
> without the need to apply the hack submitted with ITS#6900):
>
> {0}to dn.base="ou=groups,o=iacm" attrs=children by users write by * none
> {1}to dn.one="ou=groups,o=iacm" attrs=owner by dnattr=owner =dxcsraz continue
> by dnattr=modifiersName -z by * none
> {2}to dn.one="ou=groups,o=iacm" attrs=entry,@groupOfNames by dnattr=owner write
> by * none
>
> I've not been able to test this acls yet (due to no available hack/patch). At
> least in theory it should represent the mentioned enhancement's mode of
> operation:
> The owner attribute can be modified (add and delete) by any owner, but no owner
> can remove himself from the owner attribute to either repudiate his personal
> responsibility for an entry or to produce a dangling entry (an administrator
> needs to clean up), in case it's the last owner.
I'd have to think a bit harder whether the access controls above implement this properly, but I am sure {1} can be written using non-substractive ACLs. Off hand, probably requiring two to do it.
> Herewith, the request for a more detailed description of a usecase where
> substractive privileges are of general use should be answered.
The general use case of additive and subtractive ACL is that it sometimes makes ACLs shorter.
> Additionally I
> also thought about the statement, that "good ACLs" are either static or
> additive:
I think I used the word "should", as in subtractive ACLs should be avoided. There are likely cases where their use can be well justified, just like default grant rules can sometimes be well justified. However, many security experts advise use of explicit grants (=) or additive (+) grants. I generally concur with this advice.
> I have not been able to find a static or additive ACL solution to
> implement the above described functionality in a similar elegant way (e.g.
> without administratively maintained group patterns)
>
> Alternative 1: (elegant static/additive ACL)
> There possibly exists a solution to express the above described mode of
> operation already nowadays by using static and additive acls only, if so, I
> appreciate any advice.
>
> Alternative 2: (coding the bitmask-separation)
> I have no clue how(h)ard ;-) it is to implement (especially test) a successfull
> separation of these bit masks. It was mentioned that the incremental processing
> of privileges has been added later and the underlying design could be
> suboptimal. Currently I don't know which pitfalls to be aware of (especially in
> and around acl.c). Nevertheless and depending on the answer to alternative 1,
> I'm interessted to give it a try, thus any thoughts and hints are very welcome,
> too.
The latter should be the preferred approach, IMO. The question I would have is wether an implementation of such would have any negative impact upon deployments. That's a real hard one to access, as deployments do some pretty crazy things. In short, it comes does to whether anyone does =w continue followed by -a or -z and expecting the outcome not to z or a respectively.
-- Kurt
>
> Thanks a lot!
>
Full_Name: Daniel Pluta
Version: MASTER
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (2001:470:9feb:ff03:e455:e36f:5b06:b2f1)
The "Enhancement for dnattr=... ACL" we've described within the LDAPcon2011
paper (http://www.daasi.de/ldapcon2011/downloads/plutahommelweinert-paper.pdf,
Chapter VI, Section G., pdf page 7, left column bottom) seems to be still very
useful in our opinion.
We (Peter an me) have discussed the idea behind this enhancement together with
Howard during dinner the day before the LDAPCon2011 officially started. We
described the enhancement as some kind of
"dnattr-based-administrator-less-2-way-handshake-entry-responsibility(-owner)-transition".
Until today ITS#6900 contains a prototypical patch (very dirty hack), to
demonstrate the described enhancement's mode of operation.
The good news:
Probably this hack isn't needed anymore in the future and thus ITS#6900 could be
closed, but just in case ...
The bad news:
... another (hopefully) less intrusive and generally useful patch, that seems to
be implementable without introducing new keywords can be realized instead:
In http://www.openldap.org/lists/openldap-technical/201208/msg00040.html Kurt
explained that the acl privilege levels "a" and "z" share one bit with the "w"
privilege's bit set. Thus currently neither "a" nor "z" can be independently
substracted from "w" in the way either "z" or "a" remains in the privilege set.
Subtracting "a" or "z" results in removing the complete "w" privilege (including
"a" and "z").
In case the bit masks of the privileges "a", "z", and "w" can be separated
(introducing exclusive masks for ACL_WADD, ACL_WDEL and ACL_WRITE), the
following acl set offers the above described mode of operation (out-of-the-box
without the need to apply the hack submitted with ITS#6900):
{0}to dn.base="ou=groups,o=iacm" attrs=children by users write by * none
{1}to dn.one="ou=groups,o=iacm" attrs=owner by dnattr=owner =dxcsraz continue
by dnattr=modifiersName -z by * none
{2}to dn.one="ou=groups,o=iacm" attrs=entry,@groupOfNames by dnattr=owner write
by * none
I've not been able to test this acls yet (due to no available hack/patch). At
least in theory it should represent the mentioned enhancement's mode of
operation:
The owner attribute can be modified (add and delete) by any owner, but no owner
can remove himself from the owner attribute to either repudiate his personal
responsibility for an entry or to produce a dangling entry (an administrator
needs to clean up), in case it's the last owner.
Herewith, the request for a more detailed description of a usecase where
substractive privileges are of general use should be answered. Additionally I
also thought about the statement, that "good ACLs" are either static or
additive: I have not been able to find a static or additive ACL solution to
implement the above described functionality in a similar elegant way (e.g.
without administratively maintained group patterns).
Alternative 1: (elegant static/additive ACL)
There possibly exists a solution to express the above described mode of
operation already nowadays by using static and additive acls only, if so, I
appreciate any advice.
Alternative 2: (coding the bitmask-separation)
I have no clue how(h)ard ;-) it is to implement (especially test) a successfull
separation of these bit masks. It was mentioned that the incremental processing
of privileges has been added later and the underlying design could be
suboptimal. Currently I don't know which pitfalls to be aware of (especially in
and around acl.c). Nevertheless and depending on the answer to alternative 1,
I'm interessted to give it a try, thus any thoughts and hints are very welcome,
too.
Thanks a lot!
daniel(a)pluta.biz wrote:
> Full_Name: Daniel Pluta
> Version: MASTER
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (84.167.55.212)
>
>
> For further explainations please vistit this technical-posting:
>
> http://www.openldap.org/lists/openldap-technical/201208/msg00025.html
>
> Testbed containing slapd.conf, data, ldapsearch-queries and 128-logs are given
> below.
As noted in the referenced email thread, this is working as designed.
"continue" controls are only useful when a following clause matches the same
subject and specifies incremental privileges. There are no following clauses
that match the subject in this case, so the implicit "by * none" at the end of
every ACL clause is applied.
Closing this ITS.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Full_Name: Mathieu MILLET
Version: HEAD
OS: Linux
URL: ftp://ftp.openldap.org/incoming/accesslog_addConnectionInformation.patch
Submission from: (NULL) (82.67.21.31)
Entries provided by the Access Log Overlay does not contain informations such as
the IP Address of the client.
This patch adds a simple attribute : reqConnInfo containing the content of
o_conn->c_peer_name .
Please review this patch because I'm not sure about what safety checks must be
performed on these data before "merging" them.
If this patch is accepted :
I, Mathieu MILLET, hereby place the following modifications to OpenLDAP Software
(and only these modifications) into the public domain. Hence, these
modifications may be freely used and/or redistributed for any purpose with or
without attribution and/or other notice.
Eric Clements wrote:
> I filed it in response to a posting I saw on AFP548 regarding OS X. Some
users have patched OpenLDAP to work around the issue.
If you have a working patch that behaves as you think it should, you're
welcome to submit it. Unfortunately, the RFC is explicitly silent on how other
identity formats are represented. I.e., it doesn't even specify that SASL
identities (such as used in SASL Bind) are valid here.
> Though your statement is true, many SASL methods do not use DNs either. I
> do
not see why it is not allowed for passwordModify in the same way. If it
behaves as designed then feel free to close.
>
> Thank you,
> ---------------------------
> Eric Clements
>
> On Aug 1, 2012, at 2:26 PM, Howard Chu <hyc(a)symas.com> wrote:
>
>> eclements(a)apple.com wrote:
>>> Full_Name: Eric Clements
>>> Version: 2.4.26
>>> OS: MacOS
>>> URL: ftp://ftp.openldap.org/incoming/
>>> Submission from: (NULL) (17.193.15.131)
>>>
>>>
>>> RFC 3062 Section 2.1 (authored by OpenLDAP) states that a password modify
>>> request may or may not be an LDAP DN, yet OpenLDAP backend requires a DN.
>>
>> I'm not sure I understand why you've filed this ITS. The RFC doesn't specify
>> that a server MUST support non-DN valued identities. It in fact says in Section 3:
>>
>> If the server does not recognize provided fields or does not support
>> the combination of fields provided, it SHALL NOT change the user
>> password.
>>
>> Clearly it is allowed for a server to reject identities if it doesn't
>> recognize them.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
I filed it in response to a posting I saw on AFP548 regarding OS X. Some users have patched OpenLDAP to work around the issue.
Though your statement is true, many SASL methods do not use DNs either. I do not see why it is not allowed for passwordModify in the same way. If it behaves as designed then feel free to close.
Thank you,
---------------------------
Eric Clements
On Aug 1, 2012, at 2:26 PM, Howard Chu <hyc(a)symas.com> wrote:
> eclements(a)apple.com wrote:
>> Full_Name: Eric Clements
>> Version: 2.4.26
>> OS: MacOS
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (17.193.15.131)
>>
>>
>> RFC 3062 Section 2.1 (authored by OpenLDAP) states that a password modify
>> request may or may not be an LDAP DN, yet OpenLDAP backend requires a DN.
>
> I'm not sure I understand why you've filed this ITS. The RFC doesn't specify
> that a server MUST support non-DN valued identities. It in fact says in Section 3:
>
> If the server does not recognize provided fields or does not support
> the combination of fields provided, it SHALL NOT change the user
> password.
>
> Clearly it is allowed for a server to reject identities if it doesn't
> recognize them.
>
> --
> -- Howard Chu
> CTO, Symas Corp. http://www.symas.com
> Director, Highland Sun http://highlandsun.com/hyc/
> Chief Architect, OpenLDAP http://www.openldap.org/project/
jsynacek(a)redhat.com wrote:
> Full_Name: Jan Synacek
> Version: master
> OS: linux-fedora17
> URL: ftp://ftp.openldap.org/incoming/jsynacek-20120802-testsuit-slapo-constraint…
> Submission from: (NULL) (209.132.186.34)
>
>
> This patch adds an initial testsuit for slapo-constraint.
Thanks, added to master.
>
> The attached file is derived from OpenLDAP Software. All of the modifications
> to
> OpenLDAP Software represented in the following patch(es) were developed by Red
> Hat. Red Hat has not assigned rights and/or interest in this work to any party.
> I, Jan Synacek am authorized by Red Hat, my employer, to release this work
> under
> the following terms.
>
> Red Hat hereby place the following modifications to OpenLDAP Software (and only
> these modifications) into the public domain. Hence, these modifications may be
> freely used and/or redistributed for any purpose with or without attribution
> and/or other notice.
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/