10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working with Realms, Users, Groups, and Roles<br />

780<br />

■ Select the file realm to add users you want to enable to access applications running in<br />

this realm. (For the example security applications, select the file realm.)<br />

■ Select the admin-realm to add users you want to enable as system administrators of the<br />

Application Server.<br />

■ You cannot enter users into the certificate realm using the Admin Console. You can<br />

only add certificates to the certificate realm. For information on adding (importing)<br />

certificates to the certificate realm, read “Adding Users to the Certificate Realm” on<br />

page 780.<br />

7. Click the Manage Users button.<br />

8. Click New to add a new user to the realm.<br />

9. Enter the correct information into the User ID, Password, and Group(s) fields.<br />

■ If you are adding a user to the file realm, enter the name to identify the user, a password<br />

to allow the user access to the realm, and a group to which this user belongs. For more<br />

information on these properties, read “Working with Realms, Users, Groups, and Roles”<br />

on page 775.<br />

For the example security applications, enter a user with any name and password you like,<br />

but make sure that the user is assigned to the group of user.<br />

■ If you are adding a user to the admin-realm, enter the name to identify the user, a<br />

password to allow the user access to the Application Server, and enter asadmin in the<br />

Group field.<br />

10. Click OK to add this user to the list of users in the realm.<br />

11. Click Logout when you have completed this task.<br />

Adding Users to the Certificate Realm<br />

In the certificate realm, user identity is set up in the Application Server security context and<br />

populated with user data obtained from cryptographically-verified client certificates. For<br />

step-by-step instructions for creating this type of certificate, see “Working with Digital<br />

Certificates” on page 786.<br />

Setting Up Security Roles<br />

When you design an enterprise bean or web component, you should always think about the<br />

kinds of users who will access the component. For example, a web application for a human<br />

resources department might have a different request URL for someone who has been assigned<br />

the role of DEPT_ADMIN than for someone who has been assigned the role of DIRECTOR. <strong>The</strong><br />

DEPT_ADMIN role may let you view employee data, but the DIRECTOR role enables you to modify<br />

employee data, including salary data. Each of these security roles is an abstract logical grouping<br />

of users that is defined by the person who assembles the application. When an application is<br />

deployed, the deployer will map the roles to security identities in the operational environment,<br />

as shown in Figure 28–6.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!