Test security after enabling it
Basic tests are available that show whether the fundamental security components are working properly. Use this task to validate your security configuration.
After configuring administrative security and restarting all of the servers in a secure mode, validate that security is properly enabled.
There are a few techniques that we can use to test the various security login types. For example, we can test the Web-based BasicAuth login, Web-based form login, and the Java client BasicAuth login.
Basic tests are available that show whether the fundamental security components are working properly. Complete the following steps to validate the security configuration:
- After enabling security, verify that the system comes up in secure mode.
- Test the Web-based BasicAuth with Snoop, by accessing the following URL: http://hostname.domain:9080/snoop.
(dist) A login panel is displayed. If a login panel does not display, then a problem exists. If the panel appears, type in any valid user ID and password in the configured user registry.
The Snoop servlet is only available in the domain if you included the DefaultApplication option when adding the application server to the cell. The -includeapps option for the addNode command migrates the DefaultApplication option to the cell. Otherwise, skip this step.
- Test the Web-based form login by starting the console: http://hostname.domain:port_number/ibm/console. A form-based login page is displayed. If a login page does not appear, try accessing the console by typing https://myhost.domain:9043/ibm/console.
Type in the admin ID and password used for configuring your user registry when configuring security.
- Test Java Client BasicAuth with dumpNameSpace.
(dist) Use the app_server_root/bin/dumpNameSpace.bat file. A login panel appears. If a login panel does not appear, there is a problem. Type in any valid user ID and password in the configured user registry.
(zos) Use the app_server_root/bin/dumpNameSpace.sh file. A login panel appears. If a login panel does not appear, there is a problem. Type in any valid user ID and password (or password phrase) in the configured user registry.
(iseries) Use the app_server_root/bin/dumpNameSpace file. A login panel appears. If a login panel does not appear, there is a problem. Type in any valid user ID and password in the configured user registry.
- Test all of the applications in secure mode.
- If all the tests pass, proceed with more rigorous testing of the secured applications. If we have any problems, review the SYSOUT and SYSPRINT logs. For more information on common problems, see Troubleshooting security configurations.
(zos) Note: Testing synchronizing of the node agent is a good test. To do so, make a small change to the configuration and save and synchronize those changes. If there are no errors, proceed.
Results
The results of these tests, if successful, indicate that security is fully enabled and working properly.(zos)
Example
To test the Snoop application, do the following:
- Enable security while installing the Base Application Server.
- Log onto the console with a wsadmin user ID and password.
- Navigate to Applications > Enterprise Applications > DefaultApplication > Security role to user/group mapping.
- Add a user. Select the role All Role, and click Lookup User.
- Map one of the users (for example, TESTER1) with the role All Role. For more information on mapping, see Look up users.
- Save the configuration.
- (zos) Run Resource Access Control Facility (RACF ) commands for the role All Role to find those associated with the TESTER1 user ID.
(zos) Note: In the RACF command, enter All Role as All#Role, as in the following example:
RDEFINE EJBROLE S30CSA1.All#Role UACC(NONE) APPLDATA('TESTER1') PERMIT S30CSA1.All#Role CLASS(EJBROLE) ID(TESTER1) ACCESS(READ) SETROPTS RACLIST(EJBROLE) REFRESH PE S30CSA1 CLASS(APPL) ID(TESTER1) ACCESS(READ)
- Access the application with the user ID TESTER1 at http://localhost:port/snoop.
Related concepts
Web component security Administrative roles and naming service authorization
Related tasks
Secure enterprise bean applications
Security: Resources for learning