OpenLDAP Project | 24 May 20:07

Shutdown of the OpenLDAP-Software list in favor of the OpenLDAP-Technical list

The Project has decided to shutdown the OpenLDAP-Software list in favor of the more broadly chartered
OpenLDAP-Technical list.  This change is intended to eliminate a significant burden upon the list
moderators (OpenLDAP-Software list, unlike the OpenLDAP-Technical list, has long had a narrow charter
and strict moderation policy).

On May 29th, all new threads will be rejected by the moderator with a note to take them to the
OpenLDAP-technical list.  A week will be given for active threads to be concluded (or moved to the
openldap-technical list).   On June 5th, the list will be shutdown.  Archives will remain available.

Subscribers of the OpenLDAP-Software list will NOT automatically be subscribed to the
OpenLDAP-Technical list.  Each person who wishes to follow the openldap-technical list must subscribe
themself to the openldap-technical list.

-- The OpenLDAP Project
Nacho Díaz Asenjo | 20 May 12:09
Picon

Syncrepl has deleted over 50%

Hi!

    Syncrepl has decided make a cleaner in my consumer  this night. In 
aprox. 2 hours it has deleted over 50% of my directory ... of course 
it's a wrong, but i havent't idea about why.

    I have installed Openldap 2.4.19 in my producer (master) and in my 
consumer (slave).

   My config:
    syncrepl rid=001
    provider=ldap://xxxxxxx
    type=refreshAndPersist
    searchbase="o=xxxxxx"
    schemachecking=off
    attrs="*,+"
    retry="30 10 600 20"
    binddn="uid=syncrepl,o=xxxxx"
    credentials=xxxx

   In log file

First ... about 1 hour ..

May 20 03:32:06 ldap03 slapd[29549]: syncrepl_entry: rid=001 
LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_MODIFY)
May 20 03:32:06 ldap03 slapd[29549]: syncrepl_entry: rid=001 be_search (0)
May 20 03:32:06 ldap03 slapd[29549]: syncrepl_entry: rid=001 
uid=600000790,ou=UNIVERSIDAD DE 
MAYORES,ou=Alumnos,ou=Gente,o=Universidad Carlos III,c=es
(Continue reading)

Khoa Nguyen | 19 May 23:42
Picon

LDAP performance slow intermittently

My LDAP server (version 2.3.43) performance is quite erratic; for a few minutes, search operations are lightning fast, and then it slows down to several seconds for a single search, and then it is fast again, etc.

I am not sure how to troubleshoot/determine the root cause of this intermittent problem. Any suggestions are appreciated.

Khoa

DT Piotr Wadas | 19 May 23:02
Picon

slapd read-only slave replica


Hello,

Does it make any sens to enable indexing of any attribute on read-only 
slave syncrepl replica? I mean, isn't it just waste of resources, or, 
actually, is not a waste a resources at all, since replica is read-only 
and does not write anything anyway? This, I think, apply to any version of 
openldap.

Regards,
DT

Joshua Lim | 19 May 16:26
Picon

Re: do_bind: invalid dn

Dan Burkland wrote:
> -----Original Message-----
> From: openldap-software-bounces+dburklan=nmdp.org <at> OpenLDAP.org
[mailto:openldap-software-bounces+dburklan=nmdp.org <at> OpenLDAP.org] On Behalf Of Joshua Lim
> Sent: Monday, May 17, 2010 12:21 PM
> To: openldap-software <at> openldap.org
> Subject: Re: do_bind: invalid dn
>
> Any thoughts?  I tried the following, entered the correct password 
> 'password' and got: 
> ldap_bind: Invalid credentials (49)
>
> ldapsearch -x -D cn=wael,dc=click,dc=com -h localhost -W -b '' 
> namingContexts
>
>
> Log shows:
>
> slap_listener_activate(2):
>  >>> slap_listener(ldap://JOSHUAPC:389)
> connection_get(10): got connid=0
> connection_read(10): checking for input on id=0
> ber_get_next
> ber_get_next: tag 0x30 len 47 contents:
> op tag 0x60, time 1273506428
> ber_get_next
> conn=0 op=0 do_bind
> ber_scanf fmt ({imt) ber:
> ber_scanf fmt (m}) ber:
>  >>> dnPrettyNormal: <cn=wael,dc=click,dc=com>
> <<< dnPrettyNormal: <cn=wael,dc=click,dc=com>, <cn=wael,dc=click,dc=com>
> do_bind: version=3 dn="cn=wael,dc=click,dc=com" method=128
> send_ldap_result: conn=0 op=0 p=3
> send_ldap_response: msgid=1 tag=97 err=49
> ber_flush2: 22 bytes to sd 2140
> connection_get(10): got connid=0
> connection_read(10): checking for input on id=0
> ber_get_next
> ber_get_next on fd 10 failed errno=0 (unknown WSA error)
> connection_close: conn=0 sd=10
>
>
> My slapd.conf (i basically used the default, only suffix, rootdn and
> rootpw is changed):
> ********************************
> database    bdb
> suffix        "dc=click,dc=com"
> rootdn        "cn=wael,dc=click,dc=com"
> # Cleartext passwords, especially for the rootdn, should
> # be avoid.  See slappasswd(8) and slapd.conf(5) for details.
> # Use of strong authentication encouraged.
> rootpw        password
> # The database directory MUST exist prior to running slapd AND
> # should only be accessible by the slapd and slap tools.
> # Mode 700 recommended.
> directory ./data
> dirtyread
> searchstack 20
> # Indices to maintain
> index mail pres,eq
> index objectclass pres
> index default eq,sub
> index sn eq,sub,subinitial
> index telephonenumber
> index cn
> --------------------------------------------------------------------------
>
> I may be wrong but I believe your rootpw value needs to be a hash value. Use slappasswd to generate one and
then replace password with it. Restart the service and let me know if you experience the same issue.
>
> Regards,
>
> Dan
>
>
>   

Thanks Dan, yes, that was the reason.  :)

