Bug 695141 - autofs & LDAP, client certificates do not work
Summary: autofs & LDAP, client certificates do not work
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: autofs
Version: 6.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: yanfu,wang
URL:
Whiteboard:
Depends On:
Blocks: 695142
TreeView+ depends on / blocked
 
Reported: 2011-04-10 21:28 UTC by Ondrej Moriš
Modified: 2012-06-25 01:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 695142 (view as bug list)
Environment:
Last Closed: 2012-06-25 01:52:21 UTC
Target Upstream Version:


Attachments (Terms of Use)
Test (6.51 KB, application/x-bzip2)
2011-04-10 21:28 UTC, Ondrej Moriš
no flags Details

Description Ondrej Moriš 2011-04-10 21:28:19 UTC
Created attachment 491111 [details]
Test

Description of problem:

When configuring autofs through ldap such that server requires client certificates, connection does not work, i.e. mountpoint cannot be accessed. When client verification is dropped (but SSL/TLS and server verification is still enabled), everything works fine. According to man page of auto.master, automounter should be able to read openldap clients configuration (/etc/openldap/ldap.conf and ldaprc) and it is (server verification works fine), but it seems that client certificates are omitted.

Version-Release number of selected component (if applicable):

autofs-5.0.5-30.el6

How reproducible:

Always

Steps to Reproduce:

1. Configure autofs to works with openldap over SSL/TLS with both server and client certificates, create mountpoint setup on ldap server, try to access it.
  
Additional info:

For a detailed reproducer including all necessary configuration, see attached test, it is written using beakerlib (install beakerlib package). Run it as root from the test directory by 'bash runtesh.sh'.

Comment 1 Ian Kent 2011-04-11 09:14:34 UTC
There are some problems with the test although after all the
playing around I'm not sure I remember all the things I did.
In any case the test won't be used as it is within the autofs
regression test suite. I would need to re-write it in the same
way as all the other existing tests.

I think that the certificates don't work but I can't be sure about
that. After trying to manually configure ldap to use them I failed
to get ldapsearch to work so I created my own.

The test will add multiple lines to rsyslog.conf upon re-running
the test causing syslog to log messages multiple times witch makes
the log hard to follow (and it will add multiple entries to the
hosts file as well).

The ldap configuration set in /etc/sysconfig/autofs used doesn't
match the ldif data loaded into the LDAP database. The ldif data
uses attributes of ou for the map and cn for the key but the
configuration didn't specify the ou attribute for the map, IIRC.
In any case it's a matter of setting them consistently or not
setting the entries in the configuration and letting autofs work
it out (which also requires the ldif entries to use a consistent
set of attributes).

There is a small syntax error in the map entry for the indirect
mount key loop. In the map entry the location was given as
ldap://my-domain.com/ou=auto.misc,dc=my-domain,dc=com which is
mixed old and new syntax and caused some confusion for autofs.
There is probably a bug in there somewhere but I'm inclined to
say using mixed old and new syntax isn't supported. The old syntax
is <prot>:<server name>:<dn> and the newer syntax is
<proto>://<server name>/<dn>. I think including the "//" in what
probably looks like the old syntax to autofs caused the confusion.
Replacing the ":" before the dn with a "/" fixes this problem.

After all this I found that the test still wouldn't work but
setting up autofs manually using each of the test configurations
worked fine for TLS and SSL. I really have no idea why.

Ian

Comment 2 Ondrej Moriš 2011-04-11 09:48:29 UTC
Ian, I am sorry that the reproducing test is in such a bad condition, I was preparing it in such a hurry. I will correct it (hopefully today or tomorrow) according to your hints and write here a more detailed description of the problem. The test now does a slightly more stuff which may obfuscate the problem with client certificates. Anyway, I am pretty sure that client certificates do not work right now.

Comment 3 Ian Kent 2011-04-11 11:07:41 UTC
(In reply to comment #2)
> Ian, I am sorry that the reproducing test is in such a bad condition, I was
> preparing it in such a hurry. I will correct it (hopefully today or tomorrow)
> according to your hints and write here a more detailed description of the
> problem. The test now does a slightly more stuff which may obfuscate the
> problem with client certificates. Anyway, I am pretty sure that client
> certificates do not work right now.

OK, that would be useful for when I convert it to run under the
autofs workflow tests, assuming we can identify a problem.

I know you believe that the certification doesn't work but the
procedure you used (the way I originally expected people to use
client certificates) did work for me. We also have the ability
to use the SASL EXTERNAL mechanism now that allows the mapping
of a user so that LDAP server ACLs can be used.

Ian

Comment 5 Ian Kent 2011-06-10 02:01:10 UTC
At this stage I wasn't able to reproduce this problem and since
we have several regression tests using certificate authentication
I need to wait until I get enough to duplicate the problem.

Ondrej, if you have anything more on this please post it. If there
is no further information yet I'll need to defer this until 6.3.

Comment 7 Ondrej Moriš 2011-06-30 11:55:05 UTC
I cannot reproduce it as well right now. There seems to be a serious flaw in the test, since my configuration does not work at all (even without SSL/TLS). Let met try it once more during this weekend. However, I am pretty sure that ldap client certificates support does not work in autofs. Thus I am proposing this bug for the next release and diving into details to correct current confusing reproducer.

Comment 8 Ian Kent 2011-06-30 14:16:29 UTC
(In reply to comment #7)
> I cannot reproduce it as well right now. There seems to be a serious flaw in
> the test, since my configuration does not work at all (even without SSL/TLS).
> Let met try it once more during this weekend. However, I am pretty sure that
> ldap client certificates support does not work in autofs. Thus I am proposing
> this bug for the next release and diving into details to correct current
> confusing reproducer.

Please, since your sure it doesn't work, look at test
autofs-tests/bugzillas/bz607785 within an autofs checkout
and see if you can pick the flaw in the test and verify
correcting it makes the test fail, and we can discus that.

Comment 10 Ian Kent 2012-03-06 03:30:56 UTC
Since we don't have feedback according to the comments above I'm
going to defer this.

If we don't get feedback during the next update cycle I'll need
to close this.

Comment 12 Ian Kent 2012-06-25 01:52:21 UTC
As per comment #10 I'm going to close this bug.
If this is still a problem and you can provide the needed feedback
plaes re-open the bug.


Note You need to log in before you can comment on or make changes to this bug.