14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

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.

10.6.2. When Access Denied Go To Next Group<br />

10.6.3. <strong>JHeadstart</strong> Authorization Proxy<br />

• A SecurityAdminAppDef application definition file is generated that can be used<br />

to generate pages to administer the permissions and grant permissions to roles.<br />

Using a multi-select List of Values, you can easily search and assign multiple<br />

permissions to a role. See section Generating Security Administration Pages for<br />

more information.<br />

• A SQL script named PermissionsData[ServiceName].sql is generated in the<br />

/scripts directory. The script is automatically executed when service-level<br />

checkbox Run Generate SQL scripts? is checked. The script inserts entries in<br />

JHS_PERMISSIONS table for each group. Four permissions are inserted for each<br />

group, an access permission named after the group, and three “operation”<br />

permissions for creating, updating and deleting. See section Restricting Group<br />

Operations based on Authorization Information for more information on using<br />

these operation permissions. In the same script, all permissions are granted to<br />

the Administrator role as specified in the Administrator Role property. This<br />

means that you when you use the sample user SKING to log in, you should still<br />

be able to access all groups. If you log in as AHUNOLD you will get an access<br />

denied message since the USER role does not have any permissions granted. You<br />

can use the security administration application to grant permission privileges to<br />

the USER role, as shown in the screen shot below. After you granted permissions<br />

for one or more groups, and you will log in as AHUNOLD you will see the<br />

group tabs for which you granted access permission. Depending on the group<br />

action permissions granted, the group pages will allow for insert, update and/or<br />

delete.<br />

Suppose you have combined several Application Definitions into a single application by<br />

providing links to the starting points of each Application Definition. That starting point<br />

would be the first top-level group of the Application Definition. Now suppose that the<br />

logged-in user does not have access to the first group. In that case you would want the<br />

link to navigate to the second group. And if the user doesn't have access to the first and<br />

second group, the link should go to the third group, etc.<br />

<strong>JHeadstart</strong> can generate such a navigation scenario if you check the service-level<br />

property When Access Denied go to Next Group.<br />

The guiding principle behind the security features of <strong>JHeadstart</strong> is that the way the<br />

application accesses the security information is as independent as possible from the<br />

chosen implementation (JAAS and/or custom security).<br />

To accomplish this, the <strong>JHeadstart</strong> runtime includes a class called<br />

JhsAuthorizationProxy. If you checked the Service-level property Use Role-based<br />

Authorization? in the Application Definition, a managed bean is generated into<br />

JhsCommon-beans.xml that automatically creates an instance of this class and puts it on<br />

the session.<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Application Security 10- 21

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

Saved successfully!

Ooh no, something went wrong!