Picon

LDAPS connection failing with a "TLS accept failure error -1"

Hello all,

I hope someone could help me -- I'm trying for almost one whole day already and couldn't get LDAP over SSL to work, without success.

The objective is to setup a development box for testing purposes, so, the simpler the better, however, it must be as simple as needed only.

I've followed this tutorial: http://islandlinux.org/howto/installing-secure-ldap-openldap-ssl-ubuntu-using-self-signed-certificate. I'm on Mac OSX Snow Leopard, though.

slapd version: <at> (#) $OpenLDAP: slapd 2.4.11 (Feb 11 2010 02:23:14) //Installed from MacPorts

I have generated a self-signed certificate using this command:

sudo openssl req -newkey rsa:1024 -x509 -nodes -out server.pem -keyout server.pem -days 3650

I've set the Common Name to "localhost".

The configuration files look like this (non-relevanted parts snipped):

slapd.conf:

TLSCipherSuite HIGH:MEDIUM:-SSLv2
TLSCACertificateFile /Users/myuser/Sandbox/server.pem
TLSCertificateFile /Users/myuser/Sandbox/server.pem
TLSCertificateKeyFile /Users/myuser/Sandbox/server.pem

TLSVerifyUser never

ldap.conf

BASE dc=mycompany,dc=com
URI  ldaps://localhost/
TLS_REQCERT never

I'm starting slapd with the following command:

sudo /usr/libexec/slapd -f /opt/local/etc/openldap/slapd.conf -d1 -h "ldaps:///"

And testing the connection with the following:

ldapsearch  -H ldaps://localhost -d255

When running ldapsearch, I get the following as output:

ldap_create
ldap_url_parse_ext(ldaps://localhost)
ldap_pvt_sasl_getmech
ldap_search
put_filter: "(objectclass=*)"
put_filter: simple
put_simple_filter: "objectclass=*"
ldap_build_search_req ATTRS:
    supportedSASLMechanisms
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP localhost:636
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying ::1 636
ldap_connect_timeout: fd: 3 tm: -1 async: 0
TLS trace: SSL_connect:before/connect initialization
tls_write: want=124, written=124
  0000:  80 7a 01 03 01 00 51 00  00 00 20 00 00 39 00 00   .z....Q... ..9.. 
  0010:  38 00 00 35 00 00 16 00  00 13 00 00 0a 07 00 c0   8..5............ 
  0020:  00 00 33 00 00 32 00 00  2f 00 00 07 05 00 80 03   ..3..2../....... 
  0030:  00 80 00 00 05 00 00 04  01 00 80 00 00 15 00 00   ................ 
  0040:  12 00 00 09 06 00 40 00  00 14 00 00 11 00 00 08   ...... <at> ......... 
  0050:  00 00 06 04 00 80 00 00  03 02 00 80 0c e4 9d 98   ................ 
  0060:  c1 ad 36 d0 88 fb 6b 92  32 a0 ce 22 63 82 99 3b   ..6...k.2.."c..; 
  0070:  3b 3d 03 03 38 05 d0 a1  30 2d 9f d2               ;=..8...0-..     
TLS trace: SSL_connect:SSLv2/v3 write client hello A
tls_read: want=7, got=0

TLS: can't connect.
ldap_perror
ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)

As you can see, it fails with the "TLS: can't connect" error message. Not that obvious. I then switch to the terminal that has slapd running on the fg, and I see the following:

(snip)
connection_get(13): got connid=0
connection_read(13): checking for input on id=0
connection_read(13): TLS accept failure error=-1 id=0, closing
connection_closing: readying conn=0 sd=13 for close
connection_close: conn=0 sd=13

What I don't understand is why it is failing if I've set both sides to ignore certificates. What am I doing wrong?

Marcelo.


DT Piotr Wadas | 18 May 16:06
Picon

cn=config and DB_CONFIG


Hello,
Is it possible with openldap, any version, to tune DB_CONFIG attributes
for selected context via cn=config ?

Regards,
DT

Liam Gretton | 17 May 17:27
Picon
Picon

Verifying proxy cache operation

Can anyone suggest a means of verifying that my proxy cache (using the 
pcache overlay) is actually returning results from the cache and not the 
backend LDAP server?

I've got reams of debug output from slapd -d -1, but I'm unsure how to 
interpret it. I'm sure there are some magic strings within the output 
that would indicate the cache is being hit.

Any pointers would be appreciated.

The pcache db is bdb.

--

-- 
Liam Gretton                                    liam.gretton <at> le.ac.uk
HPC Architect                                http://www.le.ac.uk/its/
IT Services                                   Tel: +44 (0)116 2522254
University Of Leicester, University Road
Leicestershire LE1 7RH, United Kingdom

Ryan Steele | 16 May 23:51
Favicon

Using back-meta or back-relay plus slapo-rwm as a proxy to a local database

Ok, fair warning - this is a little long-winded, but I'd rather give too much detail than not enough.  Also, all
examples are in slapd.conf format, since there is no documentation for cn=config, and I'm using slapd with
-f and -F to
make the conversion.

Anyways, I'm working on implementing some rewrite rules with slapo-rwm, using back-relay (or possibly
back-meta if that
doesn't work out) as the backend on top of which slapo-rwm will sit, to make available some features that
would be
otherwise not be present with back-ldap, or in the absence of a proxy backend altogether.

In its most basic form, the slapo-rwm overlay can be used without a proxy or relay backend, but the feature
I'm after
appears to require either the slapd-meta backend or the slapd-relay backend.  For now, I've chosen to try with
slapd-relay, as my research has indicated it supports the feature I'm after.  For reference, this feature I
desire is
the 'searchResult' rewriteContext, as I'm interested in rewriting dynamic group membership DN's (i.e.,
the 'member'
attribute, as defined in rfc2307bis) as plain uid's, so clients that only know about rfc2307 (and thus,
look only for
entries of the same format as memberUid and fail to perform any mappings to translate membership DN's to
UID's) can make
use of the dynamic groups I've created in my directory.

Since my slapd-hdb database's rootDSE is dc=example,dc=com, I really couldn't find any way to get around
using a virtual
naming context; creating a back-meta database on the same host with the same suffix as the back-hdb
database seemed
ambiguous at best (in terms of how to ensure that clients would always speak to the back-meta db first), and
using the
suffix "dc=com" seemed inappropriate, as did creating several relay databases, one for each of the
entries below the
slapd-hdb database's rootDSE (e.g., ou=Users,dc=example,dc=com, ou=Groups,dc=example,dc=com,
etc.).  Creating several
relay databases in that fashion presents other problems as well, and wouldn't do me any good for clients
which query for
entries using dc=example,dc=com as their search base.

