Best practices and recommendations for developing roles in SAP HANA

This guide explains the new role development framework for SAP HANA, using XS Advanced and HDI. It gives recommendations and provides examples of how to best build roles. Download the Document

PUBLICDeveloping roles in SAP HANAApplicable to SAP HANA releases starting from 1.0 SPS12 and newerDocument version 1.2 2021-07
Document history and referencesDeveloping roles in SAP HANA, July 2021 (PUBLIC) 2Document historyVersion Release Date Change description Contact1.0 April 2018 Document creation askSAPHANA@sap.com1.1 November 2018 Minor updates: latest recommendations,re-wording of some paragraphs, foot-notes and correction of typos.1.2 July 2021 Updates: Split, news, recommendations,paragraphs, figures, correction of typos,links and layout (design)ReferencesGeneral SAP HANA Developer Guide: Explains how to build applications using SAP HANA, in-cluding how to model data, how to write procedures, and how to build applicationlogic in SAP HANA Extended Application Services, classic model. SAP HANA XSA Developer Guide: Explains how to build applications using SAP HANA,including how to model persistent and analytic data, how to write procedures, andhow to build application logic in SAP HANA Extended Application Services advancedmodel (XS advanced). SAP HANA Security Guide: Is the entry point for all information relating to the secureoperation and configuration of SAP HANA. SAP HANA Security Checklist: Offers recommendations and information about opti-mizing your security configuration to help you run your SAP HANA securely. SAP Note 2465027 - Deprecation of SAP HANA extended application services, classicmodel and SAP HANA Repository.Migration SAP HANA XS Advanced Migration Guide: Explains how to prepare, migrate, and de-ploy applications from the XS classic model to the XS advanced model.
GlossaryDeveloping roles in SAP HANA, July 2021 (PUBLIC) 3GlossaryFollowing abbreviations will be used throughout the document:Acronym MeaningAPI Application programming interfaceDU Delivery unitHDB SAP HANA databaseHDI SAP HANA deployment infrastructureLCM SAP HANA lifecycle managementUPS User provided serviceXSA SAP HANA extended application services, advanced modelXSC SAP HANA extended application services, classic model
PrefaceDeveloping roles in SAP HANA, July 2021 (PUBLIC) 4
Table of contentsDeveloping roles in SAP HANA, July 2021 (PUBLIC) 5TABLE OF CONTENTSDocument history.................................................................................................................................................................................... 2References ................................................................................................................................................................................................... 2Glossary ......................................................................................................................................................................................................... 31. Introduction .......................................................................................................................................................... 62. Preparation ........................................................................................................................................................... 72.1 Prerequisites ......................................................................................................................................................................... 72.2 SAP HANA release ............................................................................................................................................................ 73. What is changed from XSC to XSA? .................................................................................................... 83.1 Development Scenarios .............................................................................................................................................. 83.1.1 SAP HANA and XSC ..............................................................................................................................................................................83.1.2 SAP HANA and XSA ..............................................................................................................................................................................93.1.3 Orgs, spaces and projects ............................................................................................................................................................113.2 Database roles ................................................................................................................................................................. 133.2.1 Design-time roles created in XSC ...........................................................................................................................................133.2.2 Design-time roles created in XSA ...........................................................................................................................................133.2.3 Comparing design-time roles between XSC and XSA .............................................................................................144. HDI ............................................................................................................................................................................ 174.1 Container model ............................................................................................................................................................. 174.2 Container groups ............................................................................................................................................................ 174.3 Container isolation ........................................................................................................................................................ 184.4 Breaking the container isolation ......................................................................................................................... 205. Role development in XSA ....................................................................................................................... 215.1 The steps before development can start .................................................................................................... 215.2 Equip the HDI container with external privileges ................................................................................... 215.2.1 Between HDI containers in the same space ...................................................................................................................225.2.2 Between HDI containers in different spaces and external objects ...............................................................225.2.2.1 Using a UPS with a procedure grantor................................................................................................................. 235.2.2.2 GRANT to #OO user directly .................................................................................................................................... 245.3 Role development process .................................................................................................................................... 256. Best practices and recommendations .......................................................................................... 266.1 Organization and spaces .......................................................................................................................................... 266.2 Setup ....................................................................................................................................................................................... 266.3 Other considerations and hints ........................................................................................................................... 277. Migrating roles from XSC to XSA ........................................................................................................ 28