Assumptions
It is assumed that you are using the WebSphere Version to Version Migration Workshop VMWare image
that has been pre-installed with the necessary binaries.
In this exercise, you will:
1)
Page 2
IBM Software
__e. To create the certificate in the command prompt, type the following text as a single line:
bin/securityUtility createSSLCertificate --server=jpaLab --password=passw0rd
It assumes that the jpaLab server has already been created which was done in the
previous lab.
This generates the keystore and places it in the server configuration directory.
The utility also produces output of the XML snippet that can be copied into the server.xml
to use the keyStore.
2)
Update the server configuration with the ssl feature and keystore
__a. Open the server.xml file in Eclipse IDE. In Project Explorer go to WebSphere
Application Server V8.5 Liberty Profile servers jpaLab server.xml
Contents
Page 3
__b. Copy the output generated by the securityUtility command. And, then paste it into the
server.xml Source tab in Eclipse.
This configures the ssl-1.0 feature and tells the runtime the password to use when accessing the default
key store.
IBM Software
Configure the Liberty Server to run the security related features. The appSecurity-1.0 feature is
used to secure web resources.
__a. Select the Design tab on the server.xml configuration editor.
__b. Click the Feature Manager option from the Configuration Structure section.
__c. In Feature Manager Details section on the right, click the Add... button to add a new
feature into the list.
Contents
Page 5
Page 6
IBM Software
Contents
Page 7
Page 8
IBM Software
__h. In the User Details section, enter IBM as the user name. And passw0rd as the password
__i.Click Edit... button next to the Password field.
Contents
Page 9
2)
Page 10
IBM Software
__g.
Setting the Transport Guarantee to NONE means that SSL is not required to invoke the application.
However, as we have already demonstrated, the JPALab application is available from the HTTP and
HTTPS transports. In both cases, you will be prompted for user credentials to access the protected web
resources in the application.
__h. Save the changes.
4)
Contents
Page 11
__a. In the Overview section, select Web Application (JPALab) >> Security Constraint
(Access Constraint) >> Web Resource Collection ()
Page 12
IBM Software
__c. Ensure you are in the Design mode by selecting the Design tab on the Server
Configuration editor.
__d. Select the Application: JPALab element for the application.
__e. With the Application: JPALab element selected, click the Add... button.
Contents
Page 13
Page 14
IBM Software
This ties up with the role name in the web.xml defined earlier in the lab.
__l.Select the security-role in the Configuration Structure section. Click the Add... button.
__m. Select user from the list.
Contents
Page 15
The common best practice is to use groups for role mappings rather than users. Defining groups is
performed basically the same as defining users.
__p. Save the configuration.
__q. Restart the server so the security settings takes effect.
__r. The application is now ready to run with security enabled.
Close any Web browser windows in Eclipse that have the JPALab application loaded.
2)
Right-click the JPALab application in the Project Explorer and select Run As >> Run on Server
to launch it.
3)
The web browser comes up. You should be prompted for a user name and password.
Page 16
IBM Software
4)
Name: IBM
Password: passw0rd
5)
Click OK.
6)
You can now securely use the application. Congratulations! You've done the lab.
Contents
Page 17