Re: LDAP Authentication for Single Sign On
- From: Michael Ströder <michael@xxxxxxxxxxxx>
- Date: Tue, 20 Mar 2007 20:32:49 +0100
Joe Kaplan wrote:
However, some applications and services that do programmatic authentication
against LDAP directories do more than a bind operation as part of the
authentication. Some will also perform LDAP searches to do things like
verifying that the user exists or reading some attributes on the user. I
was trying to suggest that this is not really necessary and isn't really
part of the authentication itself, as the bind operation is the actual
authentication.
Mainly LDAP-enabled applications will search for a unique user ID (like
'uid', 'mail' or for AD 'samAccountName') to find the accompanying bind
DN needed for the simple bind request. Yes, Joe is partially correct: AD
directly accepts the UPN in simple bind operation. But that's not LDAPv3
compliant.
Relevant excerpts from RFC 4511 (LDAPv3), continue yourself
with RFC 4514:
------------------------------- snip -------------------------------
[..]
An LDAPDN is defined to be the representation of a Distinguished Name
(DN) after encoding according to the specification in [RFC4514].
LDAPDN ::= LDAPString
-- Constrained to <distinguishedName> [RFC4514]
[..]
BindRequest ::= [APPLICATION 0] SEQUENCE {
version INTEGER (1 .. 127),
name LDAPDN,
authentication AuthenticationChoice }
AuthenticationChoice ::= CHOICE {
simple [0] OCTET STRING,
-- 1 and 2 reserved
sasl [3] SaslCredentials,
... }
[..]
------------------------------- snip -------------------------------
So if the 3rd-party ISV wants his application to accept a user ID from
the user and send a LDAPv3 compliant bind request he SHOULD implement a
search for mapping the user ID entered to a bind DN. For all LDAP
directories which disallow anonymous searches (e.g. AD) he has to use a
service account for that search.
Doing SASL binds (e.g. with DIGEST-MD5) is a completely different story.
I support Joe's statement about security: You have to fully trust the
applications not to compromise the password and not do any harm on
behalf of the user (on the LDAP connection he was impersonated).
BTW: In one project I suggested to use this user impersonation as a
privacy feature to read a certain private attribute of the user which
was only readable by 'self' (ACL was set but this was not AD).
BTW: For achieving good performance especially when deploying SSL I'd
keep two persistent LDAP connections (with automatic reconnecting):
1. for doing the searches (after having bound as service account once!),
2. for sending the bind requests for validating the end user's passwords.
Ciao, Michael.
.
- Follow-Ups:
- Re: LDAP Authentication for Single Sign On
- From: Joe Kaplan
- Re: LDAP Authentication for Single Sign On
- References:
- Re: LDAP Authentication for Single Sign On
- From: Joe Kaplan
- Re: LDAP Authentication for Single Sign On
- From: Jeremy Revitch
- Re: LDAP Authentication for Single Sign On
- From: Joe Kaplan
- Re: LDAP Authentication for Single Sign On
- Prev by Date: Re: well known problem, slow XP logon on Win2003 AD
- Next by Date: Re: 2000/2003 trust
- Previous by thread: Re: LDAP Authentication for Single Sign On
- Next by thread: Re: LDAP Authentication for Single Sign On
- Index(es):
Relevant Pages
|