Given that, and the fact that I'm only looking to remap/rewrite data going to and from a single local
database with a
single naming context, I decided it was a better idea to create a single back-relay database with a bogus
"proxy" naming
context and use a suffixmassage to rewrite it, e.g.:

database           relay
suffix             "dc=example-proxy,dc=com"
relay              "dc=example,dc=com"

overlay            rwm
rwm-rewriteEngine  on
rwm-suffixmassage  "dc=example-proxy,dc=com" "dc=example,dc=com"
rwm-rewriteContext searchResult
rwm-rewriteRule    "^uid=([^,]+?),ou=Users,dc=example,dc=com$" "$1"

For reference, here is the back-meta database configuration I was going to use before I discovered that back-relay
supported the searchResult rewriteContext:

database           meta
suffix             "dc=example-proxy,dc=com"

overlay            rwm
rwm-rewriteEngine  on
uri                "ldap://localhost/dc=example-proxy,dc=com"
rwm-suffixmassage  "dc=example-proxy,dc=com" "dc=example,dc=com"
rwm-rewriteContext searchResult
rwm-rewriteRule    "^uid=([^,]+?),ou=Users,dc=example,dc=com$" "$1"

In either case, I have a few questions going forward from this point:

1. Is it legal to rewrite the search result DN's as described in the example above?  I'm hoping that since the data
being manipulated is going from server -> client and is not being stored in the directory, the attributes
I'm rewriting
would not be subjected to the syntax requirements of the entry that holds them.

