Replication with SSLCLIENTAUTH: server sent no certificate
by Eugen Lamers
I'm trying to setup a replication with a certificate based authentication between supplier and consumer. The certificates in the certdb at /etc/dirsrv/slapd-XXX contain the very same CA with which the respective server certificates in the certdbs have been signed. The certificates all have the 'u' flag, and the CA has the C and T flag.
The replication (on the supplier) has been setup such that TLS and certificate based authentication is used, see extract from the replication agreement object:
objectclass: nsds5ReplicationAgreement
nsds5replicahost: <consumer-hostname>
nsds5replicaport: 389
nsds5replicatransportinfo: TLS
nsds5replicabindmethod: SSLCLIENTAUTH
Trying to initialize the consumer raises this error in the error-log of the supplier (the host sending the starttls connection request):
Replication bind with EXTERNAL auth failed: LDAP error 48 (Inappropriate authentication) (missing client certificate)
The certificate that the server should have sent can, however, be used with the ldap commandline tools as ldapsearch. In this case a wireshark trace clearly shows that the client sends the certificate during the TLS handshake, while in the above case it doesn't.
The TLS handshake defines that the client has to send an "empty certificate" if it does not have a certificate that has been issued by a CA offered by the server during the handshake. I can't see a reason for the client to think the condition isn't met. The certificate with which the server (supplier) is setup is the only one available.
Is it possible that the server does not know which certificate it has to use for authentication with the consumer server? And if so, how do I make the server know?
The 389-ds in use is the version 1.4.1.6~git0.5ac5a8aad. The problem was the same with 1.4.0.3.
Thanks,
Eugen
2 years, 10 months
ERR - slapi_ldap_bind - Could not send bind request for id [(anon)] authentication mechanism [EXTERNAL]: error -1 (Can't contact LDAP server), system error 0 (no error), network error 0
by Graham Leggett
Hi all,
We have a long standing 389ds master LDAP server that was found to be unable to contact it’s slaves. Most specifically, the slaves show nothing in their logs about any kind of connection, while the master is logging this:
[12/Nov/2019:21:39:47.212715697 +0000] - ERR - slapi_ldap_bind - Could not send bind request for id [(anon)] authentication mechanism [EXTERNAL]: error -1 (Can't contact LDAP server), system error 0 (no error), network error 0 (Unknown error, host “ldap01:636”)
Key is "system error 0 (no error)”, which leaves us stumped. The error is obviously “success”.
Has anyone seen this kind of thing before?
This is 389ds running on CentOS7 as follows:
389-ds-base-1.3.9.1-10.el7.x86_64
Regards,
Graham
—
3 years
Problem browsing LDAP with Outlook
by Chris Bryant
When configuring Microsoft Outlook (not Outlook Express) to access an LDAP directory, there is an option to 'Enable Browsing (requires server support)'. If this option is chosen and the directory server supports it, then you should be able to open the LDAP address book and page up and down through the results. I have been unable to get this working properly with 389 DS.
When I try to browse from Outlook against the 389 DS directory, I am able to see the first page of results perfectly. However, if I move to the next page, only the first object returned will have any attributes included, and all of the rest of the objects in the page will have no attributes. I have a test perl script that duplicates this functionality as well.
I can get this to work properly with an older version of Netscape Directory Server, and I can get it working with OpenDS. Since 389 DS advertises support for the controls that are required for this to work, just like the other two servers, then I would expect it to work there also.
Has anyone out there gotten this to work with 389 DS? If so, can you share if there was anything special that you needed to do to get this to work? I'm trying to determine if this is a bug in the server, or if I'm just missing something in the configuration.
Thanks,
Chris
USA.NET
You Run Your Business. We'll Run Your Email.
This message is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information of USA.NET, Inc. Any unauthorized review, use, copying, disclosure, or distribution is prohibited. If you are not the intended recipient, please immediately contact the sender by reply email and delete all copies of the original message.
3 years, 3 months
MemberOf group restrictions to a client system (server and client running CentOS 7)
by Janet Houser
Hi,
I'm new to 389-ds and last week downloaded and installed the software.
I have a running instance of the server, and I've added TLS/SSL. I've configured a CentOS 7 client to be able to query
the server using TLS/SSL, and all appears working.
I've created users and groups on the 389-ds server successfully. For each user and group, I've enabled posix attributes and my client
can see the unix users and groups using the "getent password" or "getent group" commands.
Now, here's where I'm getting tripped up..........
I need to limit which users have access to which systems. I've been trying to do this via memberOf group limitations.
I found the following online resource (https://thornelabs.net/2013/01/28/aix-restrict-server-login-via-ldap-grou...)
which is close enough to CentOS that the initial commands worked.
I enabled the MemberOf plugin and changed the attributes per the link, and restarted the system.
I created a test group (that I didn't enable a posix GID) and tried to add a single user via:
Right click on group -- > click Properties --> then Members --> click Add --> Search for user --> click Add.
When I try to go this route (which worked before enabling the memberOf plugin) it worked. Now it seems I get the error:
"Cannot save to directory server.
netscape.ldap.LDAPException: error resiult(65): Object class violation"
And the messages file throws the error (/var/log/dirsrv/slapd-<instancename>/errors:
"Entry "uid=test,ou=People,dc=int,dc=com" -- attribute "memberOf" not allowed
[17/Feb/2016:11:22:58 -0700] memberof-plugin - memberof_postop_modify: failed to add dn (cn=testgroup,ou=Groups,dc=int,dc=com) to target. Error (65)"
So it seems my server isn't quite using the memberOf plugin properly, but I'm not sure what else to enable. I'll have to solve this issue before
I even try to filter login access via groups on my client system.
I should mention that if I go under the advanced tab for one of the groups I created, I can add the the attribute "uniquemember", but I'm not sure what I
should set the "value" to be.
I've tried creating new users to see if I could set their "uniquemember" attributes, but no luck. It seems that I don't have the ability to set this attribute
on individual users, only groups.
This might not be the right road to head down when trying to restrict access to servers via groups, so I'm open to any suggestions.
Any suggestions would be appreciated.
3 years, 4 months
userPassword changed to PBKDF2_SHA256 after bind
by Francesc Guasch
Hello.
After upgrade to 389 release 1.4 I experienced an odd behaviour.
If I add a new user, then I bind with that user. The userPassword
attribute gets changed to {PBKDF2_SHA256}.
These are the steps I follow to reproduce it:
1- add a new entry with MD5 password, it is like this: {MD5}N7...
2- connect to LDAP and bind with the user just created
3- connect with admin and retrieve the password, it is {PBKDF2_SHA256}
I may have been doing something wrong but my code worked on previous
releases of 389-ds.
I extracted code from my project to build a full test on it. I uploaded
it to gist:
https://gist.github.com/frankiejol/9e099ba828c8cbdff361783c177643da
This is 1.4.1.6-4. So I have seen there is 1.4.2 release but
I haven't been able to build it. It gets stuck on make lib389
ModuleNotFoundError: No module named 'packaging'
make: *** [Makefile:14474: lib389] Error 1
Anyway, it looks like a bug or maybe a configuration issue ?
thank you for your time
3 years, 12 months
Converting OpenLdap ACL policies to 389-ds aci policies.
by Dharmalingam S
Hi,
Thanks for quick response in both IRC and forums.
Please find the following test ACL policies which am trying to convert.
olcAccess: to dn.subtree="dc=test,dc=com" attrs=userPassword
by dn.exact="cn=repl,dc=test,dc=com" write
by group.exact="cn=DirectoryAdmins,ou=Groups,dc=test,dc=com" write
by dn.children="ou=DirectoryAdmins,dc=test,dc=com" write
by self write
by anonymous auth (( need to find))
by * none
I.
aci: (target = "ldap:///dc=test,dc=com")(targetattr = "userPassword")(version 3.0; acl "ACI for userPassword attribute";
allow(write) (userdn = "ldap:///cn=repl,dc=test,dc=com") OR
(groupdn = "ldap:///cn=DirectoryAdmins,ou=Groups,dc=test,dc=com") OR
(groupdn = "ldap:///ou=DirectoryAdmins,dc=test,dc=com") OR
(userdn = "ldap:///self");)
## TODO:
## read and search opeartions are there need to verify with auth
# aci: (targetattr = "userPassword")(version 3.0; acl "Enable only auth for anonymous";
# allow(read, search) userdn= "ldap://anyone")
aci: (targetattr = "userPassword")(version 3.0; acl "Disable for all other users";
deny(all) (userdn= "ldap:///all");)
II. With multiple allow in one rule:
aci: (target = "ldap:///dc=test,dc=com")(targetattr = "userPassword")(version 3.0; acl "ACI for userPassword attribute";
allow(write) (userdn = "ldap:///cn=repl,dc=test,dc=com"); allow(write)(groupdn = "ldap:///cn=DirectoryAdmins,ou=Groups,dc=test,dc=com"); allow(write)(groupdn = "ldap:///ou=DirectoryAdmins,dc=test,dc=com"); allow(write)(userdn = "ldap:///self");)
Kindly can you review and let me know if i am wrong.
Thanks & Regards
Cooldharma06
4 years
Query about entryCSN and nsUniqueID in place of entryUUID
by cool dharma06
Hi all,
i have OpenLDAP in my environment. And i am experimenting 389-ds and their
functionalities. In my OpenLDAP, i have entries with following attributes:
entryCSN, contextCSN, entryUUID.
1. For entryCSN and contextCSN - any equivalent attribute available in
389-ds
2. When i check for the above attributes in 389-ds, i am unable to find
those attributes. From the post link, its mentioned like we can use
nsUniqueID in place of entryUUID. but we might face issue during Sync/repl.
Is this issue got fixed.
https://pagure.io/389-ds-base/issue/137
Any suggestions for the above queries.
Thanks & Regards
cooldharma06
4 years
389ds and Get Effective Rights control: neither entryLevelRights nor attributeLevelRights returned
by Graham Leggett
Hi all,
After adding the Get Effective Rights control to some java code as follows, everything is worked as before, except neither the entryLevelRights nor the attributeLevelRights attributes are returned to me.
389-ds-base-1.2.11.15-97.el6_10.x86_64 is logging the following, which looks hopeful:
[18/Nov/2019:00:41:16 +0200] conn=1567060 op=5 SRCH base="dc=x,dc=x,dc=x" scope=2 filter="(&(objectClass=mailRec
ipient)(mail=mail(a)example.com))" attrs="* entrylevelrights attributelevelrights aci" authzid="mail=minfrin(a)example.com,ou=
external,dc=x,dc=x,dc=x"
[18/Nov/2019:00:41:16 +0200] conn=1567060 op=5 RESULT err=0 tag=101 nentries=1 etime=0 - entryLevelRights: vadn
However neither the entrylevelrights nor the attributelevelrights attributes are being returned in the response, and I have run out of ideas - what am I missing?
The java code to add the control is as follows:
BerByteArrayOutputStream berStream = new BerByteArrayOutputStream(
dn.length() + 50, true);
BerOctetString berString = new BerOctetString(
("dn:" + dn).getBytes());
berString.encode(berStream, true);
berStream.close();
List<Control> controls = new ArrayList<Control>(Arrays.asList(ctx
.getRequestControls()));
controls.add(new BasicControl("1.3.6.1.4.1.42.2.27.9.5.2", true,
berStream.getArray()));
ctx.setRequestControls(controls.toArray(new Control[controls.size()]));
Regards,
Graham
—
4 years