• No se han encontrado resultados

Equipamientos prácticos Portaobjetos del lado del

In document MANUAL DE INSTRUCCIONES. Ibiza (página 113-117)

The application-access file enables you to specify who or what is authorized to access the content exposed by the application package and what content they are allowed to see.

You can use a set of keywords in the application-access file .xsaccess to specify if authentication is required to enable access to package content, which data is exposed, and if rewrite rules are in place to hide target and source URLs, for example, from users and search engines. You can also specify what, if any, level of authorization is required for the package and whether SSL is mandatory for client connections.

1. If it does not already exist, create a root package for the application you want to enable access to, for example, MyPackage.

Note

The namespace sap is restricted. Place the new package in your own namespace, which you can create alongside the sap namespace.

a) Start the SAP HANA studio and open the SAP HANA Development perspective.

b) In the Project Explorer view, right-click the folder where you want to create the new (MyPackage) package.

c) In the context-sensitive popup menu, choose New Folder . d) Enter the name MyPackage and choose Finish.

2. Activate the new package in the repository.

a) In the SAP HANA Development perspective, open the Project Explorer view and right-click the new (MyPackage) package.

b) In the context-sensitive popup menu, choose Team Activate .

3. If it does not already exist, create an application descriptor for the application and place it in the package (MyPackage) you created in the previous step.

The application descriptor is the core file that you use to indicate an application's availability within SAP HANA XS. The application descriptor marks the point in the package hierarchy at which an application's content is available to clients.

Note

The application-descriptor file has no contents and no name; it only has the file extension .xsapp. a) In the SAP HANA studio and open the SAP HANA Development perspective.

b) In the Project Explorer view, right-click the folder where you want to create the new (.xsapp) file. c) In the context-sensitive popup menu, choose New File .

d) Enter the name .xsapp and choose Finish.

Files with names that begin with the period (.), for example, .xsapp, are sometimes not visible in the

Project Explorer. To enable the display of all files in the Project Explorer view, use the Customize View Available Customization option and clear all check boxes.

4. Create the application access file.

The application-access file is a JSON-compliant file with the file suffix .xsaccess. Note that the application- access file does not have a name before the dot (.); it only has the suffix .xsaccess.

Create a file called .xsaccess and place it in the root package of the application to which you want to enable access. A basic .xsaccess file must, at the very least, contain a set of curly brackets, for example, {}. Note that the .xsaccess file uses keyword-value pairs to set access rules; if a mandatory keyword-value pair is not set, then the default value is assumed.

a) In the SAP HANA studio and open the SAP HANA Development perspective.

b) In the Project Explorer view, right-click the folder where you want to create the new (.xsaccess) file. c) In the context-sensitive popup menu, choose New File .

d) Enter the name .xsaccess and choose Finish. 5. Enable application access to data.

You use the expose keyword to enable or disable access to content at a package or subpackage level. {

"exposed" : true }

6. Define the application authentication method.

You use the authentication keyword to define how to manage the authentication process for requests to access package content, for example, SAP logon ticket, form-based logon, or a basic user name and password . { "authentication" : [ { "method" : "Basic" } ] }

7. Specify the application privileges if required. (Optional)

Use the authorization keyword in the .xsaccess file to specify which authorization level is required by a user for access to a particular application package. The authorization keyword requires a corresponding entry in the .xsprivileges file, for example, execute for basic privileges or admin for administrative privileges on the specified package.

{ "authorization": ["sap.xse.test::Execute", "sap.xse.test::Admin" ] }

8. Save the .xsaccess file in the package with which you want to associate the rules you have defined. 9. Commit the .xsaccess file to the repository and activate it.

In the Project Explorer view, right click the object you want to activate and choose Team > Activate in the popup menu.

Related Links

Application-Access File Keyword Options [page 59]

The application-access (.xsaccess) file enables you to specify whether or not to expose package content, which authentication method is used to grant access, and what content is visible.

The Application-Privileges File [page 68]

In SAP HANA Extended Application Services (SAP HANA XS), the application-privileges (.xsprivileges) file can be used to create or define the authorization privileges required for access to an SAP HANA XS application, for example, to start the application or to perform administrative actions on an application. These privileges can be checked by an application at runtime.

In document MANUAL DE INSTRUCCIONES. Ibiza (página 113-117)