28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Runtime Authorization Check of Analytic Privileges<br />

When a user requests access to data stored in an attribute, analytic, or calculation view, an authorization check<br />

based on analytic privileges is performed and the data returned to the user is filtered accordingly. Access to a<br />

view and the way in which results are filtered depend on whether the view is independent or associated with other<br />

modeling views (dependent views).<br />

Independent Views<br />

The authorization check for a view that is not defined on another modeling view is as follows:<br />

1. The user requests access to an individual view, for example with a SELECT query.<br />

This is possible if the both of the following prerequisites are met:<br />

○ The user has been granted the SQL privilege SELECT on the view or the schema in which it is located.<br />

○ The user has been granted an analytic privilege that is applicable to the view. An analytic privilege is<br />

applicable to a view if it contains the view in the view restriction and at least one filter on one attribute of<br />

the view.<br />

Note: The user does not require the SELECT privilege on the underlying base tables or views of the<br />

modeling view.<br />

2. The authorization check determines the analytic privileges that are relevant for the current user and view.<br />

Relevant analytic privileges are those that met all of the following criteria:<br />

○ Analytic privileges previously granted to the user, either directly or indirectly through a role<br />

○ Analytic privileges with a view restriction that includes the accessed view<br />

○ Analytic privileges with a currently valid validity restriction<br />

Note: This check is always positive for analytic privileges created and activated in the <strong>SAP</strong> <strong>HANA</strong><br />

modeler.<br />

○ Analytic privileges with an activity restriction covering the activity requested by the query are considered<br />

Note: This check is always positive for analytic privileges created and activated in the <strong>SAP</strong> <strong>HANA</strong><br />

modeler.<br />

○ Analytic privileges with dimension restrictions covering some of the view’s attributes<br />

3. If no relevant analytic privileges are found, the user’s queries are rejected with a “Not authorized” error.<br />

This means that even though the user has the SELECT privilege on the view, access is not possible.<br />

If the user does have a relevant analytic privilege but does not have the SELECT privilege on the view, access<br />

is also not possible. If relevant analytic privileges are found, the authorization check evaluates the value filters<br />

specified in the dimension restrictions and presents the appropriate data to the user.<br />

Note: Multiple dimension restrictions and/or multiple value filters are combined as described in the<br />

section on the structure of analytic privileges.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up Roles and Authorizations<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 337

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

Saved successfully!

Ooh no, something went wrong!