LDAP does not support StartTLS

Bug #751832 reported by Everett Toews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Wishlist
Unassigned

Bug Description

I'm trying to use a single LDAP server for two regions with all of the LDAP traffic between the regions encrypted.

I've setup LDAP with TLS/SSL on ServerA. I've added all of the necessary Users/Groups/System stuff for nova. I know it's working because I have an LDAP client that I connect to ServerA with the parameters:

Hostname: ServerA
Port: 389
Encryption method: Use StartTLS Extension

When I login everything works fine.

However, when I change my nova.conf flags like the following:

--auth_driver=nova.auth.ldapdriver.LdapDriver
--ldap_url=ldaps://ServerA:389
--ldap_user_dn=cn=admin,dc=example,dc=com
--ldap_password=secret

and try to run "nova-manage user admin admin-user" I get the error,

SERVER_DOWN: {'info': 'A TLS packet with unexpected length was received.', 'desc': "Can't contact LDAP server"}

I know that ldaps does *not* work with TLS/SSL but it's the closest I could get to making nova use the StartTLS Extension. I looked through the flags in ldapdriver.py and didn't see anything for it or any reference to TLS or SSL. I do see that ldapobject.py in python-ldap does support it.

I've attached a script to show how it works in python-ldap.

Revision history for this message
Everett Toews (everett-toews) wrote :
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Everett Toews (everett-toews) wrote :

Removed line setting OPT_X_TLS_CACERTFILE from script. It's unnecessary.

Revision history for this message
bastichelaar (bas-t) wrote :

A small patch is attached to allow LDAPS connections.

Revision history for this message
Everett Toews (everett-toews) wrote :

It would appear that this patch makes TLS a requirement when using LDAP. It should really be optional for backwards compatibility.

Perhaps another flag like ldap_tls (defaults to false) is necessary.

Revision history for this message
Thierry Carrez (ttx) wrote :

Old auth is being deprecated in Essex, switching to Keystone. If Keystone doesn't support LDAPS either, sounds like you should push support for it there.

Changed in nova:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.