I am trying to lock down an openldap server (2.4.23). Using the FAQ I have limited the user entries with:
{1)to attrs=userPassword by self =xw by anonymous auth {2)to * by users read
However, I cannot figure out how to match the namingContexts attribute with olcaccess to also prevent unauthenticated users from listing the directories served. I have tried many variations of the following based on search results:
to attrs=namingContexts by * none
to dn.exact="" attrs=namingContexts by * none
to dn.base="" attrs=namingContexts val/distinguishedNameMatch="dc=mydomain,dc=com" by * none
Can anyone help?
Thanks
On Fri, Nov 22, 2013 at 02:26:28PM -0500, Aaron Richton wrote:
On Fri, 22 Nov 2013, openldap@downhomelinux.com wrote:
to dn.exact="" attrs=namingContexts by * none
I'd expect this to work. Are you sure that you're adding this as a global directive, not inside of a particular backend/database?
I have tried putting each of the following in -1frontend.ldif:
olcAccess: to attrs=namingContexts by * read or olcAccess: to dn.exact="" attrs=namingContexts by * read
I lose all access whether I bind to the rootdn or not yet I explicitly set read access.
openldap@downhomelinux.com wrote:
I am trying to lock down an openldap server (2.4.23). Using the FAQ I have limited the user entries with:
{1)to attrs=userPassword by self =xw by anonymous auth {2)to * by users read
However, I cannot figure out how to match the namingContexts attribute with olcaccess to also prevent unauthenticated users from listing the directories served. I have tried many variations of the following based on search results:
to attrs=namingContexts by * none
to dn.exact="" attrs=namingContexts by * none
to dn.base="" attrs=namingContexts val/distinguishedNameMatch="dc=mydomain,dc=com" by * none
Since you're using back-config make sure that you add the ACLs to entry
olcDatabase={-1}frontend,cn=config
Personally I think it does not make sense to lock down attribute 'namingContexts' including bound users though.
Ciao, Michael.
openldap-technical@openldap.org