29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

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.

application.xml (security tab)<br />

user-role<br />

CatalogAdmin<br />

admin1<br />

OrderDept<br />

orderadmin1<br />

web.xml (servlets tab)<br />

servlets<br />

MasterCatalogView<br />

URLs<br />

/MasterCatalogView<br />

/Administration/MasterCatalogView<br />

OrderCatalogView<br />

URLs<br />

/Administration/OrderCatalogView<br />

web.xml (security tab)<br />

roles<br />

CatalogAdmin<br />

OrderDept<br />

Authorized roles<br />

CatalogAdmin<br />

OrderDept<br />

(optional)<br />

Authorized roles<br />

CatalogAdmin<br />

OrderDept<br />

(optional - can be used<br />

for programmatic<br />

security)<br />

Figure 16-3 Web module deployment descriptor security options<br />

Security constraint (1)<br />

Methods<br />

Get method<br />

Put method<br />

URLs<br />

/MasterCatalogView<br />

/Administration/MasterCatalogView<br />

/AddNewItemProcess<br />

Security constraint (2)<br />

Methods<br />

Get method<br />

Put method<br />

URLs<br />

/Administration/OrderCatalogView<br />

Define the role<br />

Roles are defined in the Web deployment descriptor for each Web module, then<br />

later rolled up into the application deployment descriptor. We will start by defining<br />

the CatalogAdmin role.<br />

1. Open Web Content/META-INF/web.xml.<br />

2. Select the Security tab.<br />

3. Select security roles at the top and click Add below the window.<br />

4. Type in the name of the role, CatalogAdmin.<br />

Chapter 16. Security 559

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

Saved successfully!

Ooh no, something went wrong!