Skip to content
Snippets Groups Projects
Commit 84f44b1b authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

More SASL updates. Not yet fully consistent with HEAD.

parent fd228e0d
No related branches found
No related tags found
No related merge requests found
...@@ -189,7 +189,7 @@ the KERBEROS_IV mechanism, it will request a session key for that ...@@ -189,7 +189,7 @@ the KERBEROS_IV mechanism, it will request a session key for that
same principal, either from the ticket cache or by obtaining a new same principal, either from the ticket cache or by obtaining a new
one from the Kerberos server. This will require the TGT to be one from the Kerberos server. This will require the TGT to be
available and valid in the cache as well. If it is not present or available and valid in the cache as well. If it is not present or
has expired, SASL will print out the message has expired, the client may print out the message:
> ldap_sasl_interactive_bind_s: Local error > ldap_sasl_interactive_bind_s: Local error
...@@ -226,18 +226,12 @@ it needs access to the plaintext password (unlike mechanisms which ...@@ -226,18 +226,12 @@ it needs access to the plaintext password (unlike mechanisms which
pass plaintext passwords over the wire, where the server can store pass plaintext passwords over the wire, where the server can store
a hashed version of the password). a hashed version of the password).
Secret passwords are normally stored in Cyrus SASL's own {{sasldb}} The server's copy of the shared-secret may be stored in Cyrus SASL's
database, but if OpenLDAP Software has been compiled with Cyrus own {{sasldb}} database, in an external system accessed via
SASL 2.1 it is possible to store the secrets in the LDAP database {{saslauthd}}, or in LDAP database itself. In either case it is
itself. With Cyrus SASL 1.5, secrets may only be stored in the very important to apply file access controls and LDAP access controls
{{sasldb}}. In either case it is very important to apply file to prevent exposure of the passwords. The configuration and commands
access controls and LDAP access controls to prevent exposure of the discussed in this section assume the use of Cyrus SASL 2.1.
passwords.
The configuration and commands discussed in this section assume the
use of Cyrus SASL 2.1. If you are using version 1.5 then certain
features will not be available, and the command names will not have
the trailing digit "2".
To use secrets stored in {{sasldb}}, simply add users with the To use secrets stored in {{sasldb}}, simply add users with the
{{saslpasswd2}} command: {{saslpasswd2}} command:
...@@ -248,23 +242,23 @@ The passwords for such users must be managed with the {{saslpasswd2}} ...@@ -248,23 +242,23 @@ The passwords for such users must be managed with the {{saslpasswd2}}
command. command.
To use secrets stored in the LDAP directory, place plaintext passwords To use secrets stored in the LDAP directory, place plaintext passwords
in the {{EX:userPassword}} attribute. It will be necessary to add in the {{EX:userPassword}} attribute. It will be necessary to add
an option to {{EX:slapd.conf}} to make sure that passwords changed an option to {{EX:slapd.conf}} to make sure that passwords set using
through LDAP are stored in plaintext: the LDAP Password Modify Operation are stored in plaintext:
> password-hash {CLEARTEXT} > password-hash {CLEARTEXT}
Passwords stored in this way can be managed either with {{EX:ldappasswd}} Passwords stored in this way can be managed either with {{ldappasswd}}(1)
or by simply modifying the {{EX:userPassword}} attribute. or by simply modifying the {{EX:userPassword}} attribute. Regardless of
where the passwords are stored, a mapping will be needed from
authentication request DN to user's DN.
Wherever the passwords are stored, a mapping will be needed from SASL The DIGEST-MD5 mechanism produces authentication IDs of the form:
authentication IDs to regular DNs. The DIGEST-MD5 mechanism produces
authentication IDs of the form:
> uid=<username>,cn=<realm>,cn=digest-md5,cn=auth > uid=<username>,cn=<realm>,cn=digest-md5,cn=auth
NOTE that if the default realm is used, the realm name is omitted from If the default realm is used, the realm name is omitted from the ID,
the ID, giving: giving:
> uid=<username>,cn=digest-md5,cn=auth > uid=<username>,cn=digest-md5,cn=auth
...@@ -272,9 +266,9 @@ See {{SECT: Mapping Authentication Identities}} below for information ...@@ -272,9 +266,9 @@ See {{SECT: Mapping Authentication Identities}} below for information
on optional mapping of identities. on optional mapping of identities.
With suitable mappings in place, users can specify SASL IDs when With suitable mappings in place, users can specify SASL IDs when
performing LDAP operations, and the password stored in {{sasldb}} or in performing LDAP operations and sldb}} and the directory itself will
the directory itself will be used to verify the authentication. be used to verify the authentication. For example, the user
For example, the user identified by the directory entry: identified by the directory entry:
> dn: cn=Andrew Findlay+uid=u000997,dc=example,dc=com > dn: cn=Andrew Findlay+uid=u000997,dc=example,dc=com
> objectclass: inetOrgPerson > objectclass: inetOrgPerson
...@@ -285,23 +279,13 @@ For example, the user identified by the directory entry: ...@@ -285,23 +279,13 @@ For example, the user identified by the directory entry:
can issue commands of the form: can issue commands of the form:
> ldapsearch -U u000997 -b dc=example,dc=com 'cn=andrew*' > ldapsearch -Y DIGEST-MD5 -U u000997 ...
or can specify the realm explicitly:
> ldapsearch -U u000997@myrealm -b dc=example,dc=com 'cn=andrew*'
If several SASL mechanisms are supported at your site, it may be
necessary to specify which one to use, e.g.:
> ldapsearch -Y DIGEST-MD5 -U u000997 -b dc=example,dc=com 'cn=andrew*'
Note: in each of the above cases, no authorization identity (e.g. Note: in each of the above cases, no authorization identity (e.g.
{{EX:-X}}) was provided. Unless you are attempting {{EX:-X}}) was provided. Unless you are attempting {{SECT:SASL
{{SECT:SASL Proxy Authorization}}, no authorization identity should Proxy Authorization}}, no authorization identity should be specified.
be specified. The server will infer an authorization identity from The server will infer an authorization identity from authentication
authentication identity (as described below). identity (as described below).
H3: Mapping Authentication Identities H3: Mapping Authentication Identities
...@@ -321,8 +305,12 @@ or ...@@ -321,8 +305,12 @@ or
> uid=<username>,cn=<mechanism>,cn=auth > uid=<username>,cn=<mechanism>,cn=auth
depending on whether or not <mechanism> employs the concept of depending on whether or not <mechanism> employs the concept of
"realms". Note also that the realm part will be omitted if the default "realms". Note also that the realm part will be omitted if the
realm was used in the authentication. default realm was used in the authentication.
The {{ldapwhoami}}(1) command may be used to determine the identity
associated with the user. It is very useful for determining proper
function of mappings.
It is not intended that you should add LDAP entries of the above It is not intended that you should add LDAP entries of the above
form to your LDAP database. Chances are you have an LDAP entry for form to your LDAP database. Chances are you have an LDAP entry for
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment