Saturday 18 February 2017

SAP HANA XS: Application Privileges file (.xsprivileges)

Application Privileges file (.xsprivileges)
  1. This file enables you to define the authorization levels required for access to an application.
  2. This privileges can be assigned to individual role or users.
  3. The .xsprivileges file must reside in the same application package that you want to define access privileges for.
  4. And you must also add a corresponding entry in the same application’s .xsaccess file.
    For example: Using the authorization keyword.
  5. The application privileges file does not have a name; it has only file extension .xsprivileges.
    The content of the .xsprivileges file must be formatted according to the JavaScript Object Notion (JSON) rule.
  6. Multiple .xsprivileges files are allowed but only at different levels in the package hierarchy.
    You can’t define two .xsprivileges files in the same application package.
  7. The privilege name is unique to the package to which it belongs and, as a result, can be used in multiple .xsprivileges files in different packages.
  8. After activation of .xsprivileges object, the only user who by default has the application privileges specified in the .xsprivileges file is the _SYS_REPO user.
    1. To grant application privileges to other user, use the procedure or _SYS_REPO.
      GRANT_APPLICAITON_PRIVILEGES.
      REVOKE_APPLICATION_PRIVILEGES.

  9. How to create it ?
    1. Open SAP HANA Studio.
    2. Open SAP HANA development Perspective.
    3. In the Project Explorer tab, right click on the folder where you want to create it.
    4. In context menu,
      NewàOtheràSAP HANAàApplication DevelopmentàXS Application Privileges file.
    5. Finish it.
    6. Now open the .xsprivileges file from project and edit it and activate it.


  10. Example:


        Suppose this file is located in package com.test then the following privileges will be created.
        com.test::Execute
        com.test::Admin
  11. After activation of .xsprivileges object, the only user who by default has the application privileges specified in the .xsprivileges file is the _SYS_REPO user.

    To grant application privileges to other user, use the procedure or _SYS_REPO.
    GRANT_APPLICAITON_PRIVILEGES.
    REVOKE_APPLICATION_PRIVILEGES.

  12. Also,You need to create an entry of these privileges in .xsaccess file also by using keyword authorization.




1 comment:

  1. Harrah's Cherokee Casino Resort - MapYRO
    Harrah's Cherokee Casino Resort 상주 출장샵 is 평택 출장안마 a 4-star hotel with a casino, a poker room, and an 밀양 출장안마 outdoor pool. The hotel's 24-hour front desk 광주광역 출장안마 is 통영 출장마사지 non-smoking. Rating: 2.6 · ‎1,564 reviews

    ReplyDelete