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

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

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

1. If you have not already done so, create a root package for your new application, for example,<br />

MyApplication.<br />

2. If you have not already done so, create an application descriptor for your new application and place it in the<br />

root package you created in the previous step.<br />

The application descriptor is the core file that you use to describe an application's availability within <strong>SAP</strong><br />

<strong>HANA</strong> Extended Application Services. The application-descriptor file has no contents and no name; it only has<br />

the file extension .xsapp.<br />

Note: For backward compatibility, content is allowed in the .xsapp file but ignored.<br />

3. If you have not already done so, create an application-access file for your new application and place it in the<br />

package to which you want to grant access.<br />

The application-access file does not have a name; it only has the file extension .xsaccess. The contents of<br />

the .xsaccess file must be formatted according to JavaScript Object Notation (JSON) rules and associated<br />

with the package it belongs to. The rules defined in the .xsaccess file apply to the package it resides in as<br />

well as any subpackages lower in the package hierarchy.<br />

Note:<br />

Use the authorization keyword in the .xsaccess file to specify which authorization level is to be<br />

granted to a particular application package. The authorization levels you can choose from are defined<br />

in the application-privileges file (.xsprivileges), for example, "execute" for basic privileges, or<br />

"admin" for administrative privileges on the specified package.<br />

4. Create the application-privileges file.<br />

The application-privileges file does not have a name; it only has the file extension .xsprivileges. The<br />

contents of the .xsprivileges file must be formatted according to JavaScript Object Notation (JSON)<br />

rules. Multiple .xsprivileges files are allowed, but only at different levels in the package hierarchy; you<br />

cannot place two .privileges files in the same application package. The privileges defined in<br />

a .xsprivileges file are bound to the package to which the file belongs and can only be applied to this<br />

package and its subpackages.<br />

5. Define the application privileges.<br />

Inside the .xsprivileges file, a privilege is defined for an application package by specifying an entry name<br />

with an optional description. This entry name is then automatically prefixed with the package name to form<br />

the unique privilege name, for example, sap.hana::Execute. The unique privilege name can be used in<br />

multiple .xsprivileges files in different packages, since they are all different privileges.<br />

Note: The .xsprivileges file lists the authorization levels available for granting to an application<br />

package; the .xsaccess file defines which authorization level is assigned to which application<br />

package.<br />

{<br />

"privileges" :<br />

[<br />

{ "name" : "Execute", "description" : "Basic execution<br />

privilege" },<br />

{ "name" : "Admin", "description" : "Adminstration<br />

privilege" },<br />

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

Setting Up Your Application<br />

P U B L I C<br />

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

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

Saved successfully!

Ooh no, something went wrong!