2. Are there any benefits or drawbacks to using a rewriteMap to accomplish this task?  In my mind, it just
seems like
another means to the same end, at least based on the following configuration I came up with:

rwm-rewriteMap     ldap dn2uid "ldap://localhost/ou=Users,dc=example,dc=com?uid?sub"
rwm-rewriteContext searchResult
rwm-rewriteRule    "^uid=([^,]+?),ou=Users,dc=example,dc=com$" "${dn2uid($1)}"

3. Is there a better way to go about doing this that I've failed to see or consider?

4. Considering the slapd-meta man page, which mentions that some of its features could potentially result
in excessive
overhead for some installations, are the features used in the aforementioned configuration(s)
efficient enough to scale
well in a very busy environment?  I'm aware that's a pretty vague and loaded question with lots of variables,
so I'm
just looking for an educated opinion from a 10,000 foot view, assuming excellent hardware, high network
capacity, and
heavy - say, 5k, 10k, 15k queries per second - traffic.  Performance will obviously be tested before
implementing this,
but it'd still be nice to have a rough idea of what to expect going in.

Lastly, on a somewhat tangential note, given that there's no documentation with respect to cn=config for
setting up
slapo-rwm (or doing it in conjunction with a proxy backend), is there any way to discover the cn=config
attributes and
objectclasses for those backend and overlays that's better or more efficient than creating a standard slapd.conf
configuration and converting it with slapd using -f and -F?  Perhaps an official or unofficial bit of documentation
floating around out there other than a few miscellaneous postings on the mailing lists and some ITS
contents?  On a
similar note in the same vein, as far as I can tell, none of the man pages, admin guide sections, or
FAQ-O-Matic entries
on slapd-relay mention which rewrite contexts are available with it, and I didn't realize that
slapd-relay accepted the
searchResult rewrite context until I read the servers/slapd/back-relay/README file (while searching
for code that might
reveal slapo-rwm's cn=config attribute equivalents).  Would it be objectionable to update these
reference points with
said information?  I'd be happy to file an ITS and submit patches and/or content for updating the
documentation, if
Gavin is too busy, unavailable, or would like some help.

Thanks for any and all advice, musings, criticisms, and opinions!

-Ryan

--

-- 
Ryan Steele
Systems Administrator
AWeber Communications

Picon

Extra character when using search filter but won't appear in the search result

Hi all,

We have a little bit of a problem here. When we tried to search in openldap with the following filter:-

(&(uid=user1)(customAttribute=somevalue))

... it returned no results. But when we use a similar filter, with an asterisk (*) appended for the 2nd attribute:-

(&(uid=user1)(customAttribute=somevalue*))

We got the result just fine. The funny thing is, the result listed customAttribute value as just 'somevalue'. We were wondering what's the extra character that's preventing us from getting the result when using the filter without the asterisk.

Have anyone encountered similar problem before?

Thanks.

Regards,
Wan Mohd Khairi Wan Mohamed
wankhairi [at] nervesis [dot] com [dot] my
http://www.nervesis.com.my

Dan Burkland | 14 May 19:43
Favicon

OpenLDAP 2.3 Access Lists

Hello all,

I have been trying as of late to secure my OpenLDAP directory and I have seem to run into a wall. I am trying to
restrict access to certain attributes for my user entries located in ou=people,dc=example,dc=com so
that only my binddn can access them. Here is a list of my current ACLs:

access to dn="cn=binddn,ou=system,ou=services,dc=example,dc=com
	attrs=userPassword
	by * auth

access to dn.regex="uid=.*,ou=people,dc=example,dc=com" attrs=uid,uidNumber,loginShell
	by dn="cn=binddn,ou=system,ou=services,dc=example,dc=com" read
	by * none

It seems I can get the rule to match without the "attrs" argument however as soon as I add that to the ACL entry I
get denied access to the previously listed attributes for users in ou=people. If it helps any I am using the
OpenLDAP-servers 2.3.43 CentOS RPM. 

Thanks again,

Dan


Gmane