Este contenido no está disponible en el idioma seleccionado.
9.10. Setting up SASL Identity Mapping
9.10.1. About SASL Identity Mapping Copiar enlaceEnlace copiado en el portapapeles!
scarter@EXAMPLE.COM. This ID must be converted into the DN of the user's Directory Server entry, such as uid=scarter,ou=people,dc=example,dc=com.
dn: cn=sasl,cn=config objectClass: top objectClass: nsContainer cn: sasl
dn: cn=sasl,cn=config
objectClass: top
objectClass: nsContainer
cn: sasl
dn: cn=mapping,cn=sasl,cn=config objectClass: top objectClass: nsContainer cn: mapping
dn: cn=mapping,cn=sasl,cn=config
objectClass: top
objectClass: nsContainer
cn: mapping
nsSaslMapRegexString: The regular expression which is used to map the elements of the suppliedauthid.nsSaslMapFilterTemplate: A template which applies the elements of thensSaslMapRegexStringto create the DN.nsSaslMapBaseDNTemplate: Provides the search base or a specific entry DN to match against the constructed DN.- Optional:
nsSaslMapPriority: Sets the priority of this SASL mapping. The priority value is used, ifnsslapd-sasl-mapping-fallbackis enabled incn=config. For details, see Section 9.10.4.1, “Setting SASL Mapping Priorities”.
nsSaslMapRegexString attribute sets variables of the form \1, \2, \3 for bind IDs which are filled into the template attributes during a search. This example sets up a SASL identity mapping for any user in the ou=People,dc=example,dc=com subtree who belongs to the inetOrgPerson object class.
mconnors@EXAMPLE.COM as the user ID (authid), the regular expression fills in the base DN template with uid=mconnors,ou=people,dc=EXAMPLE,dc=COM as the user ID, and authentication proceeds from there.
Note
dc values are not case sensitive, so dc=EXAMPLE and dc=example are equivalent.
ou=People,dc=example,dc=com subtree which meets the filter cn=userId.
nsSaslMapRegexString attribute. For example:
US.EXAMPLE.COM realm. (Realms are described in Section 9.11.2.1, “About Principals and Realms”.)
ldap1.example.com server to the cn=replication manager,cn=config entry. The mapping entry itself is created on the second server, such as ldap2.example.com.
nsSaslMapPriority parameter, there is no way to specify the order that mappings are processed. However, there is a way to control how SASL mappings are processed: the name. The Directory Server processes SASL mappings in reverse ASCII order. In the past two example, then the cn=z mapping (the first example) is processed first. If there is no match, the server processes the cn=y mapping (the second example).
Note
ConfigFile directive. Using silent installation is described in the Installation Guide.
9.10.2. Default SASL Mappings for Directory Server Copiar enlaceEnlace copiado en el portapapeles!
This matches a Kerberos principal using a two part realm, such as user@example.com. The realm is then used to define the search base, and the user ID (authid) defines the filter. The search base is dc=example,dc=com and the filter of (uid=user).
This mapping matches an authid that is a valid DN (defined in RFC 2829) prefixed by dn:. The authid maps directly to the specified DN.
This mapping matches an authid that is a UID prefixed by u:. The value specified after the prefix defines a filter of (uid=value). The search base is hard-coded to be the suffix of the default userRoot database.
This mapping matches an authid that is any plain string that does not match the other default mapping rules. It use this value to define a filter of (uid=value). The search base is hard-coded to be the suffix of the default userRoot database.
9.10.3. Configuring SASL Identity Mapping Copiar enlaceEnlace copiado en el portapapeles!
9.10.3.1. Configuring SASL Identity Mapping Using the Command Line Copiar enlaceEnlace copiado en el portapapeles!
dsconf utility to add the identity mapping scheme.
- Add the identity mapping scheme. For example:
dsconf -D "cn=Directory Manager" ldap://server.example.com sasl create --cn "example_map" --nsSaslMapRegexString "\(.*\)" --nsSaslMapBaseDNTemplate "ou=People,dc=example,dc=com" --nsSaslMapFilterTemplate "(cn=\1)" --nsSaslMapPriority 50
# dsconf -D "cn=Directory Manager" ldap://server.example.com sasl create --cn "example_map" --nsSaslMapRegexString "\(.*\)" --nsSaslMapBaseDNTemplate "ou=People,dc=example,dc=com" --nsSaslMapFilterTemplate "(cn=\1)" --nsSaslMapPriority 50 Successfully created example_mapCopy to Clipboard Copied! Toggle word wrap Toggle overflow This matches any user's common name and maps it to the result of the subtree search with baseou=People,dc=example,dc=com, based on the filtercn=userId. - Restart the instance:
dsctl instance_name restart
# dsctl instance_name restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Note
dsconf adds the mapping to the end of the list, regardless of its ASCII order.
9.10.3.2. Configuring SASL Identity Mapping Using the Web Console Copiar enlaceEnlace copiado en el portapapeles!
- Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
- Select the instance.
- Open the menu, and select SASL Settings & Mappings.
- Click .
- Fill the form. For example:
- Click .
9.10.4. Enabling SASL Mapping Fallback Copiar enlaceEnlace copiado en el portapapeles!
nsslapd-sasl-mapping-fallback parameter:
dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-sasl-mapping-fallback=on
# dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-sasl-mapping-fallback=on
Successfully replaced "nsslapd-sasl-mapping-fallback"
9.10.4.1. Setting SASL Mapping Priorities Copiar enlaceEnlace copiado en el portapapeles!
nsslapd-sasl-mapping-fallback attribute, you can optionally set the nsSaslMapPriority attribute in mapping configurations to prioritize them. The nsSaslMapPriority attribute supports values from 1 (highest priority) to 100 (lowest priority). The default is 100.
cn=Kerberos uid mapping,cn=mapping,cn=sasl,cn=config mapping: