Don't Be Tardy: Configure Password Expiration with OpenSSO and Identity Manager
In a deployment architecture that includes OpenSSO Enterprise 8.0 and Identity Manager 8.1.0.5 (to be released sometime in October) it is possible to configure user password reset based on the password's expiration date, or a help desk administrator's action. In the former use case, when a password is close to expiration, the user data store (which must be an LDAP directory server) can send a warning to the user based on the time configured in the assigned password policy. Upon accessing a resource protected by OpenSSO, the user would be redirected to Identity Manager to change the password. The URL of the protected resource is saved as a value of the goto parameter and the user will be redirected to this location after changing the password.
Configuring the LDAP Directory Server
For this procedure to work it is assumed that a password policy has been configured and assigned to the test user's LDAP profile in the directory server. The password policy should have the following controls related to password expiration set:- Set Password Expiration (LDAP attribute:
passwordexp,passwordmaxage) - Set Expiration Warning (LDAP attribute:
passwordwarning) - Warning Duration (LDAP attribute:
passwordExpireWithoutWarning)
- Require Password Change at First Login and After Reset (LDAP attribute:
passwordchange,passwordmustchange) - Allow Users to Change Their Passwords (LDAP attribute:
pwdallowuserchange)
passwordPolicySubentry attribute in the test user's LDAP profile should also be defined with the DN of the password policy to denote that the password policy has been assigned. See the documentation for your specific directory server for instructions on how to do these configurations.
Configuring OpenSSO
Only the OpenSSO LDAP authentication module supports the password change controls enforced by most directory servers. The following sections contain OpenSSO configurations.- To Enable LDAP Authentication
- To Define Identity Manager URLs as Not Enforced
- Creating
ChangePasswod.jsp - Modifying the LDAP Authentication Module XML Service File
- Modifying the OpenSSO Login Page
To Enable LDAP Authentication
- Login to the OpenSSO console as administrator.
- Click the Access Control tab.
- Click the appropriate realm name.
- Click the Authentication tab.
- Click New in the Authentication Chaining section to create a new authentication chain.
- Enter a name for the chain and click OK.
For this example use idmauth. - On the new chain's Properties page, add the LDAP module as REQUIRED and click Save.
- Click Back to Authentication.
- Select the service just created as the value for Organization Authentication Configuration.
- Click LDAP in the Module Instances section.
- Customize the LDAP properties to reflect your directory - at minimum:
- Primary LDAP Server
- DN to Start User Search
- DN for Root User Bind
- Password for Root User Bind
- Password for Root User Bind (confirm)
- Save the changes.
- Logout from the OpenSSO console.
- Use
/opensso/consoleto log in to the OpenSSO console (not/opensso/UI/Login) to ensure that the authentication module configured for the OpenSSO administrator is used and not the LDAP module just configured. - Login to the Identity Manager console and expand the OpenSSO resource listing to view the OpenSSO objects. If you receive an error, you may need to reconfigure the OpenSSO adaptor to use a delegated administrator rather than
amadminto connect to OpenSSO. The Identity Manager adaptor for OpenSSO authenticates to OpenSSO using the authentication configuration for the realm which is now different from the configuration for the OpenSSO console. Thus,amadminwill no longer work. See Delegating Administrator Privileges for information on delegating administrative privileges to a group.
To Define Identity Manager URLs as Not Enforced
- Login to the OpenSSO console as administrator.
- Click the Access Control tab.
- Click the appropriate realm name and navigate to the Agents profile for the policy agent that protects Identity Manager.
- Under the agent profile, click the Application tab.
- Add the following URIs to the Not Enforced URIs property.
/idm/authutil//idm/authutil/*/idm/authutil/*?*
- Click Save.
- Logout of OpenSSO.
To Create ChangePassword.jsp
This procedure documents how to create ChangePassword.jsp, a custom JSP for redirecting a user to Identity Manager for password change events. (By default, the user would be directed to the OpenSSO password change page.) ChangePassword.jsp will forward the following information to Identity Manager:
- The original URL requested by the user and defined as the value of the
gotoparameter. - The user identifier defined as the value of the
accountIdparameter
- Change to the
opensso/integrations/idm/jsps/directory in the decompressedopensso.zipto access the sampleChangePassword.jsp. - Modify the Identity Manager URL in the JSP based on your deployment.
- Copy
ChangePassword.jspto/web-container-deploy-base/opensso/config/auth/default/and to/web-container-deploy-base/opensso/config/auth/default_en/. - Remove the web containers temporary, compiled JSP to ensure that the changes made are picked up.
For example, if using Glassfish, the temporary, compiled classes can be found underglassfish-home/domains/your-domain/generated/. - Restart the OpenSSO web container after making the changes.
Modifying the LDAP Authentication Module XML Service File
This procedure documents how to modifyLDAP.xml to use ChangePassword.jsp. There are two options to consider when deciding how to modify LDAP.xml. You can manually change the deployed LDAP.xml file, or you can use the sample LDAP.xml included with the opensso.zip download. They are mutually exclusive so choose only one of these procedures.
To Manually Modify a Deployed LDAP.xml
- Change to the
/web-container-deploy-base/opensso/config/auth/default/directory to access the deployedLDAP.xmlpage. - Open
LDAP.xmlin an editor and add the section of code displayed in yellow in admin_pwd_reset_ldap.html on the OpenSSO web site. - Change to the
/web-container-deploy-base/opensso/config/auth/default_en/directory to access the second copy ofLDAP.xmland make the same change. - Remove the web containers temporary, compiled JSP to ensure that the changes made are picked up.
For example, if using Glassfish, the temporary, compiled classes can be found underglassfish-home/domains/your-domain/generated/. - Restart the OpenSSO web container after making the changes.
To Use the Sample LDAP.xml
- Change to the
opensso/integrations/idm/xml/directory in the decompressedopensso.zipto access the sampleLDAP.xml. - Replace your deployed
/web-container-deploy-base/opensso/config/auth/default/LDAP.xmlwith the sampleLDAP.xmlin two directories:/web-container-deploy-base/opensso/config/auth/default//web-container-deploy-base/opensso/config/auth/default_en/
LDAP.xmlwith the sampleLDAP.xmlyou will lose any custom changes made to the existingLDAP.xml. - Remove the web containers temporary, compiled JSP to ensure that the changes made are picked up.
For example, if using Glassfish, the temporary, compiled classes can be found underglassfish-home/domains/your-domain/generated/. - Restart the OpenSSO web container after making the changes.
diff between both files and make the necessary changes manually.
Modifying the OpenSSO Login Page
This procedure documents how to modifyLogin.jsp with the necessary code to save the URL value of the goto parameter in the HTTP request. This saved URL is required by the ChangePassword.jsp. The saved URL (which is the original location desired by the user) will be passed to Identity Manager and used to redirect the user after unlocking has been completed.
There are two options to consider when deciding how to embed code into the OpenSSO Login.jsp. You can manually change the deployed Login.jsp file, or you can use the sample Login.jsp included with the opensso.zip download. They are mutually exclusive so choose only one of these procedures.
To Manually Modify a Deployed Login.jsp
- Change to the
/web-container-deploy-base/opensso/config/auth/default/directory to access the deployedLogin.jsppage. - Open
Login.jspin an editor and add the two (2) sections of code displayed in yellow in admin_pwd_reset_login.html on the OpenSSO web site. - Remove the web containers temporary, compiled JSP to ensure that the changes made are picked up.
For example, if using Glassfish, the temporary, compiled classes can be found underglassfish-home/domains/your-domain/generated/. - Restart the OpenSSO web container after making the changes.
To Use the Sample Login.jsp
- Change to the
opensso/integrations/idm/jsps/directory in the decompressedopensso.zipto access the sampleLogin.jsp. - Change the Identity Manager URL embedded in the sample
Login.jspto reflect the Identity Manager system URL of your architecture.
You can search for the string/idmto locate the URLs. - Replace your deployed
/web-container-deploy-base/opensso/config/auth/default/Login.jspwith the sampleLogin.jsp.
If you replace your existingLogin.jspwith the sampleLogin.jspthe following will occur.- You will lose any custom changes made to the existing
Login.jsp. - You will inherit changes that might have been previously made to the sample
Login.jspto incorporate requirements for other use cases related to the OpenSSO integration with Identity Manager.
- You will lose any custom changes made to the existing
- Remove the web containers temporary, compiled JSP to ensure that the changes made are picked up.
For example, if using Glassfish, the temporary, compiled classes can be found underglassfish-home/domains/your-domain/generated/. - Restart the OpenSSO web container after making the changes.
diff between both files and make the necessary changes manually.
Testing The Configurations
Perform the tests in the order in which they are described to understand and verify the behavior for each stage of this use case.A. Testing Password Warning Expiration
Perform the following actions after the time the password expiration warning, as defined in the password policy, would take effect.- Access a URL protected by OpenSSO.
The OpenSSO login page is displayed. - Enter the test user name and password.
You will be redirected to Identity Manager to change your password. Note the following about the Identity Manager URL:- The URL is the one configured in
ChangePassword.jsp. - The user will be forwarded to the value of the
gotoparameter after the password has been successfully changed. - The value of the
accountIdparameter determines the account for which the password needs to be changed. Identity Manager will make the changes to the password on both Identity Manager and OpenSSO.
- The URL is the one configured in
B. Testing Password Expiration
Perform the following actions after the time the password should have expired, as defined in the password policy.- Access a URL protected by OpenSSO.
The OpenSSO login page is displayed. - Enter the test user name and password.
An error page is displayed informing the test user that the password has expired. The user will be instructed to have the administrator reset the password.
C. Testing Administrator Password Reset
- Refer to your directory server documentation to enable audit and logging.
Monitor the directory server audit log as you finish the test. - Login as the directory administrator and change the password for a test user.
This simulates the password reset by a help desk administrator. - Verify that the user's
userPasswordattribute was modified and thepwdresetwas set to TRUE using the audit log.
Thepwdresetattribute will force the user to change the password at the next login. The audit log might resemble this sample.time: 20090713074720 dn: uid=idmuser1,dc=sun,dc=com changetype: modify replace: userPassword userPassword: {SSHA}4Bgy/HF9SGN9nnS4Ii6/KJj9ktFdAxQUIDvwVQ== - replace: modifiersname modifiersname: cn=admin,cn=administrators,cn=dscc - replace: modifytimestamp modifytimestamp: 20090713144720Z - replace: passwordexpirationtime passwordexpirationtime: 19700101000000Z - replace: pwdreset pwdreset: TRUE - Access the Identity Manager user URL.
You will be redirected to OpenSSO for login. - Enter the test user name and password.
You will be redirected to Identity Manager to change your password. Note the following about the Identity Manager URL:- The URL is the one configured in
ChangePassword.jsp. - The user will be forwarded to the value of the
gotoparameter after the password has been successfully changed. - The value of the
accountIdparameter determines the account for which the password needs to be changed. Identity Manager will make the changes to the password on both Identity Manager and OpenSSO.
- The URL is the one configured in
Posted at 08:25AM Sep 29, 2009 by Michael Teger in Sun | Comments[0]
