You assign authentication policies in the same way as you
assign password policies, by using the
ds-pwp-password-policy-dn attribute.
![]() |
Note |
|---|---|
|
Although you assign the pass through authentication policy using
the same attribute as for password policy, the authentication policy is
not in fact a password policy. Therefore, the user with a pass through
authentication policy does not have a value for the operational attribute
$ ldapsearch --port 1389 --baseDN dc=example,dc=com uid=user.0 pwdPolicySubentry dn: uid=user.0,ou=People,dc=example,dc=com |
Procedure 19.4. To Assign a Pass Through Authentication Policy To a User
Users depending on pass through authentication no longer need a local password policy, as they no longer authenticate locally.
Examples in the following procedure work for this user, whose
entry on OpenDJ is as shown. Notice that the user has no password set. The
user's password on the authentication server is
password.
dn: uid=user.0,ou=People,dc=example,dc=com cn: Aaccf Amar description: This is the description for Aaccf Amar. employeeNumber: 0 givenName: Aaccf homePhone: +1 225 216 5900 initials: ASA l: Panama City mail: user.0@maildomain.net mobile: +1 010 154 3228 objectClass: person objectClass: inetorgperson objectClass: organizationalperson objectClass: top pager: +1 779 041 6341 postalAddress: Aaccf Amar$01251 Chestnut Street$Panama City, DE 50369 postalCode: 50369 sn: Amar st: DE street: 01251 Chestnut Street telephoneNumber: +1 685 622 6202 uid: user.0
This user's entry on the authentication server also has
uid=user.0, and the pass through authentication policy
performs the mapping to find the user entry in the authentication
server.
-
Prevent users from changing their own password policies.
$ cat protect-pta.ldif dn: ou=People,dc=example,dc=com changetype: modify add: aci aci: (target ="ldap:///uid=*,ou=People,dc=example,dc=com")(targetattr = "ds-pwp-password-policy-dn")(version 3.0;acl "Cannot choose own pass word policy";deny (write)(userdn = "ldap:///self");) $ ldapmodify --port 1389 --bindDN "cn=Directory Manager" --bindPassword password --filename protect-pta.ldif Processing MODIFY request for ou=People,dc=example,dc=com MODIFY operation successful for DN ou=People,dc=example,dc=com
-
Update the user's
ds-pwp-password-policy-dnattribute.$ ldapmodify --port 1389 --bindDN "cn=Directory Manager" --bindPassword password dn: uid=user.0,ou=People,dc=example,dc=com changetype: modify add: ds-pwp-password-policy-dn ds-pwp-password-policy-dn: cn=PTA Policy,cn=Password Policies,cn=config Processing MODIFY request for uid=user.0,ou=People,dc=example,dc=com MODIFY operation successful for DN uid=user.0,ou=People,dc=example,dc=com
-
Check that the user can authenticate through to the authentication server.
$ ldapsearch --port 1389 --baseDN dc=example,dc=com --bindDN uid=user.0,ou=People,dc=example,dc=com --bindPassword password uid=user.0 cn sn dn: uid=user.0,ou=People,dc=example,dc=com cn: Aaccf Amar sn: Amar
Procedure 19.5. To Assign a Pass Through Authentication Policy To a Group
Examples in the following steps use the pass through authentication
policy as defined above. Kirsten Vaughan's entry has been reproduced on
the authentication server under dc=PTA
Server,dc=com.
-
Create a subentry to assign a collective attribute that sets the
ds-pwp-password-policy-dnattribute for group members' entries.$ cat pta-coll.ldif dn: cn=PTA Policy for Dir Admins,dc=example,dc=com objectClass: collectiveAttributeSubentry objectClass: extensibleObject objectClass: subentry objectClass: top cn: PTA Policy for Dir Admins ds-pwp-password-policy-dn;collective: cn=PTA Policy,cn=Password Policies, cn=config subtreeSpecification: { base "ou=People", specificationFilter "(isMemberOf= cn=Directory Administrators,ou=Groups,dc=example,dc=com)"} $ ldapmodify --port 1389 --bindDN "cn=Directory Manager" --bindPassword password --defaultAdd --filename pta-coll.ldif Processing ADD request for cn=PTA Policy for Dir Admins,dc=example,dc=com ADD operation successful for DN cn=PTA Policy for Dir Admins,dc=example,dc=com -
Check that OpenDJ has applied the policy.
-
Make sure you can bind as the user on the authentication server.
$ ldapsearch --port 2389 --bindDN "uid=kvaughan,ou=People,dc=PTA Server,dc=com" --bindPassword password --baseDN "dc=PTA Server,dc=com" uid=kvaughan dn: uid=kvaughan,ou=People,dc=PTA Server,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: top givenName: Kirsten uid: kvaughan cn: Kirsten Vaughan sn: Vaughan userPassword: {SSHA}x1BdtrJyRTw63kBSJFDvgvd4guzk66CV8L+t8w== ou: People mail: jvaughan@example.com -
Check that the user can authenticate through to the authentication server from OpenDJ.
$ ldapsearch --port 1389 --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" --bindPassword password --baseDN dc=example,dc=com uid=kvaughan cn sn dn: uid=kvaughan,ou=People,dc=example,dc=com cn: Kirsten Vaughan sn: Vaughan
-

![[Note]](common/images/admon/note.png)
