03.05.2015 Views

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.4 <strong>Security</strong> role reference<br />

During the development phase of the application, the actual role names for<br />

security constraints may not be known to the groups of developers. On the other<br />

hand, the actual role names in a deployed runtime environment may not be<br />

known until the Web application and EJB modules are ready and assembled into<br />

the .ear file. Therefore, the role names used during development are considered<br />

to be “logical roles”. These logical roles are then mapped by the application<br />

deployer into the actual runtime roles during the application assembly and<br />

deployment phase.<br />

<strong>Security</strong> role references provide a level of indirection to isolate roles used during<br />

development and actual runtime roles. They link the names of the roles used in<br />

the module to the corresponding name of the role in the encompassing<br />

application.<br />

The definition of the "logical" roles and the mapping to the actual runtime<br />

environment roles are specified in the element of both the<br />

Web application and the EJB jar file deployment descriptors, web.xml and<br />

ejb-jar.xml respectively. The Application Assembly Tool (AAT) and <strong>WebSphere</strong><br />

Studio Application Developer can be used to both define the role-name and map<br />

to the actual runtime roles in the environment with the role-link element.<br />

<strong>Security</strong> role references with Application Assembly Tool<br />

The example below provides instructions on how to define role references using<br />

the Application Assembly Tool.<br />

1. Start the Application Assembly Tool, open the itsobank.ear archive.<br />

2. On the right-hand side, expand the tree: itsobank -> Web modules -><br />

itsobankWeb -> Web components -> TransferServlet -> <strong>Security</strong> Role<br />

References.<br />

3. Right-click the <strong>Security</strong> Reference node, then select New.<br />

4. A window pops up with the settings. A Name specifies the name of a security<br />

role reference used in the application code; type in RoleRef.<br />

5. The link specifies the name of a security role defined in the encompassing<br />

application, in our example, it is an application Web module; select manager<br />

here.<br />

6. You can write a description for the entry if you need to; actually this might be a<br />

good place to put a description for future reference.<br />

7. Click OK.<br />

56 <strong>IBM</strong> <strong>WebSphere</strong> <strong>V5.0</strong> <strong>Security</strong> Handbook

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

Saved successfully!

Ooh no, something went wrong!