Anda di halaman 1dari 9

An Administrators Guide to Deploying the Self Registration Portlets for IBM WebSphere Portal 8

Introduction System Requirements The Portlets Portal 8 Configuration Steps Configuring the Self Registration Portlets Deploying the Self Registration Portlets Further Notes Importing the Self Registration WEF Archive into Web Experience Factory

The Self Registration WAR contains a number of portlets for deployment on a Portal 8 server. These portlets allow a Portal user to register an account, modify an existing account and change their account password, all without administrator intervention. There is an email activation mode that, once enabled, causes an email to be sent when a user registers their account. The new account will remain inactive until the user opens a unique link that is contained in the email body, and completes the activation process. A further two portlets are provided to facilitate this process and to also enable the user to request a resending of the activation email.

System Requirements
The Self Registration portlets are designed to run on an IBM WebSphere Portal 8 CF3 deployment with a WAS version or greater. It is also a requirement to have the iFix: IFPM73727 installed for WAS You need to have your Portal 8 server configured with an LDAP and various attributes and attribute mappings must be added to both the LDAP schema and the Portal server. These are specified in more detail below. The Portal 8 server must also be configured to use an SMTP mail server.

The Portlets
Self Registration this portlet allows an anonymous user to register a user account, by providing a unique user ID, email address and other details. If the Send Activation Email setting is set to true, when the form is submitted, an email will be sent to the provided email address that will contain a link to a page with the Account Activation portlet. If the same setting is set to false, the user will become active immediately. Profile Update allows a logged-in user to edit their registered account. If an email address for the user has been specified, an email will be sent confirming that the user's account has been successfully modified. Forgot Password lets an anonymous user set a new password for their account, but only if they can provide the correct answer to one of two security questions that they choose when registering. Account Activation if the Send Activation Email feature is enabled, an email will be sent to the newly registered user. That email will contain a link to a page that contains this portlet. The portlet itself contains two text fields to provide and confirm the user's password, and a submit button. If the passwords meet the minimum criteria, the user's account is activated. Resend Activation Email when the Send Activation Email setting is set to true, an email will be sent to the newly registered user. This portlet gives an anonymous user the opportunity to receive another email, in the event that the first email was accidentally deleted. The new email will also contain a link to the page with the Account Activation portlet.

Portal Configuration Steps

Required LDAP attributes and mappings Both your LDAP schema and the Portal user registry must have the following attributes defined: activationCode activationStatus securityQuestion1 securityQuestion2 securityAnswer1 securityAnswer2

Furthermore, the Portal repository should have a the following LDAP attributes mapped to the Portal attributes: mail -> ibm-primaryEmail See the WebSphere Portal Family Wiki documentation for instructions on how to do this, check for the relevant document (depending on your Operating System) for configuring a stand-alone or federated LDAP: lookupName=IBM+WebSphere+Portal+8+Product+Documentation#action=openDocument&res_title= Installing_wp8&content=pdcontent Setting up a Mail Session It will be necessary to set up a connection to an SMTP server if you want to enable email activation, or if you want users to get notification emails after they use the Profile Update portlet. 1. In the WAS Administration console for your Portal Server, go to Resources -> Mail -> Mail Sessions and click the 'New' button 2. Specify any name for the new session 3. The value of the JNDI name should be mail/mailSession 4. Specify the SMTP server and credentials for outgoing mail 5. Click 'OK' and then save changes to the master configuration 6. Restart the WebSphere Portal Server

Configuring Self Registration Portal

A number of settings that can be configured by editing the accountActivation.xml file that is found within the Portlet WAR file under the path accelerators/config/profile/common. The file can also be located and edited on the server after the Portlet WAR has been installed under the following directory: [WP_PROFILE_ROOT]/installedApps/dslvm41Cell/PA_selfreg.ear/PA_selfreg.war/accelerators/confi g/profile/common The properties and how they are used: portalHomePage the unique ID of the page that the Return to Home link will direct the user to sendActivationEmail set to true or false. If true, an email will be sent to the user to activate their account. If false, the user gets activated as soon as they register. This setting needs to be set to true for the Resend Activation Email portlet to work acctActivationPageId The unique ID of the page that will contain the Account Activation portlet acctivationPortletWindowId The unique ID that should be given to the Account Activation portlet fromAddress The address that will appear as the sender for account activation emails emailSubject The subject that will appear on account activation emails emailBody The general text that will appear in account activation emails

Deploying the Self Registration Portlet WAR

1. 2. Install the WAR onto your Portal server as a Web Module Set the appropriate permissions on the Portlets Typically, all portlets should have the Anonymous Portal User role assigned to them, except for the Profile Update portlet, which should have the All Authenticated Portal Users role assigned to it


Add the correct unique name to the Account Activation Portlet When email activation is enabled, it is necessary to give the Account Activation portlet a unique name. The unique name must correspond to the activationPortletWindowId property in the accountActivation.xml file that is found within the Portlet WAR file under the path accelerators/config/profile/common. The default value is:

This can be set in the Portal Administration page under Portal Settings > Custom Unique Names


Create pages for the portlets. Typically a separate page will be created for each portlet Note: the page that will contain the Account Activation portlet will need a Unique Name that is specified in acctActivationPageId property in the accountActivation.xml file (which is mentioned above). The default value is:


Set the theme profile to Full for pages that contain the Self Registration, Forgot Password and Profile Update portlets As an administrator, navigate to the newly created page and go into Edit mode On the 'Overview' tab, click on the first section under Page Properties Go to the 'Advanced' tab in the Page Properties window Under the Theme Settings section, select Full from the profile drop-down menu Click the Save button at the bottom of the window When back at the edit mode view, click the Save button


Set appropriate permissions for the pages

Further Notes
When email activation has been enabled, don't try to use the Self Registration portlet as a logged in user. The email activation link will not work correctly

Importing the Self Registration WEF archive into Web Experience Factory
In Web Experience Factory 8, switch to the Web Experience Factory Perspective On the Project Explorer pane, right-click and go to Import -> Web Experience Factory Archive

Give the project a name and deselect Create default folders

Uncheck the User Interface checkbox (it will be checked by default as shown below) and click Next to go to the third page

Deselect the WASCE option and click the Finish button

Right-click on the newly created project and select Import -> Web Experience Factory Archive Click Browse and select the Self Registration WEF archive. Click Open

The Import window should now look like below. Click Finish

There will be errors in the project. We need to add additional jars to the build path. The jars can be found in subdirectories of Websphere/PortalServer/base. Copy the following jars into a location inside your Self-Registration WEF project directory on the file system: wp.auth.base.jar wp.base.jar wp.model.api.jar wp.portalservices.api.standard.jar wp.user.api.jar

Back in WEF, right-click on the Self-Registration project, and select Properties. From the tree, select Java Build Path and on the main pane, select the Libraries tab. Select the Add Jars button and then find and select all the jars mentioned above from the location that they reside

You should see the new jar files that have been added. Click Ok and then rebuild your project if necessary