HA240 SAP HANA Authorizations, Scenarios & Security Requirements Collection: 11 Material number: 50133569
www.sap.com
SAP SE Copyrights and Trademarks © 2016 SAP SE. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. x Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. x IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. x Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. x Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. x Oracle is a registered trademark of Oracle Corporation x UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. x Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. x HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. x Java is a registered trademark of Sun Microsystems, Inc. x LabNetscape. x SAP, SAP Fiori, SAP SAPUI5, R/3, SAP Fiori, SAP NW Gateway, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and other countries. x Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. x Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
Lesson: SAP HANA Introduction and Overview
CONTENTS ABOUT THIS HANDBOOK .................................................................................................................................... 4 UNIT 1: INTRODUCTION INTO THE AREA OF SECURITY AND AUTHORIZATION ........................................ 5 Lesson: SAP HANA Introduction and Overview ................................................................................................ 6 Exercise 1: HANA Security administration interfaces ..................................................................................... 34 UNIT 2: REPOSITORY ......................................................................................................................................... 43 Lesson: Repository ............................................................................................................................................. 44 Demonstration 1: Work with Repository from HANA Studio and Web IDE ................................................... 53 UNIT 3: AUTHORIZATION INSIDE SAP HANA .................................................................................................. 57 Lesson: General Authorization Concept ........................................................................................................... 58 Lesson: Roles ...................................................................................................................................................... 66 Lesson: From Privileges and Roles Assignment to User Management ........................................................ 81 Exercise 2: Maintaining Users and Roles ....................................................................................................... 103 Lesson: Object Ownership ............................................................................................................................... 110 Lesson: Privileges ............................................................................................................................................. 115 Exercise 3: Create Classical Analytic Privileges............................................................................................ 153 Exercise 4: Create Dynamic Analytic Privileges ............................................................................................ 161 Exercise 5: Create SQL Analytic Privileges .................................................................................................... 165 Lesson: Information about users and authorizations ................................................................................... 169 UNIT 4: GENERAL SECURITY REQUIREMENTS AND SOLUTIONS ............................................................. 175 Lesson: Authentication and Single Sign-On .................................................................................................. 176 Lesson: Multitenant Database containers ...................................................................................................... 202 Lesson: Encryption ........................................................................................................................................... 215 Lesson: SAP GRC Integration for Governance Risk and Compliance ........................................................ 230 Lesson: SAP Netweaver Identity Management integration ........................................................................... 248 Lesson: Extended Application Services (XS) security and Application Privileges.................................... 256 UNIT 5: AUTHORIZATION TRACE AND AUDITING ........................................................................................ 269 Lesson: Authorization trace ............................................................................................................................ 270 Exercise 6: Authorization trace ........................................................................................................................ 279 Lesson: Audit Logging ..................................................................................................................................... 287 Exercise 7: Auditing .......................................................................................................................................... 299 UNIT 6: INTEGRATIVE AUTHORIZATION SCENARIOS ............................................................................... 301 Lesson: Scenarios introduction....................................................................................................................... 302 Lesson: Scenario BW + SAP HANA................................................................................................................. 313 Exercise 8: BW authorizations reuse by SAPHANA ..................................................................................... 327 Lesson: Business Object BI Platform 4.X and HANA Integration ................................................................ 344 Lesson : Reuse of ERP Authorizations in HANA Live and Smart Business Analytics applications ........ 355 UNIT 7: (OPTIONAL) HANA CLOUD SOLUTIONS........................................................................................... 377 Lesson: HANA Cloud Platform (HCP) security............................................................................................... 378 Lesson: HANA Enterprise Cloud security ...................................................................................................... 389
© 2016 Copyright. All rights reserved
HA240
3
Unit 1: Introduction into the Area of Security and Authorization
About This Handbook This handbook is intended to complement the instructor-led presentation of this course, and serve as a source of reference. American English is the standard used in this handbook. The following typographic conventions are also used: Use
Example/Visualization
Demonstration by Instructor A hint or advanced detail is shown or clarified by the instructor – please indicate reaching any of these points to the instructor Warning or Caution A word of caution – generally used to point out limitations or actions with potential negative impact that need to be considered consciously Hint A hint, tip or additional detail that helps increate performance of the solution or help improve understanding of the solution Additional information An indicator for pointing to additional information or technique beyond the scope of the exercise but of potential interest to the participant Discussion/Group Exercise Used to indicate that collaboration is required to conclude a given exercise. Collaboration can be a discussion or a virtual collaboration. User Interface Text Solution or SAP Specific term
© 2016 Copyright. All rights reserved
Find the Flavor Gallery button E.g. Flavors are transaction specific screen personaslization created and rendered using SAP Screen Personas.
HA240
4
Lesson: SAP HANA Introduction and Overview
Unit 1: Introduction into the Area of Security and Authorization
.
© 2016 Copyright. All rights reserved
HA240
5
Unit 1: Introduction into the Area of Security and Authorization
Lesson: SAP HANA Introduction and Overview
Figure 1: Learning Objective
The course material contains the security features available in SAP HANA SPS10 and also updates from HANA SPS11.
© 2016 Copyright. All rights reserved
HA240
6
Lesson: SAP HANA Introduction and Overview
Figure 2: SAP HANA as the powerful center of any data flow
For on premise deployment, SAP HANA comes either preinstalled on certified hardware provided by an SAP hardware partner (appliance) or you can realize the installation self-reliant. But the prerequisite for that is SAP HANA must be installed on certified hardware by a certified administrator. The installation itself is part of the course HA200 and there is a special certificate E_HANAINSxxy.
© 2016 Copyright. All rights reserved
HA240
7
Unit 1: Introduction into the Area of Security and Authorization
Figure 3: SAP HANA In-Memory Strategy
© 2016 Copyright. All rights reserved
HA240
8
Lesson: SAP HANA Introduction and Overview
Figure 4: Security - What is the goal?
© 2016 Copyright. All rights reserved
HA240
9
Unit 1: Introduction into the Area of Security and Authorization
Figure 5: Traditional security architecture
This is the standard security architecture available with products like SAP ECC, SAP BW or SAP CRM. The following layers are part of the architecture: Client Any possible client for the HANA Platform, this includes: SAP HANA Studio, Business Object BI Platform but also Web Browser, Analysis for Office, Office Excel, etc. Application Server In the common SAP Architecture this is normally the role of NetWeaver Application Server ABAP and/or Java. In this case the HANA Platform can also be the Application Server because it can act only as a database but also as a server for native functionalities and applications. Database HANA is a database at its core and can be used just like another relational database e.g. in a classical 3-tier deployment like Suite on HANA.
© 2016 Copyright. All rights reserved
HA240
10
Lesson: SAP HANA Introduction and Overview
Figure 6: Where are the end users in typical SAP HANA scenarios?
© 2016 Copyright. All rights reserved
HA240
11
Unit 1: Introduction into the Area of Security and Authorization
Figure 7: SAP HANA Security Architecture
© 2016 Copyright. All rights reserved
HA240
12
Lesson: SAP HANA Introduction and Overview
Figure 8: SAP HANA – Authentication and Single Sign-On
Access to SAP HANA data and applications is enabled by authentication functions Password policies, e.g. password length and complexity, can be defined to enforce password quality.
© 2016 Copyright. All rights reserved
HA240
13
Unit 1: Introduction into the Area of Security and Authorization
Figure 9: Logon to HANA
© 2016 Copyright. All rights reserved
HA240
14
Lesson: SAP HANA Introduction and Overview
Figure 10: Password policy
Passwords for the user name/password authentication of database users are subject to certain rules or password policy. You can change the default password policy in line with your organization’s security requirements. You cannot deactivate the password policy.
© 2016 Copyright. All rights reserved
HA240
15
Unit 1: Introduction into the Area of Security and Authorization
Figure 11: SAP HANA – Access channels
© 2016 Copyright. All rights reserved
HA240
16
Lesson: SAP HANA Introduction and Overview
Figure 12: SAP HANA – User management
© 2016 Copyright. All rights reserved
HA240
17
Unit 1: Introduction into the Area of Security and Authorization
Figure 13: SAP HANA – Role management
© 2016 Copyright. All rights reserved
HA240
18
Lesson: SAP HANA Introduction and Overview
Figure 14: SAP HANA - Authorization - Privilege types
© 2016 Copyright. All rights reserved
HA240
19
Unit 1: Introduction into the Area of Security and Authorization
Figure 15: Authorization concept: Roles and Privileges
© 2016 Copyright. All rights reserved
HA240
20
Lesson: SAP HANA Introduction and Overview
Figure 16: SAP HANA – Access privileges in details
© 2016 Copyright. All rights reserved
HA240
21
Unit 1: Introduction into the Area of Security and Authorization
Figure 17: SAP HANA – Secure communication
There are 3 main connection types that can be encrypted: 1. Client to server connections 2. Internal connection between HANA components (e.g. different HANA nodes in a scale-out system) 3. Connections between Data Center (e.g. for Disaster Recovery using HANA System Replication)
© 2016 Copyright. All rights reserved
HA240
22
Lesson: SAP HANA Introduction and Overview
Figure 18: Securing communication channels using TLS/SSL
© 2016 Copyright. All rights reserved
HA240
23
Unit 1: Introduction into the Area of Security and Authorization
Figure 19: SAP HANA – Data encryption
© 2016 Copyright. All rights reserved
HA240
24
Lesson: SAP HANA Introduction and Overview
Figure 20: Data encryption
© 2016 Copyright. All rights reserved
HA240
25
Unit 1: Introduction into the Area of Security and Authorization
Figure 21: SAP HANA – Audit logging
© 2016 Copyright. All rights reserved
HA240
26
Lesson: SAP HANA Introduction and Overview
Figure 22: Audit logging
© 2016 Copyright. All rights reserved
HA240
27
Unit 1: Introduction into the Area of Security and Authorization
Figure 23: SAP HANA – security administration
1. SAP HANA studio is the central development environment and main administration tool for SAP HANA 2. New web-based administration and monitoring tools SAP DB control center and SAP HANA cockpit 3. Web-based SAP HANA Web Development Workbench (WebIDE) for development 4. SAP HANA is fully integrated into SAP Solution Manager (not directly relevant for Security administration) Prerequisites for using the web-based tools: x x
SAP Note 1716423 - SAPUI5 Browser Support PAM for SAPUI5
© 2016 Copyright. All rights reserved
HA240
28
Lesson: SAP HANA Introduction and Overview
Figure 24: Monitoring and managing SAP HANA security
© 2016 Copyright. All rights reserved
HA240
29
Unit 1: Introduction into the Area of Security and Authorization
Figure 25: SAP HANA – security administration SAP HANA studio
© 2016 Copyright. All rights reserved
HA240
30
Lesson: SAP HANA Introduction and Overview
Figure 26: SAP HANA – security administration SAP HANA Cockpit
© 2016 Copyright. All rights reserved
HA240
31
Unit 1: Introduction into the Area of Security and Authorization
Figure 27: Monitoring security KPIs in the new security dashboard
© 2016 Copyright. All rights reserved
HA240
32
Lesson: SAP HANA Introduction and Overview
Figure 28: Important info sources
© 2016 Copyright. All rights reserved
HA240
33
Unit 1: Introduction into the Area of Security and Authorization
Exercise 1: HANA Security administration interfaces
Before starting All the exercises will be executed using a Virtual Desktop environment. The instructor will give you the details about server name for the connection. This VIrtual Desktop contains all the tools you need to perform the exercises. After the connection to the server when asked use the following login details for the connection to the server. 1. User: train-## (where ## are the the 2 digitis of your group number) 2. Password: initial When connected to the Virtual Desktop server use the following steps to open HANA Studio. 1. Click on the start button in the taskbar
2. Click on the arrow to scroll page
3. Locate "SAP HANA Studio" under S letter in the list and click on the icon to open the application 4. Confirm the Workspace Launcher screen with "OK" leaving the default folder
© 2016 Copyright. All rights reserved
HA240
34
Exercise 1: HANA Security administration interfaces
5. Click on Open Administration Console in order to start the exercise 1
6. Click on the blank area to add a new system and select "Add System..." 7. Provide the following data: x Hostname: wdflbmt7211 x Instance number: 01 8. Press next and provide the following data: x Username: STUDENT## (where ## is your group/student number) x Password: Training1 9. Provide a new password for your student user and confirm
© 2016 Copyright. All rights reserved
HA240
35
Unit 1: Introduction into the Area of Security and Authorization
Exercise Objectives After completing this exercise, you will be able to: x x
Open and navigate to the security administration view in SAP HANA Studio Open and navigate to the security web interface
Task 1: From the SAP HANA Studio client execute the following steps. 1. 2. 3. 4. 5.
Login with your STUDENT## user (where ## is your group ID) Navigate to the security folder Open the security console and navigate through the different available tabs Search and open your user under the Users section on the left navigation panel Double click on the role "TRAINING.HA240.Roles::STUDENT" to check which autorizations are assigned to your user
Task 2: Open the Security console on HANA Web-based Development Workbench and execute the following steps. 1. Open the Security Web Interface using the following link: http://wdflbmt7211:8001/sap/hana/ide/security/ ...alternatively in HANA Studio right click on your system (HDB) and open the SAP HANA Cockpit from Configuration and Monitoring menu item. Then when you are logged in with your STUDENT## user click on Manage Roles and Users 2. Login using your STUDENT## user and password 3. Open the security console and navigate through the different available tabs 4. Search and open your user under the Users section on the left navigation panel 5. Search and open the role TRAINING.HA240.Roles::STUDENT under the Users section on the left navigation panel to check which autorizations are assigned to your user 6. Switch to Editor interface using the Navigation button
© 2016 Copyright. All rights reserved
HA240
36
Exercise 1: HANA Security administration interfaces
Task 3: Execute the following steps from HANA Cockpit to prepare the list of applications you will use during the course. 1. In HANA Studio right click on your system (HDB) and open the SAP HANA Cockpit from Configuration and Monitoring menu item. 2. In the web page login with your STUDENT## (where ## is your group number) and the password you set previously in Task 1 3. Browse the SAP HANA Security Overview tiles 4. In the home page press on the change button in the bottom right part of the screen
5. Add the following Applications to "My Home" group x Manage Roles and Users x Assign Roles to Users 6. Click again the change button to exit from editing mode
7. Check the resulting home page screen 8. Open the "Assign Roles to Users" application
© 2016 Copyright. All rights reserved
HA240
37
Unit 1: Introduction into the Area of Security and Authorization
Solution of the Exercise 1
Task 1: 1. On the HANA Studio Welcome page click on Administration Console 2. On the left panel called Systems right click on the white area and select Add System 3. Specify the following information x Host Name: wdflbmt7211 x Instance Number: 01 4. Click on Next and specify the following information x User Name: STUDENT## (where ## is your group ID) x Password: Training1 5. Click on Finish 6. Expand the Security folder in the left panel 7. Double click on the Security entry to open the Security Console 8. Navigate through the different available tabs, without making any change, to check: x Auditing policies x Password policies x SAML Identity Providers configurations x Data Volume Encryption configuration 9. On the left panel right click on Users and select Find User 10. Type your user name (STUDENT##) , select the result and click on OK to open the user definition 11. Check the roles assigned to your user 12. On the left panel right click on Roles and select Find Role 13. Type just part of the following role name "TRAINING.HA240.Roles::STUDENT", select the result and click on Ok to open the role definition 14. Check the roles assigned to your user 15. Check which autorizations are assigned to your user within this role 16. Close all the opened tabs
© 2016 Copyright. All rights reserved
HA240
38
Exercise 1: HANA Security administration interfaces
Task 2: Open the broswer (internet Explorer or Chrome) and paste the following link: http://wdflbmt7211:8001/sap/hana/ide/security/ ...alternatively in HANA Studio right click on your system (HDB) and open the SAP HANA Cockpit from Configuration and Monitoring menu item. Then when you are logged in with your STUDENT## user click on Manage Roles and Users 1. Login using your STUDENT## user and password 2. Right click on the Security object from the left panel and click on Open Security console
3. Navigate through the different available tabs and check the similarity with the same interface in SAP HANA Studio 4. On the left panel right click on Users and select Search (Ctrl+Shift+F) 5. Type your user name (STUDENT##) , select the result and click on Ok to open the user definition 6. Check the roles assigned to your user 7. On the left panel right click on Roles and select Search (Ctrl+Shift+F) 8. Type the following role name "TRAINING.HA240.Roles::STUDENT", select the result and click on Ok to open the role definition 9. Check the roles assigned to your user 10. Check which autorizations are assigned to your user within this role 11. Switch to Editor interface using the Navigation button
12. Check the content of the editor view and check the address generate for this interface (in the following exercises this interface will be used for role creation)
© 2016 Copyright. All rights reserved
HA240
39
Unit 1: Introduction into the Area of Security and Authorization
Task 3: 1. In HANA Studio right click on your system (HDB) and open the SAP HANA Cockpit from Configuration and Monitoring menu item or use the following link: http://wdflbmt7211:8001/sap/hana/admin/cockpit/ 2. In the web page login with your STUDENT## (where ## is your group number) and the password you set previously in Task 1 3. Browse the SAP HANA Security Overview tiles 4. In the home page press on the change button in the bottom right part of the screen
5. Scroll the screen up and click on button + on the Group name "My Home" 6. Search the application "Manage Roles and Users" in the list 7. Click on the check button below the Icon
8. Select "My Home" group and press OK
© 2016 Copyright. All rights reserved
HA240
40
Exercise 1: HANA Security administration interfaces
9. Execute steps from 4 to 6 also for the following application: x Assign Roles to Users 10. Click again the change button to exit from editing mode
11. Check the resulting home page screen 12. Click on "Assign Roles to Users" application
© 2016 Copyright. All rights reserved
HA240
41
Unit 1: Introduction into the Area of Security and Authorization
© 2016 Copyright. All rights reserved
HA240
42
Exercise 1: HANA Security administration interfaces
Unit 2: Repository
© 2016 Copyright. All rights reserved
HA240
43
Unit 2: Repository
Lesson: Repository
Figure 29: Learning Objective
© 2016 Copyright. All rights reserved
HA240
44
Lesson: Repository
Figure 30: Terminology: repository - Where design-time objects reside
The SAP HANA database repository is structured hierarchically with packages assigned to other packages as sub-packages. In the SAP HANA repository, a distinction is made between native and imported packages. Native packages are packages that were created in the current system and should therefore be edited in the current system. Imported packages from another system should not be edited, except by newly imported updates. An imported package should only be manually edited in exceptional cases. If you grant privileges to a user for a package, the user is automatically also authorized for all corresponding sub packages.
© 2016 Copyright. All rights reserved
HA240
45
Unit 2: Repository
Figure 31: _SYS_REPO Authorization in the Repository
_SYS_REPO must be explicitly authorized for objects that are not created in the repository but on which repository objects are modeled.
© 2016 Copyright. All rights reserved
HA240
46
Lesson: Repository
Figure 32: Proposed Repository Layout
© 2016 Copyright. All rights reserved
HA240
47
Unit 2: Repository
Figure 33: Proposed Repository Layout - Naming convention
© 2016 Copyright. All rights reserved
HA240
48
Lesson: Repository
Figure 34: Managing Repository Objects Deleting objects, Changing objects
© 2016 Copyright. All rights reserved
HA240
49
Unit 2: Repository
Figure 35: Transporting Repository Objects
Prerequisite for the classical ABAP transports with " HANA Transport Container" is NetWeaver 7.4.
© 2016 Copyright. All rights reserved
HA240
50
Lesson: Repository
Figure 36: Procedures in definer mode: What’s the deal?
© 2016 Copyright. All rights reserved
HA240
51
Unit 2: Repository
Figure 37: Implications of using definer mode
© 2016 Copyright. All rights reserved
HA240
52
Demonstration 1: Work with Repository from HANA Studio and Web IDE
Demonstration 1: Work with Repository from HANA Studio and Web IDE
Demonstration Objectives x x
Show how is possible to work with the repository from HANA Studio and what are the required steps Show how the same work can be done using Web IDE and what are the steps in this case
Task 1: From the SAP HANA Studio client the instructor will execute the following steps. 1. Open the "SAP HANA Development" perspective x Click on Window >> Perspective >> Open Perspective x Select SAP HANA Development (if not available select Other... and search for SAP HANA Development) 2. Click on Repository tab in the left panel and import remote workspace for system HDB x Expand the system HDB on tab Repository x Right click on (Default) and click "Import Remote Workspace..." x Click "Continue" to confirm the import 3. Go to tab Project Explorer and create a new project x On tab Project Explorer right click on the blank area and select New >> Project x Select General >> Project and click on Next x Call project "Playground1" and choose Next x Click on Finish
© 2016 Copyright. All rights reserved
HA240
53
Unit 2: Repository
4. Share the project with the Repository x Right click on the new project and select Team >> Share Project... x Select the workspace just created on step 2 x Click on Broswe to select the Repository target package x Navigate to package TRAINING.HA240.Playground and confirm the selction screen 1. If package Playgroung does not exist create the package before sharing the project x Unselect option "Add Project Folder as Subpackage" x Click finish to confirm 5. Create a new repository object of type schema and show the resulting catalog object x On the Project Explorer tab right click on the new project and select New >> Other... x Type "Schema" on the selection screen x Select object Schema under SAP HANA > Database Development and click on Next x Type DEMO_SCHEMA as file name and select teamplate "Basic" x Select "Finish" 6. Activate the new object x Right click on the object just created (DEMO_SCHEMA.hdbschema) and click on Team >> Activate x Wait the operation to be completed and check the result on the Job Log view 7. Show the results on Repository tab x Switch to Repository tab and open the object "DEMO_SCHEMA.hdbschema" under TRAINING >> HA240 >> Playground 8. Show the object in the catalog x Switch to "Systems" tab x The new schema is not visible under "Catalog" folder because not yet authorized for any user x To check the new schema execute the following statement from the SQL console: SELECT * FROM SCHEMAS WHERE SCHEMA_NAME = 'DEMO_SCHEMA'
© 2016 Copyright. All rights reserved
HA240
54
Demonstration 1: Work with Repository from HANA Studio and Web IDE
Task 2: From the Web IDE tool the instructor will execute the following steps. 1. Open Web IDE Editor using the following URL: http://wdflbmt7211:8001/sap/hana/ide/editor/ 2. Authenticate using STUDENT00 user (password: Training1) 3. Create a new schema under the same package used on Task1 x Broswe the catalog: TRAINING >> HA240 >> Playground x Right click on New >> File x Create a file named "DEMO_SCHEMA_2.hdbschema" x Insert the following line in the file: schema_name = "DEMO_SCHEMA_2"; 4. Activate the new object x Right click on the object name in the left panel and click on "Activate" x Check the gray panel on the buttom for the result 5. Show the results on Repository tab in HANA Studio and on the catalog x Go back to HANA Studio and open the SAP HANA Development prospective x Switch to Repository tab and open the object "DEMO_SCHEMA_2.hdbschema" under TRAINING >> HA240 >> Playground (refresh if not visible) x Switch to "Systems" tab x The new schema is not visible under "Catalog" folder because not yet authorized for any user x To check the new schema execute the following statement from the SQL console: SELECT * FROM SCHEMAS WHERE SCHEMA_NAME = 'DEMO_SCHEMA_2' NOTE: From WebIDE we were able to develop objects without creating a project and without configuring the workspace.
© 2016 Copyright. All rights reserved
HA240
55
Unit 2: Repository
© 2016 Copyright. All rights reserved
HA240
56
Demonstration 1: Work with Repository from HANA Studio and Web IDE
Unit 3: Authorization Inside SAP HANA
© 2016 Copyright. All rights reserved
HA240
57
Unit 3: Authorization Inside SAP HANA
Lesson: General Authorization Concept
Figure 38: Learning Objective
© 2016 Copyright. All rights reserved
HA240
58
Lesson: General Authorization Concept
Figure 39: Authorization administration
© 2016 Copyright. All rights reserved
HA240
59
Unit 3: Authorization Inside SAP HANA
Figure 40: Tools for authorization administration SAP HANA studio
© 2016 Copyright. All rights reserved
HA240
60
Lesson: General Authorization Concept
Figure 41: Tools for authorization administration Web based editor
You can call the Web based editor directly or from SAP HANA cockpit. This editor allows the creation of Repository Roles without any Development prospective and projct setup (required in HANA Studio). From the technical side this editor is part of: SAP HANA Web-based Developer Workbench. For using this workbench all the necessary privileges are bundled in the following role: sap.hana.xs.ide.roles::EditorDeveloper sap.hana.xs.ide.roles::SecurityAdmin sap.hana.security.cockpit.roles::EditAssignedRoles
© 2016 Copyright. All rights reserved
HA240
61
Unit 3: Authorization Inside SAP HANA
Figure 42: Basic Authorization entities
© 2016 Copyright. All rights reserved
HA240
62
Lesson: General Authorization Concept
Figure 43: Relationships between Entities
Privileges can be assigned to users directly or indirectly using roles. Privileges are required to model access control. Roles can be used to structure the access control scheme and model reusable business roles. It is recommended to manage authorization for users by using roles. Roles can be nested so that role hierarchies can be implemented. This makes them very flexible, allowing very fine- and coarse grained authorization management for individual users. All the privileges granted directly or indirectly to a user are combined. This means whenever a user tries to access an object, the system performs an authorization check using the user, the user's roles, and directly allocated privileges.
© 2016 Copyright. All rights reserved
HA240
63
Unit 3: Authorization Inside SAP HANA
It is not possible to explicitly deny privileges. This means that the system does not need to check all the user roles. As soon as all requested privileges have been found, the system aborts the check and grants access. Several predefined roles exist in the database. Some of them are templates that need to be customized; others can be used as they are. User management is configured using SAP HANA Studio and Web based editor.
Figure 44: Authorization Example
© 2016 Copyright. All rights reserved
HA240
64
Lesson: General Authorization Concept
Figure 45: Authorization design process
© 2016 Copyright. All rights reserved
HA240
65
Unit 3: Authorization Inside SAP HANA
Lesson: Roles
After completing this lesson, you will be able to: x x x x x
Create and use Runtime Roles Grant and revoke Runtime Roles Explain difference between Catalog and Repository Roles Create and use Repository Roles Know common pre-delivered roles
Figure 46: Define and Create Roles
© 2016 Copyright. All rights reserved
HA240
66
Lesson: Roles
In HANA there are 2 different type of roles and this lesson contains the details about the differences. But first of all is important to understand the naming and the synonyms associated to that. x
Repository Roles x Also called: Design-time roles
x
Catalog Roles x Also called: Runtime Roles
Figure 47: Properties of Catalog Roles
Runtime Role management has several challenges, especially with regards to revocation of privileges and roles.
© 2016 Copyright. All rights reserved
HA240
67
Unit 3: Authorization Inside SAP HANA
Figure 48: Creating Catalog Roles
© 2016 Copyright. All rights reserved
HA240
68
Lesson: Roles
Figure 49: Difficulties with catalog roles Creation / Modification
© 2016 Copyright. All rights reserved
HA240
69
Unit 3: Authorization Inside SAP HANA
Figure 50: Less known properties of catalog roles revoking of roles
© 2016 Copyright. All rights reserved
HA240
70
Lesson: Roles
Figure 51: Properties of Repository Roles
© 2016 Copyright. All rights reserved
HA240
71
Unit 3: Authorization Inside SAP HANA
Figure 52: Creating Repository Roles Create transportable roles with design time and run time representation
© 2016 Copyright. All rights reserved
HA240
72
Lesson: Roles
Figure 53: Repository role editor (I)
A graphical editor for repository roles is available since SPS10 as part of the SAP HANA Web-based Development Workbench (Web IDE) yIn earlier versions, only a text editor in SAP HANA studio was available. yThere are two types of roles in SAP HANA: catalog roles and repository roles. For most use cases it is recommended to use repository roles. Compared to catalog roles, they offer several advantages, e.g. - Versioning - Integration with standard transport mechanisms - Decoupling of role creation from role granting/revoking Î Support for standard DEV Æ QA Æ PROD landscapes Î Separation of duties Role lifecycle 1. A developer/role designer creates the role in the repository of the development system and tests it 2. The role is transported to the production system, e.g. using HALM or CTS+ 3. In the production system, a user administrator grants the role to end users
© 2016 Copyright. All rights reserved
HA240
73
Unit 3: Authorization Inside SAP HANA
Figure 54: Repository role editor (II)
Web-based administration and development tools As part of the general SAP UI strategy, administration and development functions are being made available in web-based tools such as SAP HANA Cockpit and SAP HANA Web-based Development Workbench (Web IDE). One of the prerequisites for using these functions is a web browser with SAPUI5 support. Information on web browsers with SAPUI5 support SAP Note 1716423 - SAPUI5 Browser Support PAM for SAPUI5: https://websmp130.sapag.de/sap(bD1lbiZjPTAwMQ==)/support/pam/pam.html?smpsrv=https%3A%2F%2Fwebsmp105.sapag.de#pvnr=01200314690900004969&pt=t%7CWBRPFM&ainstnr=01200314694900015214&ts=0
© 2016 Copyright. All rights reserved
HA240
74
Lesson: Roles
Figure 55: Accessing the web-based user and catalog role editors in Web IDE
© 2016 Copyright. All rights reserved
HA240
75
Unit 3: Authorization Inside SAP HANA
Figure 56: Transporting Repository Roles
© 2016 Copyright. All rights reserved
HA240
76
Lesson: Roles
Figure 57: Repository roles vs. Catalog roles
© 2016 Copyright. All rights reserved
HA240
77
Unit 3: Authorization Inside SAP HANA
Figure 58: How can you manage roles safely (and respecting typical compliance requirements)
© 2016 Copyright. All rights reserved
HA240
78
Lesson: Roles
Figure 59: Standard Catalog Roles
Several catalog roles are delivered with the SAP HANA database. You should not use these roles directly, but instead use them as templates for creating your own roles. MODELING: Contains all privileges required for using the information modeler in the SAP HANA studio. Contains the database authorization for a modeler to create all kinds of views and Analytic Privileges. Allows access to all data in activated views without any filter (_SYS_BI_CP_ALL Analytic Privilege). However, this is restricted by missing SQL Privileges on those activated objects. Note: Use caution when using the _SYS_BI_CP_ALL Analytic Privilege. Use this predefined role as a template. MONITORING: Contains privileges for full read-only access to all meta data, the current system status in system and monitoring views, and the data of the statistics server.
© 2016 Copyright. All rights reserved
HA240
79
Unit 3: Authorization Inside SAP HANA
PUBLIC: Contains privileges for filtered read-only access to the system views. Only objects for which the users have access rights are visible. By default, this role is assigned to each user except for "Restricted Users" CONTENT_ADMIN: Contains the same privileges as the MODELING role, but with the extension that users allocated this role are allowed to grant these privileges to other users. In addition, it contains repository privileges for working with imported objects. Use this role as a template for what content administrators might need as privileges. SAP_INTERNAL_HANA_SUPPORT: Contains privileges for full read-only access to all metadata, the current system status in system and monitoring views, and the data of the statistics server. Additionally it contains the privileges to access the base information of the system and monitoring views (this information is otherwise only available to the SYSTEM user). For security reasons, the following restrictions apply: - It cannot be granted to user SYSTEM - It cannot be granted to more than one user at a time - It cannot be granted to another role - No role can be granted to it - Only system privileges can be granted to this role
Figure 60: Summary
© 2016 Copyright. All rights reserved
HA240
80
Lesson: From Privileges and Roles Assignment to User Management
Lesson: From Privileges and Roles Assignment to User Management
Figure 61: Assign Privileges to Roles
© 2016 Copyright. All rights reserved
HA240
81
Unit 3: Authorization Inside SAP HANA
Figure 62: Assign Privileges to Catalog Roles
Remember: ROLE ADMIN is required and all the privileges assigned to the roles have to be already assigned to the role creator with GRANT OPTION. Caution: Errors during save Typically: missing privilege for editing user (USER ADMIN) Or missing grant option: For Object/Privilege combinations: on object For direct privilege assignment: on privilege
© 2016 Copyright. All rights reserved
HA240
82
Lesson: From Privileges and Roles Assignment to User Management
Figure 63: Assign Privileges to Repository Roles
Remember: In this case ROLE ADMIN is not required and privileges are checked against _SYS_REPO user during activation (not checked on the role creator).
© 2016 Copyright. All rights reserved
HA240
83
Unit 3: Authorization Inside SAP HANA
Figure 64: Create Users
There is also the possibility to create HANA users and assign roles via NetWeaver ABAP transaction SU01. Details about this options will follow in Unit 6.
© 2016 Copyright. All rights reserved
HA240
84
Lesson: From Privileges and Roles Assignment to User Management
Figure 65: Different User types: Database Users
It is often necessary to specify different security policies for different types of database user. In the SAP HANA database, we differentiate between database users that correspond to real people and internal database users. Note! Database users that correspond to real people are dropped when the person leaves the organization. This means that any database objects that they own are also automatically dropped, and any privileges that they granted are automatically revoked. Compared to standard database users, restricted users are initially limited in the following ways: x x x
They cannot create objects in the database as they are not authorized to create objects in their own database schema. They cannot view any data in the database as they are not granted (and cannot be granted) the standard PUBLIC role. They are only able to connect to the database using HTTP.
For restricted users to connect via ODBC or JDBC, access for client connections must be enabled as follows: ALTER USER ENABLE CLIENT CONNECT. For full access to ODBC or JDBC functionality users also require the standard role RESTRICTED_USER_ODBC_ACCESS or
© 2016 Copyright. All rights reserved
HA240
85
Unit 3: Authorization Inside SAP HANA
RESTRICTED_USER_JDBC_ACCESS.
Figure 66: Control allowed access channels for users
Restricted users By default all restricted users are enabled only for HTTP(S) access channel to HANA. You can change this behavior after the creation enabling JDBC/ODBC access.
© 2016 Copyright. All rights reserved
HA240
86
Lesson: From Privileges and Roles Assignment to User Management
Figure 67: Different User types: Internal Database Users
The SYSTEM database user is the Bootstrapping-User. With it you can realize the inital system set and to create other database users, access system tables, and so on. Note however that SYSTEM database user does not automatically have access to objects created in the SAP HANA repository. The recommendation from SAP is to inactivate thus user for commence operation!
adm user ( where is the ID of the SAP HANA system) The adm user is an operating system user and is also referred to as the operating system administrator. This operating system user has unlimited access to all local resources related to SAP systems. This user is not a database user but a user at the operating system level.
© 2016 Copyright. All rights reserved
HA240
87
Unit 3: Authorization Inside SAP HANA
HINT: The following users are internal users, means that is impossible to log on in the database with them. x x x x
x
SYS - is an internal database user. It is the owner of database objects such as system tables and monitoring views. _SYS_AFL - is an internal user that owns all objects for Application Function Libraries _SYS_EPM - is an internal database used by the SAP Performance Management (SAP EPM) application _SYS_REPO - is an internal database user used by the SAP HANA repository. The repository consists of packages that contain design time versions of various objects, such as attribute views, analytic views, calculation views, procedures, analytic privileges, and roles. _SYS_REPO is the owner of all objects in the repository, as well as their activated runtime versions. _SYS_STATISTICS - is an internal database user used by the internal monitoring mechanism of the SAP HANA database. It collects information about status, performance, and resource usage from all components of the database and issues alerts if necessary.
HINT: What to do in an emergency situation? You have to reset the SYSTEM password In this case the following mechanism for resetting the SYSTEM user password is available x x x x x x x x
Prerequisite: Credentials of the operating system administrator adm, access to the master index server As adm, log on to the server on which the master index server is running On the command line, shut down the SAP HANA system, then start the name, compile and index servers Use the following command to reset the password /exe/hdbindexserver -resetUserSystem Afterwards, the index server is automatically stopped End the name and compile server processes On the command line, start the SAP HANA system
You can find this emergency procedure in SAP HANA Administration guide too. Note! In a system with multitenant database containers, you can reset the passwords of the SYSTEM users in the same way by starting the name server (for the system database) or index server (for tenant databases) in emergency mode.
© 2016 Copyright. All rights reserved
HA240
88
Lesson: From Privileges and Roles Assignment to User Management
Figure 68: Creating named Users in SAP HANA Studio
Figure 69: Creating named Users Using SQL
© 2016 Copyright. All rights reserved
HA240
89
Unit 3: Authorization Inside SAP HANA
Figure 70: Modifying users
© 2016 Copyright. All rights reserved
HA240
90
Lesson: From Privileges and Roles Assignment to User Management
Figure 71: User Self Service Tools
By default, SAP HANA user self-service tools are disabled; the tools are neither visible in the user interface nor configured in SAP HANA. To provide access to embedded tools that enable users to request the creation of a new user account in the SAP HANA database or set a new password, the SAP HANA administrator must activate and set up the user self-service feature. For more information you can check SAP HANA Administration guide.
© 2016 Copyright. All rights reserved
HA240
91
Unit 3: Authorization Inside SAP HANA
Figure 72: User Self Services - Web-based user self-services
© 2016 Copyright. All rights reserved
HA240
92
Lesson: From Privileges and Roles Assignment to User Management
Figure 73: User Self Services - Configuration
© 2016 Copyright. All rights reserved
HA240
93
Unit 3: Authorization Inside SAP HANA
Figure 74: User Self Services - Reset password
© 2016 Copyright. All rights reserved
HA240
94
Lesson: From Privileges and Roles Assignment to User Management
Figure 75: User Self Services - Request new user
© 2016 Copyright. All rights reserved
HA240
95
Unit 3: Authorization Inside SAP HANA
Figure 76: User Self Services - Approval for new users
© 2016 Copyright. All rights reserved
HA240
96
Lesson: From Privileges and Roles Assignment to User Management
Figure 77: User Management - What are the options?
© 2016 Copyright. All rights reserved
HA240
97
Unit 3: Authorization Inside SAP HANA
Figure 78: Grant Roles to User
© 2016 Copyright. All rights reserved
HA240
98
Lesson: From Privileges and Roles Assignment to User Management
Figure 79: Grant Catalog Roles to User
Note: System Privilege ROLE ADMIN supersedes this GRANT OPTION Caution: Errors during save Typically: missing privilege for editing role: Or missing grant option: E.g.: System privilege ROLE ADMIN missing Or (without ROLE ADMIN): GRANT OPTION for the role missing
© 2016 Copyright. All rights reserved
HA240
99
Unit 3: Authorization Inside SAP HANA
Figure 80: Revoke Catalog Roles from User
Note on Cascaded Dropping of Privileges If the user had granted the role to other users, revoking the role (and the grant option) also revokes the role from these grantee Remember: Only grantor can revoke a catalog role from a user
© 2016 Copyright. All rights reserved
HA240
100
Lesson: From Privileges and Roles Assignment to User Management
Figure 81: Repository Roles - Granting and Revoking Privileges on Activated Repository Objects
It is not possible to use the standard GRANT and REVOKE because objects belong to _SYS_REPO user This is covered automatically in all the graphical tools (HANA Studio and Web-based) so the stored procedure are not required in that case.
© 2016 Copyright. All rights reserved
HA240
101
Unit 3: Authorization Inside SAP HANA
Syntax: CALL GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT ('','',''/'') CALL REVOKE_PRIVILEGE_ON_ACTIVATED_CONTENT ('','',''/'') CALL GRANT_ACTIVATED_ANALYTICAL_PRIVILEGE ('',''/'') CALL REVOKE_ACTIVATED_ANALYTICAL_PRIVILEGE ('',''/'') CALL GRANT_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT ('','',''/'') CALL REVOKE_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT ('','',''/'') CALL GRANT_APPLICATION_PRIVILEGE ('',''/'') CALL REVOKE_APPLICATION_PRIVILEGE ('',''/'') CALL GRANT_ACTIVATED_ROLE ('',''/'') CALL REVOKE_ACTIVATED_ROLE ('',''/'')
Figure 82: Grant Repository Roles to User in HANA Cockpit
© 2016 Copyright. All rights reserved
HA240
102
Exercise 2: Maintaining Users and Roles
Exercise 2: Maintaining Users and Roles
Exercise Objectives After completing this exercise, you will be able to: x x x x
Create roles Assign privileges to a role Create a user Assign roles to a user
Task 1: You need a user with authorizations for database administration. This database administrator should perform the following tasks: x x x x
All actions that any DB administrator will expect they are allowed to do and that Are not specific to data schemas or repository packages. All backup-related tasks. Create new database schemas and to Import and Export catalog objects.
Create the roles which allow performing these administrative tasks.
© 2016 Copyright. All rights reserved
HA240
103
Unit 3: Authorization Inside SAP HANA
1.
Create a new repository role BASIC_ADMIN_## (where ## is your group numer) in package TRAINING.HA240.Roles. This role collects all actions that any DB administrator will expect they are allowed to do and that are not specific to data schemas or repository packages. Therefore the following privileges should be granted:
Privilege
What does it do?
System privilege CATALOG READ
Read access to all metadata of the database catalog. Among other things, required to enter into the administration editor of SAP HANA studio
System privilege SERVICE ADMIN
Start and stop individual services(processes) of the database
System privilege INIFILE ADMIN
Modify the database configuration
System privilege TRACE ADMIN
Start and stop database traces, change the trace levels of the kernel trace
System privilege SESSION ADMIN
Kill sessions
System privilege VERSION ADMIN
Trigger garbage collection of the database’s version history (part of MVCC implementation)
System privilege LICENSE ADMIN
Install or delete license key
SELECT on schema _SYS_STATISTICS
Read alerts of the statistics server process
2.
Create a new repository role BACKUP_ADMIN_# (where ## is your group numer) in package TRAINING.HA240.Roles. This role allows all backup-related tasks, such as creating a database backup or managing the backup catalog or deleting backups from disk. Therefore the following privileges should be granted:
Privilege
What does it do?
System privilege CATALOG READ
Read access to all metadata of the database catalog
System privilege BACKUP ADMIN
Access to all backup functionalities except for restore (which requires OS user credentials)
© 2016 Copyright. All rights reserved
HA240
104
Exercise 2: Maintaining Users and Roles
3.
Create a new repository role DATA_ADMIN_## (where ## is your group numer) in package TRAINING.HA240.Roles. This role defines a user who can create new database schemas directly in the catalog and import and export catalog objects. Therefore the following privileges should be granted:
Privilege
What does it do?
System privilege CREATE SCHEMA
Create new schemas directly in the database catalog
System privilege EXPORT
Export catalog objects to the DB server (csv/binary) or to the client machine
System privilege IMPORT
Import catalog objects from the DB server (csv/binary) or from the client machine
Add also SELECT on schema TRAINING in order to be able to complete task number 1 in task 3. Task 2: Create a user named ADMIN##, where ## is your group ID. Assign the database administration roles you have just created to this user. Then confirm that your user has been created. After you have created the user successfully, you can log on and add the user to the Navigator View of the HANA studio. Then confirm that your user’s schema has been created under Catalog. 1. 2. 3. 4.
Create a user named ADMIN##, where ## is your group ID. Assign the roles BASIC_ADMIN_##, BACKUP_ADMIN_##, and DATA_ADMIN_## to this user. Confirm that your user has been created Add the user to the Navigator View of the HANA studio.
Task 3: Check the authorizations of the user ADMIN##. 1. Check if the user ADMIN## is authorized to export table TRAINING.STUDENTS 2. Check if the user ADMIN## is authorized to view the content of Backup Catalog 3. Check if the user ADMIN## is authorized to view and change configuration Parameters
© 2016 Copyright. All rights reserved
HA240
105
Unit 3: Authorization Inside SAP HANA
Solution of Exercise 2
Task 1: 1. Create a new role BASIC_ADMIN_##. This role collects all actions that any DB administrator will expect they are allowed to do and that are not specific to data schemas or repository packages. Therefore the following privileges should be granted 1. Open the Editor web interface to create the Repository role using the following URL: http://wdflbmt7211:8001/sap/hana/ide/editor/ 2. Login with your STUDENT## user and password 3. Right click on package TRAINING.HA240.Roles and choose New and then select Role 4. Type the following role name and confirm: BASIC_ADMIN_## (where ## is your group ID) 5. Select the System Privilege tab and add the following objects using the button + ( ) 1. CATALOG READ, SERVICE ADMIN, INIFILE ADMIN, TRACE ADMIN, SESSION ADMIN, VERSION ADMIN, LICENSE ADMIN 6. Select Object Privileges tab and add the following object using the button + ( 1. Select Run-time instead of Design-time 2. Select Schema as Object Type 3. Selct schema _SYS_STATISTIC and confirm with Ok 4. In the right pane (Privileges) mark only SELECT authorization
)
7. Save the result with Save button ( ) 8. Access the web Security console (with this link: http://wdflbmt7211:8001/sap/hana/ide/security/) or HANA Studio Security folder and check the new role 1. Role name is composed by ::
© 2016 Copyright. All rights reserved
HA240
106
Exercise 2: Maintaining Users and Roles
2. Create a new role BACKUP_ADMIN_#. This role allows all backup-related tasks, such as creating a database backup or managing the backup catalog or deleting backups from disk. Therefore the following privileges should be granted: 1. Open the Editor web interface to create the Repository role using the following URL: http://wdflbmt7211:8001/sap/hana/ide/editor/ 2. Login with your STUDENT## user and password 3. Right click on package TRAINING.HA240.Roles and choose New and then select Role 4. Type the following role name and confirm: BACKUP_ADMIN_## (where ## is your group ID) 5. Select the System Privilege tab and add the following objects using the button + ( 1. CATALOG READ, BACKUP ADMIN
)
6. Save the result with Save button ( ) 7. Access the web Security console (with this link: http://wdflbmt7211:8001/sap/hana/ide/security/) or HANA Studio Security folder and check the new role 1. Role name is composed by :: 3. Create a new role DATA_ADMIN_##. This role defines a user who can create new database schemas directly in the catalog and import and export catalog objects. Therefore the following privileges should be granted: 1. Open the Editor web interface to create the Repository role using the following URL: http://wdflbmt7211:8001/sap/hana/ide/editor/ 2. Login with your STUDENT## user and password 3. Right click on package TRAINING.HA240.Roles and choose New and then select Role 4. Type the following role name and confirm: DATA_ADMIN_## (where ## is your group ID) 5. Select the System Privilege tab and add the following objects using the button + ( 1. CREATE SCHEMA, EXPORT, IMPORT 6. Select Object Privileges tab and add the following object using the button + ( 1. Select Run-time instead of Design-time 2. Select Schema as Object Type 3. Selct schema TRAINING and confirm with Ok 4. In the right pane (Privileges) mark only SELECT authorization
) )
7. Save the result with Save button ( ) 8. Access the web Security console (with this link: http://wdflbmt7211:8001/sap/hana/ide/security/) or HANA Studio Security folder and check the new role 1. Role name is composed by ::
© 2016 Copyright. All rights reserved
HA240
107
Unit 3: Authorization Inside SAP HANA
Task 2: Create a user named ADMIN##, where ## is your group ID. Assign the database administration roles you have just created to this user. Then confirm that your user has been created. After you have created the user successfully, you can log on and add the user to the Navigator View of the HANA studio. Then confirm that your user’s schema has been created under Catalog. 1. Access the web Security console (with this link: http://wdflbmt7211:8001/sap/hana/ide/security/) or HANA Studio with your STUDENT## user 2. Right click on Users and select option New User 3. Maintain the following properties: 1. User Name: ADMIN## 2. Under Authentication: Password and Confirm with the initial password 4. In the tab Granted Roles press the + button and select the following roles that you have created in the previous Task 1. TRAINING.HA240.Role::BASIC_ADMIN_##, TRAINING.HA240.Roles::BACKUP_ADMIN_##, and TRAINING.HA240.Roles::DATA_ADMIN_## 5. Save the user 6. Confirm that your user has been created refreshing the Users folder 1. NOTE: Role PUBLIC has been automatically assigned 7. Add the user to the Navigator View of the HANA studio with initial password you have defined Task 3: Check the authorizations of the user ADMIN##. 1. Check if the user ADMIN## is authorized to export table TRAINING.STUDENTS 1. In SAP HANA Studio login with ADMIN## user 1. Right click on "HDB (STUDENT##) 2. Select option "Add System with Different User" 3. Specify user ADMIN## and password 2. Navigate to Catalog > Training > Tables and search for STUDENTS 3. Right click on STUDENTS table and select Export... 4. On the new window check that only STUDENTS table is listed in the right column and click on Next 5. Select option Export catalog objects to current client 6. Press button Browse... and select an empty folder (e.g. a new empty folder under Documents) 7. Press on Finish 8. Check that the folder now contains the table structure
© 2016 Copyright. All rights reserved
HA240
108
Exercise 2: Maintaining Users and Roles
2. Check if the user ADMIN## is authorized to read the backup catalog 1. In the Navigator view of in SAP HANA studio, select the database (database user ADMIN##). 2. Right click on the root entry and from the context menu, choose %DFNXSDQG5HFRYHU\ĺ2SHQ backup console. 3. On the resulting view select the Backup Catalog tab 4. On the Backup Catalog tab select one on the backups available 5. Check on the right columns the details about the backup (e.g. Duration, Size, Throughput) 3. Check if the user ADMIN## is authorized to view and change configuration Parameters 1. Open the Administration Editor with the permissions of the SYSTEM user. Double-click the HANA system entry that is using the ADMIN## user for connection. 2. Click the Configuration tab. 3. To search for the parameter content_vendor, type a few characters (like Content) in the field Filter. Then it will search all the parameters according to what you are typing. 4. Double-click the parameter content_vendor. The parameter is located in the file indexserver.ini in the repository section. 5. You are authorized to perform this action.
© 2016 Copyright. All rights reserved
HA240
109
Unit 3: Authorization Inside SAP HANA
Lesson: Object Ownership
Figure 83: Security: Owner vs. schema How HANA handles ownership of catalog objects
Note: Restricted users cannot create objects in the database as they are not authorized to create objects in their own database schema.
© 2016 Copyright. All rights reserved
HA240
110
Lesson: Object Ownership
Figure 84: Security: Dropping of DB users Impact of dropping with “cascade”
© 2016 Copyright. All rights reserved
HA240
111
Unit 3: Authorization Inside SAP HANA
Figure 85: Security: Dropping DB accounts safely UI support in SAP HANA Studio
© 2016 Copyright. All rights reserved
HA240
112
Lesson: Object Ownership
Figure 86: Object ownership finding ownership information
© 2016 Copyright. All rights reserved
HA240
113
Unit 3: Authorization Inside SAP HANA
Figure 87: Recursive revoking of privileges Take care when dropping users or revoking privileges
© 2016 Copyright. All rights reserved
HA240
114
Lesson: Privileges
Lesson: Privileges
After completing this lesson, you will be able to: x x x x x
Explain what are the possible types of Privileges Explain the use of Object Privileges, System Privileges, Package Privileges, Analytic Privileges Describe privileges to be set for Information Consumers Describe ownership rationale for possible Privilege Types Explain the use of Dynamic Analytic Privileges
© 2016 Copyright. All rights reserved
HA240
115
Unit 3: Authorization Inside SAP HANA
Figure 88: Type of privileges
Object Privileges: This is used to restrict access and modification of database objects, such as tables. Depending on the object type (for example, table, view), different actions (for example, CREATE ANY, ALTER, DROP) can be authorized. For Object Privileges in the SAP HANA database, the SQL standard behavior is applied. Analytic Privileges: This is used to restrict the access for read operations to certain data in Analytic, Attribute, and Calculation Views. This is done by filtering the attribute values. It is only applied at the processing time of the user query. Analytic Privileges need to be defined and activated before they can be granted to users and roles.
© 2016 Copyright. All rights reserved
HA240
116
Lesson: Privileges
Package Privileges: This is used to restrict the access to and the use of packages in the repository of the SAP HANA database. Packages contain design-time versions of various objects, such as Analytic, Attribute, and Calculation Views, as well as Analytic Privileges, and functions. To be able to work with packages, the respective Package Privileges must be granted. Application Privileges: Developers of SAP HANA XS applications can create application privileges to authorize user and client access to their application. They apply in addition to other privileges. It is recommended to grant application privileges to roles created in the SAP HANA Repository at design time. All kinds of Privileges con be assigned to users and roles.
Figure 89: System and Object privileges
© 2016 Copyright. All rights reserved
HA240
117
Unit 3: Authorization Inside SAP HANA
More details on Object Privileges activities: CREATE ANY This privilege allows the creation of all kinds of objects, in particular, tables, views, sequences, synonyms, SQL script functions or database procedures in a schema. This privilege can only be granted on a schema. ALL PRIVILEGES This privilege is a collection of all Data Definition Language (DDL) and Data Manipulation Language (DML) privileges that the grantor currently possesses and is allowed to grant further. The privilege it grants is specific to the particular object being acted upon. ALL PRIVILEGES is not applicable to a schema, but only a table, view, or table type. DROP and ALTER These are DDL privileges and authorize the DROP and ALTER SQL commands. While the DROP privilege is valid for all kinds of objects, the ALTER privilege is not valid for sequences and synonyms as their definitions cannot be changed after creation. SELECT, INSERT, UPDATE, and DELETE These are DML privileges and authorize respective SQL commands. While SELECT is valid for all kinds of objects, except for functions and procedures, INSERT, UPDATE, and DELETE are only valid for schemas, tables, table types, and updatable views. INDEX This special DDL privilege authorizes the creation, alteration or revocation of indexes for an object using the CREATE INDEX, ALTER INDEX, and DROP INDEX commands. This privilege can only be applied to a schema, table, and table type. EXECUTE This special DML privilege authorizes the execution of an SQL script function or a database procedure using the CALLS or CALL command, respectively.
© 2016 Copyright. All rights reserved
HA240
118
Lesson: Privileges
Figure 90: System privileges Some Examples for this system types:
User and Roles ROLE ADMIN Authorizes the creation and deletion of roles using the CREATE ROLE and DROP ROLE commands. This privilege also authorizes the granting and revocation of roles using the GRANT and REVOKE commands. Catalog and schema Management CATALOG READ Authorizes unfiltered read-only access to all system views. Normally, the content of these views is filtered based on the privileges of the accessing user
© 2016 Copyright. All rights reserved
HA240
119
Unit 3: Authorization Inside SAP HANA
Analytics CREATE STRUCTURED PRIVILEGE Authorizes the creation of structured privileges. Only the owner of an analytic privilege can further grant or revoke that privilege to other users or roles. Auditing: AUDIT ADMIN Controls the execution of the auditing-related commands CREATE AUDIT POLICY, DROP AUDIT POLICY, and ALTER AUDIT POLICY, as well as changes to auditing configuration. It also authorizes access to AUDIT_LOG system view System Management BACKUP ADMIN Authorizes backup and recovery commands for defining and initiating backup and recovery procedures. It also authorizes changes to system configuration options with respect to backup and recovery. Data Import and Export IMPORT Authorizes import activity in the database using the IMPORT commands Note that in addition to this privilege the user requires the INSERT privilege on the target tables to be imported. All the system privileges are describe in the SAP HANA Security guide.
© 2016 Copyright. All rights reserved
HA240
120
Lesson: Privileges
Figure 91: Common system privileges for Catalog and Schema Management
© 2016 Copyright. All rights reserved
HA240
121
Unit 3: Authorization Inside SAP HANA
Figure 92: Common system privileges for System Management (I)
© 2016 Copyright. All rights reserved
HA240
122
Lesson: Privileges
Figure 93: Common system privileges for System Management (II)
© 2016 Copyright. All rights reserved
HA240
123
Unit 3: Authorization Inside SAP HANA
Figure 94: Common system privileges for System Management (III)
© 2016 Copyright. All rights reserved
HA240
124
Lesson: Privileges
Figure 95: Common system privileges for System Management (IV)
© 2016 Copyright. All rights reserved
HA240
125
Unit 3: Authorization Inside SAP HANA
Figure 96: Package privileges
© 2016 Copyright. All rights reserved
HA240
126
Lesson: Privileges
Figure 97: Native and imported package privileges
Developers should be granted the following privileges for native packages: REPO.READ: This privilege authorizes read access to packages and design-time objects, including both native and imported objects. REPO.EDIT_NATIVE_OBJECTS: This privilege authorizes all kinds of inactive changes to designtime objects in native packages. REPO.ACTIVATE_NATIVE_OBJECTS: This privilege authorizes the user to activate or reactivate design-time objects in native packages. REPO.MAINTAIN_NATIVE_PACKAGES: This privilege authorizes the user to update or delete native packages, or create subpackages of native packages. Developers should only be granted the following privileges for imported packages in exceptional cases: REPO.EDIT_IMPORTED_OBJECTS: This privilege authorizes all kinds of inactive changes to designtime objects in imported packages.
© 2016 Copyright. All rights reserved
HA240
127
Unit 3: Authorization Inside SAP HANA
REPO.ACTIVATE_IMPORTED_OBJECTS: This privilege authorizes the user to activate or reactivate design-time objects in imported packages. REPO.MAINTAIN_IMPORTED_PACKAGES: This privilege authorizes the user to update or delete imported packages, or create subpackages of imported packages. In the SAP HANA studio, you can manage the repository system privileges together with the other system privileges on the System Privileges tab: REPO.EXPORT: This privilege authorizes the user to export, for example, delivery units REPO.IMPORT: This privilege authorizes the user to import transport archives. REPO.MAINTAIN_DELIVERY_UNITS: This privilege authorizes the user to maintain delivery units (DU, DU-vendor must equal system-vendor). REPO.WORK_IN_FOREIGN_WORKSPACE: This privilege authorizes theuser to work in a foreign inactive workspace.
Figure 98: Sub-package privileges
© 2016 Copyright. All rights reserved
HA240
128
Lesson: Privileges
Figure 99: SAP HANA Authorization - Runtime access control
This explanation is here to introduce the concept of Analytic Privilege and why this is required in the context of HANA native Data Modeling.
© 2016 Copyright. All rights reserved
HA240
129
Unit 3: Authorization Inside SAP HANA
Figure 100: Classical Analytic privileges
Analytic Privileges are used in the SAP HANA database to provide fine-grained control of what data particular users can see for Analytic use. They provide the ability for row-level authorization, based on the values in one or more columns. All Attribute Views, Analytic Views, and Calculation Views, which have been designed in the modeler and have been activated from the modeler of the HANA studio, are by default supported by the Analytic Privilege mechanism. If you are already familiar with the authorization model of SAP NetWeaver Business Warehouse (SAP NetWeaver BW), you will see many similarities between the two models. The overall idea behind Analytic Privileges is the reuse of Analytic Views by different users. However, the different users may not be allowed to see the same data. For example, different regional sales managers, who are only allowed to see sales data for their regions, could reuse the same Analytic View. They would get the Analytic Privilege to see only data for their region, and their queries on the same view would return the corresponding data. This is a major difference to the SAP NetWeaver BW model. While the concept itself is very similar, SAP NetWeaver BW would forward an error message if you executed a query that would return values you are not authorized to see. With the SAP HANA database, the query would be executed and, corresponding to your authorization, only values you are entitled to see returned.
© 2016 Copyright. All rights reserved
HA240
130
Lesson: Privileges
An Analytic Privilege consists of several restrictions. Three of these restrictions are always present and have the following special meanings: x x x
One restriction (cube restriction) determines for which column views (Attribute, Analytic, or Calculation Views) the privilege is used. This may involve a single view, a list of views or, by means of a wildcard, all applicable views. One restriction (activity restriction) determines the effected activity, for example, READ. This means that the activity READ is restricted and not available for use. One restriction (validity restriction) determines at what times the privilege is valid.
In addition to these three restrictions, many additional dimension restrictions are used. These are applied to the actual attributes of a view. Each dimension restriction is relevant for one dimension attribute, which can contain multiple value filters. Each value filter is a tuple of an operator and its operands, which is used to represent the logical filter condition. For example, a value filter (EQUAL 2014) can be defined for a dimension attribute YEAR in a dimension restriction to filter accessible data using the condition YEAR=2014 for potential users. Only dimension attributes, and no measures or key figures, can be employed in dimension restrictions.
Figure 101: Analytic Privileges XML-based (classical) vs. SQL-based Analytical Privileges
© 2016 Copyright. All rights reserved
HA240
131
Unit 3: Authorization Inside SAP HANA
Figure 102: Classical Analytic Privilleges - Lifecycle management
© 2016 Copyright. All rights reserved
HA240
132
Lesson: Privileges
Figure 103: Classical Analytic Privilege - Start creation wizard
In general, the user has access to an individual, independent view (Attribute, Analytic, or Calculation View) if the following prerequisites are met: x x
The user was granted the SELECT privilege on the view or the containing schema. The user was granted an Analytic Privilege that is applicable to the view. An Analytic Privilege is applicable to a view if it contains the view in the Cube restriction and contains at least one filter on one attribute of this view.
No SELECT privilege on the underlying base tables or views of this view is required. Analytic Privileges can be created with 2 different types: x x
Standard Analytic Privilege (XML-based) SQL Analytic Privilege (SQL-based)
© 2016 Copyright. All rights reserved
HA240
133
Unit 3: Authorization Inside SAP HANA
Figure 104: Classical Analytic Privilege - Select Information Models
Analytic Privilege - Capable Views The Analytic Privilege mechanism is defined by default for all three kinds of views that can be defined using the information modeler, namely Attribute, Analytic, and calculation Views: - Attribute View - Analytic Views - Calculation Views The check on Analytic Privileges can also be deactivated (see next slides).
© 2016 Copyright. All rights reserved
HA240
134
Lesson: Privileges
Figure 105: Classical Analytic Privilege - Editor Overview
© 2016 Copyright. All rights reserved
HA240
135
Unit 3: Authorization Inside SAP HANA
Figure 106: Classical Analytic Privilege - Select field for attribute restriction
When relevant Analytic Privileges are found for the current user and the query directed to the particular view, the evaluation process ensures that, according to the value filters specified in the Dimension restrictions, the appropriate view data is presented to the user. In particular: x x x x
Within one Dimension restriction, all value filters on the corresponding dimension attribute are combined with logical OR. Within one Analytic Privilege, all Dimension restrictions are combined with logical AND. Multiple Analytic Privileges are combined with logical OR. For example, if there is only one Analytic Privilege found with two Dimension restrictions, YEAR=2008 and COUNTRY=US, the user is only allowed to see data fulfilling the condition YEAR=2008 AND COUNTRY=US.
However, if these two conditions were put in two different Analytic Privileges found for this user and this view, the user is allowed to see more data, namely the OR combination of the filters of the individual Analytic Privileges: YEAR=2008 OR COUNTRY=US.
© 2016 Copyright. All rights reserved
HA240
136
Lesson: Privileges
Operators for defining value filters in the restrictions of analytic privileges: x x x x x
IN CONTAINSPATTERN EQUAL (=), LESSEQUAL, (<=), LESSTHAN(<), GREATERTHAN (>), GREATEREQUAL(>=) BETWEEN IS_NULL and NOT_NULL IS_NULL filters rows with null values in the corresponding attribute, NOT_NULL filters rows with non-null values in the attribute
- All filter operators, except IS_NULL and NOT_NULL, accept empty strings (“ “) as filter operands Examples: IN (“ “, “A”, “B”) As lower limit in comparison operators, e.g. BETWEEN (” “, “XYZ”)
Figure 107: Classical Analytic Privilege - Activation
© 2016 Copyright. All rights reserved
HA240
137
Unit 3: Authorization Inside SAP HANA
In an Analytic Privilege, in addition to static values filtering conditions, it is also possible to determine the filtering conditions via a stored procedure. With this approach the filtering conditions that apply for a specific user are determined at run-time, when querying a specific table or view. This allows a more scalable approach where the same analytic privilege can be applied to multiple users, with different authorization requirements. An Analytic Privilege where a procedure is used to determine the authorized values is also called a Dynamic Analytic Privilege. The procedure used in a Dynamic Analytic Privilege must have the following signature: x x x x
No input parameters Only 1 output parameter as table type with one single column for the IN operator Only 1 output parameter of a scalar type for all unary operators, such as EQUAL Only 2 output parameters of a scalar type for the binary operator BETWEEN
Further restrictions apply as documented in the SAP HANA Developer Guide available on the SAP Help Portal.
Figure 108: Classical Analytic Privilege - Check
© 2016 Copyright. All rights reserved
HA240
138
Lesson: Privileges
To view the trace file: 1.
From the context menu of your System, (example, HDB(STUDENT##)), select Administration. Press the Diagnosis Files tab.
2.
Find the file index server._.&.&.trc.
3.
Press the Show End of File button. Find your USER## in the trace log by pressing CTRL+ F.
4.
Enter USER##.
The trace log displays the Analytical Privilege Check errors.
Figure 109: Classical Analytic Privileges - Combining conditions
© 2016 Copyright. All rights reserved
HA240
139
Unit 3: Authorization Inside SAP HANA
Figure 110: Classical Analytic Privileges - Dynamic analytic privileges
© 2016 Copyright. All rights reserved
HA240
140
Lesson: Privileges
Figure 111: Classical Analytic Privileges - Sample dynamic analytic privileges
© 2016 Copyright. All rights reserved
HA240
141
Unit 3: Authorization Inside SAP HANA
Figure 112: SQL Analytic Privileges Extension of SQL-based analytic privileges
© 2016 Copyright. All rights reserved
HA240
142
Lesson: Privileges
Figure 113: SQL Analytic Privileges - Creation 1
© 2016 Copyright. All rights reserved
HA240
143
Unit 3: Authorization Inside SAP HANA
Figure 114: SQL Analytic Privileges - Creation 2
© 2016 Copyright. All rights reserved
HA240
144
Lesson: Privileges
Figure 115: SQL Analytic Privileges - Hierarchy-driven SQL-based privileges
© 2016 Copyright. All rights reserved
HA240
145
Unit 3: Authorization Inside SAP HANA
Figure 116: Analytic Privileges Caveats
Figure 117: Ownership of Privileges
© 2016 Copyright. All rights reserved
HA240
146
Lesson: Privileges
Figure 118: System privileges Ownership, granting
© 2016 Copyright. All rights reserved
HA240
147
Unit 3: Authorization Inside SAP HANA
Figure 119: Object Privileges Ownership, granting
© 2016 Copyright. All rights reserved
HA240
148
Lesson: Privileges
Figure 120: Package privileges Ownership, granting
Figure 121: Analytic Privileges / Structured Privileges Ownership, granting
© 2016 Copyright. All rights reserved
HA240
149
Unit 3: Authorization Inside SAP HANA
Figure 122: Information Consumers (I) Required privileges for reading from views
© 2016 Copyright. All rights reserved
HA240
150
Lesson: Privileges
Figure 123: Information Consumers (II) Required privileges for reading from views
Figure 124: Information Consumers (III) Required privileges for reading from views
© 2016 Copyright. All rights reserved
HA240
151
Unit 3: Authorization Inside SAP HANA
Figure 125: Information Consumers (IV) Required privileges for reading from views
Figure 126: Summary
© 2016 Copyright. All rights reserved
HA240
152
Exercise 3: Create Classical Analytic Privileges
Exercise 3: Create Classical Analytic Privileges
Exercise Objectives After completing this exercise, you will be able to: x x
Create a classical analytic privilege Assign privileges to a role
Task 1: Create a new repository role “ROLE_ANALYTIC_##”, where ## is your group ID and assign the following roles and privileges to your new role. x x x
Add the Object Privileges for the column view "_SYS_BIC"."TRAINING.HA240.Models/AN_PURCHASE_OVERVIEW" with privilege SELECT to your role. Add the Object Privilege REPOSITORY_REST with privilege EXECUTE. Add a Package Privilege to give access to repository package TRAINING.HA240.Models and assign authorization REPO.READ.
Then deploy the role and confirm that the role has been created. 1. Create a new repository role “ROLE_ANALYTIC_##” under package TRAINING.HA240:Roles where ## is your group ID. 2. Add the Object Privileges for schema _SYS_BI and column view "_SYS_BIC"."TRAINING.HA240.Models/AN_PURCHASE_OVERVIEW" with privilege SELECT to your role. 3. Add the Object Privilege for procedure REPOSITORY_REST(SYS) with privilege EXECUTE to your role. 4. Add a Package Privilege to give access to repository package TRAINING.HA240.Models and assign authorization REPO.READ. 5. Deploy the role and confirm that the role has been created.
© 2016 Copyright. All rights reserved
HA240
153
Unit 3: Authorization Inside SAP HANA
Task 2: Create or check if a user named USER##, where ## is your group ID, already exists on the system. Assign the role you have just created to this user. Then confirm that your user has been created and the role is assigned. After you have created the user successfully, you can log on and add the user to the Navigator View of the HANA studio. Then confirm that your user’s schema has been created under Catalog. 1. 2. 3. 4.
Check if user USER##, where ## is your group ID, already exist If the user does not exist, create the user Assign the role ROLE_ANALYTIC_##, where ## is your group ID to this user. Add the user to the Navigator View of the HANA studio (if user already exists password is: Training1)
Task 3: Check if the user USER## is authorized to access the Analytic View AN_PURCHASE_OVERVIEW (under package TRAINING.HA240.Models) 1. Check if the user USER## is authorized to access the Analytic View AN_PURCHASE_OVERVIEW (package: TRAINING.HA240.Models) Result is that the user is not authorized because no valid Analytic Privilege is assigned for the specific view. Task 4: Create a new classical analytic privilege called "AP_PURCHASE_OVERVIEW_DE_##" in the package TRAINING.HA240.AnalyticPrivileges. This analytic privilege should give access to the Analytic View TRAINING.HA240.Models::AN_PURCHASE_OVERVIEW with restriction to the attribute SUPPLIER_COUNTRY = DE. 1. Navigate to the Modeler Perspective and create a new classical analytic privilege AP_PURCHASE_OVERVIEW_DE_##, in the Package TRAINING.HA240.AnalyticPrivileges
© 2016 Copyright. All rights reserved
HA240
154
Exercise 3: Create Classical Analytic Privileges
Task 5: Add the new analytic privilege to your role ROLE_ANALYTIC_## using the user STUDENT##. Then test the authorizations of user USER## by selecting the Analytic View AN_PURCHASE_OVERVIEW. 1. Add the new analytic privileges to your role ROLE_ANALYTIC_##. Task 6: Test again the authorizations of user USER## by selecting the Analytic View AN_PURCHASE_OVERVIEW (under package TRAINING.HA240.Models) 1. Open the Analytic View AN_PURCHASE_OVERVIEW to test the authorizations.
© 2016 Copyright. All rights reserved
HA240
155
Unit 3: Authorization Inside SAP HANA
Solution of Exercise 3
Task 1: Create a repository role “ROLE_ANALYTIC_##”, where ## is your group ID, under package TRAINING.HA240.Roles and assign the following roles and privileges to your new role. x x x x
Add the Object Privileges for schema _SYS_BI and view "_SYS_BIC"."TRAINING.HA240.Models/AN_PURCHASE_OVERVIEW" privilege SELECT to your role. Add the Object Privilege REPOSITORY_REST with privilege EXECUTE. Add a Package Privilege to give access to repository package TRAINING.HA240.Models and assign authorization REPO.READ. Then deploy the role and confirm that the role has been created.
1. Create a repository role “ROLE_ANALYTIC_##” where ## is your group ID under package TRAINING.HA240.Roles 1. Open the Editor web interface to create the Repository role using the following URL: http://wdflbmt7211:8001/sap/hana/ide/editor/ 2. Login with your STUDENT## user and password 3. Right click on package TRAINING.HA240.Roles and choose New and then select Role 4. Type the following role name and confirm 1. Role name: ROLE_ANALYTIC_## (where ## is your group ID) 2. Add the Object Privileges _SYS_BI and view "_SYS_BIC"."TRAINING.HA240.Models/AN_PURCHASE_OVERVIEW" with privilege SELECT to your role. 1. Select Object Privileges tab and add the following object using the button + ( 1. Select Run-time instead of Design-time 2. Select SCHEMA as Object Type 3. Selct schema _SYS_BI and confirm with Ok 4. In the right pane (Privileges) flag only SELECT authorization
)
2. Select Object Privileges tab and add the following object using the button + ( 1. Fill the search field with view name AN_PURCHASE_OVERVIEW 2. Make sure to select the view under package TRAINING.HA240.Models 3. In the right pane (Privileges) flag only SELECT authorization
)
© 2016 Copyright. All rights reserved
HA240
156
Exercise 3: Create Classical Analytic Privileges
3. Add the Object Privilege for procedure REPOSITORY_REST(SYS) with privilege EXECUTE to your role. 1. 2. 3. 4.
Select Object Privileges tab and add the following object using the button + ( Select Run-time instead of Design-time Select PROCEDURE as Object Type Search and select procedure REPOSITORY_REST and confirm with OK
)
5. In the right pane (Privileges) flag only EXECUTE authorization 4. Add a Package Privilege to give access to repository package TRAINING.HA240.Models and assign authorization REPO.READ. 1. Select Package Privileges tab and add the following object using the button + ( 2. Search and select package TRAINING.HA240.Models and confirm with Ok 3. In the right pane (Privileges) flag only REPO.READ authorization
)
5. Deploy the role and confirm that the role has been created. 1. Save the result with Save button ( ) 2. Access the web Security console (with this link: http://wdflbmt7211:8001/sap/hana/ide/security/) or HANA Studio Security folder and check the new role 3. Role name is composed by :: 4. If you don't find the role refresh or login again to the Web page or HANA Studio
© 2016 Copyright. All rights reserved
HA240
157
Unit 3: Authorization Inside SAP HANA
Task 2: Create or check if a user named USER##, where ## is your group ID, already exists on the system. Assign the role you have just created to this user. Then confirm that your user has been created and the role is assigned. After you have created the user successfully, you can log on and add the user to the Navigator View of the HANA studio. Then confirm that your user’s schema has been created under Catalog. 1. Check if user USER##, where ## is your group ID, already exist 1. On Users folder in SAP HANA Studio or Web Security interface search for user USER## 2. If the user does not exist, create a new user 1. Right click on folder "Users" (under Security) and select the option "New user" 2. Type USER## (where ## is your group ID) as user name 3. Specify the inital password twice 4. Click on "Deploy" (or press F8) to save 3. Assign the role ROLE_ANALYTIC_##, where ## is your group ID to this user. 1. Open the user and on the Granted Roles tab press + and select your new role 2. Save and confirm that the role has been assigned 4. Add the user to the Navigator View of the HANA studio (if user already exists password is: Training1) 1. Right click on the system entry (root entry) in SAP HANA Studio and click on Add system with Different User 2. Specifcy the following details User
USER##
Password
Training1
Task 3: Check if the user USER## is authorized to access the Analytic View AN_PURCHASE_OVERVIEW. 1. Check if the user USER## is authorized to access the Analytic View AN_PURCHASE_OVERVIEW. 1. Change to the Modeler Perspective: 1. :LQGRZĺ2SHQ3HUVSHFWLYHĺ2WKHU, then select Modeler and 2.. 2. In the Navigator Pane, open the tree for user USER## to view the available packages. 2. Under the tree for user USER## open &RQWHQWĺ75$,1,1*ĺ+$ĺ0RGHOVĺ$QDO\WLF Views. 3. Right-click Analytic View $1B385&+$6(B29(59,(:and choose 'DWD3UHYLHZ. 4. Choose the Raw Data tab. An error message indicating that the user is not authorized appears. Result: the user is not authorized because no valid Analytic Privilege is assigned for the specific view.
© 2016 Copyright. All rights reserved
HA240
158
Exercise 3: Create Classical Analytic Privileges
Task 4: Create a new classical analytic privilege, AP_PURCHASE_OVERVIEW_DE_##, in the package TRAINING.HA240.AnalyticPrivileges. This analytic privilege should give access to the Analytic View TRAINING.HA240.Models.AN_PURCHASE_OVERVIEW with restriction to the attribute SUPPLIER_COUNTRY = DE. 1. Navigate to the Modeler Perspective and create a new analytic privilege AP_PURCHASE_OVERVIEW_DE_##, in the Package TRAINING.HA240.AnalyticPrivileges 1. From HANA Studio Modeler Prospective or from Editor wen intrface (url: http://wdflbmt7211:8001/sap/hana/ide/editor/) 2. Right-click the package TRAINING ĺ HA240 ĺ$QDO\WLF3ULYLOHJHVDQGFKRRVH1HZĺ Analytic Privilege … 3. Enter name and description AP_PURCHASE_OVERVIEW_DE_## (where ## is your group ID). 4. Select "Classical Analytic Privilege" as Type 5. Choose Create 6. Choose Add within the "Secure Models" area 7. Select Analytic View "TRAINING.HA240.Models.AN_PURCHASE_OVERVIEW" 8. Click Add to select Associated Attributes Restrictions. 9. Select attribute "SUPPLIER_COUNTRY" 10. Choose OK.
© 2016 Copyright. All rights reserved
HA240
159
Unit 3: Authorization Inside SAP HANA
11. Click button within "Associated Attribute Restriction" area to assign restrictions for SUPPLIER_COUNTRY attribute.
12. Click on to add a new rescriction on the attribute you just selected. 13. Click in the Value field. 14. Click the grey button to open the Value Help dialog. 15. Choose the Find button. 16. Select value DE and click OK. (Alternatively, just type DE in the Value field.) 17. Deploy your analytic privilege (Save and Activate). Task 5: Add the new analytic privilege to your role ROLE_ANALYTIC_## using the user USER##. 1. Add the new analytic privileges to your role ROLE_ANALYTIC_##. 1. Navigate to the role, right-click and choose Open. 2. Select the Analytic Privileges tab. 3. Choose + to add new analytic privilege 4. Select your analytic privilege AP_PURCHASE_OVERVIEW_DE_## under package TRAINING.HA240.AnalyticPrivileges and click OK. 5. Deploy the changes. Task 6: Test again the authorizations of user USER## by selecting the Analytic View AN_PURCHASE_OVERVIEW under package TRAINING.HA240.Models 1. Select the Analytic View AN_PURCHASE_OVERVIEW to test the authorizations. 1. Navigate to 786(5 ĺ&RQWHQWĺ75$,1,1*ĺ+$ĺ0RGHOVĺ$QDO\WLF Views. 2. Right-click AN_PURCHASE_OVERVIEW (actual data) and choose Data Preview. 3. In the Available Objects pane, drag the field SUPPLIER_COUNTRY and drop it in the Label Axis pane. 4. In the Available Objects pane, drag the field PRODUCTID and drop it in the Values Axis pane. 5. In the Output pane, select the Table tab. 6. Check the result and only values for SUPPLIER_COUNTRY DE are available.
© 2016 Copyright. All rights reserved
HA240
160
Exercise 4: Create Dynamic Analytic Privileges
Exercise 4: Create Dynamic Analytic Privileges
Exercise Objectives After completing this exercise, you will be able to: x x
Create a dynamic analytic privilege Assign privileges to a role
Task 1: Create a new Analytic Privilege for AN_PURCHASE_OVERVIEW containing a Dynamic filter on attribute SUPPLIER_COUNTRY using store procedure SP_FROM_USER_TO_COUNTRY x
Create a new Analytic Privilege type classical called DAP_PURCHASE_OVERVIEW_## under package TRAINING.HA240.AnalyticPrivileges using the stored procedure TRAINING.HA240.Procedures::SP_FROM_USER_TO_COUNTRY as filter (condition IN) for the attribute SUPPLIER_COUNTRY.
Task 2: Add the new Analytic Privilege DAP_PURCHASE_OVERVIEW_## to the role ROLE_ANALYTIC_## and remove the previous Analytic Privilege AP_PURCHASE_OVERVIEW_DE_## Task 3: Access the view using USER## and check that user is authorized but there are no entries (this is because the table containing the values is still empty).
© 2016 Copyright. All rights reserved
HA240
161
Unit 3: Authorization Inside SAP HANA
Task 4: Add a new entry for USER## in the table "SECURITY"."TRAINING.HA240.Data::security.users_to_country" which contains mapping between users and countries (the stored procedure defined on Task 1 selects from this table). Task 5: Check again the preview of view AN_PURCHASE_OVERVIEW with user USER##.
© 2016 Copyright. All rights reserved
HA240
162
Exercise 4: Create Dynamic Analytic Privileges
Solution of Exercise 4
Task 1: Create a new Analytic Privilege for AN_PURCHASE_OVERVIEW containing a Dynamic filter on attribute SUPPLIER_COUNTRY using store procedure SP_FROM_USER_TO_COUNTRY 1. Create a new Analytic Privilege type classical called DAP_PURCHASE_OVERVIEW_## under package TRAINING.HA240.AnalyticPrivileges 2. In Security Models section select view AN_PURCHASE_OVERVIEW from package TRAINING.HA240.Models 3. In Associated Attribute Restrictions section click on Add and select the attribute name SUPPLIER_COUNTRY 4. On the resulting row in the table click + Restriction 5. Select Repository Procedure as restriction type 6. Select the following procedure: 1. TRAINING.HA240.Procedures::SP_FROM_USER_TO_COUNTRY 7. Select IN as operator 8. Save and Activate the new Analytic Privilege Task 2: Add the new Analytic Privilege DAP_PURCHASE_OVERVIEW_## to the role ROLE_ANALYTIC_## and remove the previous Analytic Privilege AP_PURCHASE_OVERVIEW_DE_## 1. Edit the role ROLE_ANALYTIC_## 2. On Analytic Privileges tab remove AP_PURCHASE_OVERVIEW_DE_## 3. On the same tab add the newly created privilege DAP_PURCHASE_OVERVIEW_## from package TRAINING.HA240.AnalyticPrivileges 4. Save and Activate Task 3: Access the view using USER## and check that user is authorized but there are no entries (this is because the table containing the values is still empty). 1. 2. 3. 4.
Connect to the system using USER## Navigate to TRAINING.HA240.Models Preview Analytic View AN_PURCHASE_OVERVIEW Go to Row Data tab and confirm that is empty
© 2016 Copyright. All rights reserved
HA240
163
Unit 3: Authorization Inside SAP HANA
Task 4: Add a new entry for USER## in the table "SECURITY"."TRAINING.HA240.Data::security.users_to_country" which contains mapping between users and countries (the stored procedure defined on Task 1 selects from this table). 1. Connect to the system using STUDENT## 2. Open the SQL Console and execute the following statement INSERT INTO "SECURITY"."TRAINING.HA240.Data::security.users_to_country" VALUES ('USER##','DE') ; (Where USER## has to be substituted with you user id) Task 5: Check again the preview of view AN_PURCHASE_OVERVIEW with user USER##. 1. 2. 3. 4.
Connect to the system using USER## Navigate to TRAINING.HA240.Models Preview Analytic View AN_PURCHASE_OVERVIEW Go to Row Data tab and confirm that now you can see entries for Germany only (SUPPLIER_COUNTRY = DE)
© 2016 Copyright. All rights reserved
HA240
164
Exercise 5: Create SQL Analytic Privileges
Exercise 5: Create SQL Analytic Privileges
Exercise Objectives After completing this exercise, you will be able to: x x
Create SQL based Analytic Privileges Use sub-queries in SQL Analytic Privileges
Task 1: Create a new SQL based Analytic Privilege using name AP_SQL_PURCHASE_OVERVIEW_## under package TRAINING.HA240.AnalyticPrivileges. Include view AN_PURCHASE_OVERVIEW_SQLPRIV and use the table "SECURITY"."TRAINING.HA240.Data::security.users_to_country” as a subquery in the sql filter. Task 2: Add the new View AN_PURCHASE_OVERVIEW_SQLPRIV and the Analytic Privilege AP_SQL_PURCHASE_OVERVIEW_## to the role ROLE_ANALYTIC_## (previous analytic privilege can remain in the role because is based on a different view).
© 2016 Copyright. All rights reserved
HA240
165
Unit 3: Authorization Inside SAP HANA
Task 3: Preview content of Analytic View AN_PURCHASE_OVERVIEW_SQLPRIV in package TRAINING.HA240.Models with user USER## and check the result. NOTE: The result is the same obtained in the previous exericse but this time you have only created a static SQL Analytic Privilege and you don't need any Stored Procedure to maintain the logic.
© 2016 Copyright. All rights reserved
HA240
166
Exercise 5: Create SQL Analytic Privileges
Solution of Exercise 5
Task 1: Create a new SQL based Analytic Privilege using name AP_SQL_PURCHASE_OVERVIEW_## under package TRAINING.HA240.AnalyticPrivileges. Include view AN_PURCHASE_OVERVIEW_SQLPRIV and use the table "SECURITY"."TRAINING.HA240.Data::security.users_to_country” as a subquery in the sql filter. 1. From Web IDE Editor create a new Analytic Privilege under package TRAINING.HA240.AnalyticPrivileges 2. Use name AP_SQL_PURCHASE_OVERVIEW_## and select Type SQL 3. On the editor screen, on the left Security Models section select AN_PURCHASE_OVERVIEW_SQLPRIV from package TRAINING.HA240.Models 4. Click on SQL Editor on top of the view and maintain the following filter condition. (SUPPLIER_COUNTRY IN (SELECT SUPPLIER_COUNTRY FROM "SECURITY"."TRAINING.HA240.Data::security.users_to_country" WHERE "USER_NAME" = SESSION_USER)) Task 2: Add the new View AN_PURCHASE_OVERVIEW_SQLPRIV and the Analytic Privilege AP_SQL_PURCHASE_OVERVIEW_## to the role ROLE_ANALYTIC_## (previous analytic privilege can remain in the role because is based on a different view). 1. Edit the role ROLE_ANALYTIC_## 2. On Object Privileges tab search for view AN_PURCHASE_OVERVIEW_SQLPRIV and grant the SELECT action on the view 3. On Analytic Privileges tab add the newly created privilege AP_SQL_PURCHASE_OVERVIEW_## 4. Save and Activate
© 2016 Copyright. All rights reserved
HA240
167
Unit 3: Authorization Inside SAP HANA
Task 3: Preview content of Analytic View AN_PURCHASE_OVERVIEW_SQLPRIV in package TRAINING.HA240.Models with user USER## and check the result. 1. 2. 3. 4.
Connect to the system using USER## Navigate to TRAINING.HA240.Models Preview Analytic View AN_PURCHASE_OVERVIEW_SQLPRIV Go to Row Data tab and confirm that now you can see entries for Germany only (SUPPLIER_COUNTRY = DE)
NOTE: The result is the same obtained in the previous exericse but this time you have only created a static SQL Analytic Privilege and you don't need any Stored Procedure to maintain the logic.
© 2016 Copyright. All rights reserved
HA240
168
Lesson: Information About Users and Authorizations
Lesson: Information About Users and Authorizations
After completing this lesson, you will be able to: x x
List tables and views that support the user management Analyze which privileges a user has been granted
Figure 127: System Tables and Monitoring Views
© 2016 Copyright. All rights reserved
HA240
169
Unit 3: Authorization Inside SAP HANA
System tables and monitoring views query information about the system using SQL commands. The results appear as tables in SYS Schema. Some of the tables and views that support user management.
Figure 128: Display Privileges Granted to a User
Since privileges can both be assigned directly or be inherited via roles, it is often difficult to see at first glance which privileges a user has been granted. To provide better support, the view EFFECTIVE_PRIVILEGES was created. It should be mentioned that when selecting from EFFECTIVE_PRIVILEGES, you always need the condition USER_NAME = ’something’ in the WHERE clause, otherwise the query will return with an error.
© 2016 Copyright. All rights reserved
HA240
170
Lesson: Information About Users and Authorizations
Figure 129: Display Roles Granted to a User
The system view EFFECTIVE_ROLES displays the roles of the currently logged-on user. It shows both roles that were granted directly to the user, and roles that were inherited from other roles. This system view complements the system view EFFECTIVE_PRIVILEGES.
© 2016 Copyright. All rights reserved
HA240
171
Unit 3: Authorization Inside SAP HANA
Figure 130: Dependency Viewer
The authorization dependency viewer helps you to identify where there are invalid authorization dependencies in your object’s structure. This is particularly useful for objects with large and complex dependency structures. The authorization dependency viewer in the SAP HANA studio visualizes the object dependency structure of stored procedures and views together with the SQL authorization status of the object owner along the dependency paths. You can use the authorization dependency viewer as a first step in troubleshooting the following authorization errors for column views and procedures: - NOT AUTHORIZED (258) - INVALIDATED VIEW (391) - INVALIDATED PROCEDURE (430) When do authorization or invalid object errors occur? If the object owner does not have all the required privileges on all underlying objects on which the object depends. The object owner must have both the appropriate SQL object privilege (for example,
© 2016 Copyright. All rights reserved
HA240
172
Lesson: Information About Users and Authorizations
EXECUTE, SELECT) and the authorization to grant the object privilege to others (that is, WITH GRANT OPTION is set).
Figure 131: Dependency Viewer - How to use it?
© 2016 Copyright. All rights reserved
HA240
173
Unit 3: Authorization Inside SAP HANA
© 2016 Copyright. All rights reserved
HA240
174
Lesson: Information About Users and Authorizations
Unit 4: General Security Requirements and Solutions
© 2016 Copyright. All rights reserved
HA240
175
Unit 4: General Security Requirements and Solutions
Lesson: Authentication and Single Sign-On
Figure 132: Learning Objective
© 2016 Copyright. All rights reserved
HA240
176
Lesson: Authentication and Single Sign-On
Figure 133: Scenario
© 2016 Copyright. All rights reserved
HA240
177
Unit 4: General Security Requirements and Solutions
Figure 134: Password policies and Blacklist
Pawword Policies Passwords for the user name/password authentication of database users are subject to certain rules, or password policy. You can change the default password policy in the Security editor of the SAP HANA studio or Security Web-IDE(recommended) alternatively it can be done directly in the password_policy section of the indexserver.ini system properties file. Password Balcklist A password blacklist is a list of words that are not allowed as passwords or parts of passwords. The password blacklist in SAP HANA is implemented with the table _SYS_PASSWORD_BLACKLIST in the schema _SYS_SECURITY. This table is empty when you create a new instance. You can enter words in the password blacklist as part of password policy configuration in the Security editor of the SAP HANA studio or the Web-IDE.
© 2016 Copyright. All rights reserved
HA240
178
Lesson: Authentication and Single Sign-On
Figure 135: User configuration for Authentication and SSO
© 2016 Copyright. All rights reserved
HA240
179
Unit 4: General Security Requirements and Solutions
Figure 136: Kerberos Introduction
Kerberos is a network authentication protocol that provides authentication for client-server applications across an insecure network connection using secret-key cryptography. ODBC and JDBC database clients support the Kerberos protocol, for example, the SAP HANA studio. Access from front-end applications (for example, SAP BusinessObjects XI applications) can also be implemented using Kerberos delegation. Note however that constrained delegation and protocol transition are not supported. Kerberos is supported for HTTP access via SAP HANA XS with Simple and Protected GSSAPI Negotiation Mechanism (SPNEGO). It is up to the HTTP client whether it uses Kerberos directly or SPNEGO.
© 2016 Copyright. All rights reserved
HA240
180
Lesson: Authentication and Single Sign-On
Figure 137: Kerberos Configuration: ODBC/JDBC
For more information about how to set up SSO with SAP HANA using Kerberos and Microsoft Active Directory, see SAP Note 1837331 (How-To: HANA DB SSO Kerberos/ Active Directory). Prerequisites: Clocks Clocks of all hosts involved are synchronized TCP Active Directory domain controller: force Kerberos to use TCP instead of UDP Hostname lookup and DNS Hostname reverse lookup is set up for “physical” and “virtual” DB server hostname(s): /etc/hosts on the DB server and/or DNS record type PTR Hostname resolution must be consistent with reverse lookup. DNS“virtual” hostname: DNS alias (CNAME record) DNS “physical” hostname: canonical name (A record)
© 2016 Copyright. All rights reserved
HA240
181
Unit 4: General Security Requirements and Solutions
Organizational Requirements Active Directory Access or Administrator must be available Additional details: In distributed SAP HANA systems that use Kerberos delegation (SSO2DB), application disruptions resulting from expired authentication are avoided though the use of session cookies. This mechanism is active by default but can be disabled in the indexserver.ini file with the session_cookie_for_kerberos parameter.
Figure 138: Kerberos Configuration: SPNEGO
Changing the Service User Password Since the keys stored in the key tab are generated from the Service User password, you should change the Service User password periodically. After the password has been changed, the key tab has to be either created again or extended to contain the new key(s), since a password change implies an increment of the Key Version Number (kvno).
© 2016 Copyright. All rights reserved
HA240
182
Lesson: Authentication and Single Sign-On
Figure 139: SAML Introduction
SAML provides the mechanism by which the identity of users accessing the SAP HANA database from client applications is authenticated by XML-based assertions issued by a trusted identity provider. The internal database user to which the external identity is mapped is used for authorization checks during the database session.
© 2016 Copyright. All rights reserved
HA240
183
Unit 4: General Security Requirements and Solutions
Figure 140: SAML What is SAML?
© 2016 Copyright. All rights reserved
HA240
184
Lesson: Authentication and Single Sign-On
Figure 141: SAML How it works?
© 2016 Copyright. All rights reserved
HA240
185
Unit 4: General Security Requirements and Solutions
Figure 142: SAML User Mapping
© 2016 Copyright. All rights reserved
HA240
186
Lesson: Authentication and Single Sign-On
Figure 143: SAML Configuration in HANA Studio
Prerequisites: Identity Provider information You also need access to the XML document containing the IDP metadata that describes the SAML identity provider (SAML IDP) you want to add SAP Crypto Library The cryptographic library must be installed to use the SAML functionalities SSL The SSL can be turned on to prospect the data transfer for the authentication Important Note: This may be optional depending on your company’s security policy and SAML configuration HANA Authorizations To access the tools required to add an SAML identity provider (SAML IDP), you must have the following SAP HANA roles assigned: sap.hana.xs.admin.roles::SAMLAdministrator
© 2016 Copyright. All rights reserved
HA240
187
Unit 4: General Security Requirements and Solutions
Figure 144: SAML Configuration for XS Engine APPs
© 2016 Copyright. All rights reserved
HA240
188
Lesson: Authentication and Single Sign-On
Figure 145: X.509 Certificates Introduction
© 2016 Copyright. All rights reserved
HA240
189
Unit 4: General Security Requirements and Solutions
Figure 146: X.509 Certificates Configuration Overview
Prerequisites: x
You need root/administrator access to the SAP HANA system hosting the SAP Web Dispatcher service. Note: To maintain security and authentication settings for SAP HANA XS applications, the user also needs the privileges granted by the SAP HANA XS role RuntimeConfAdministrator.
x x x x
The CommonCryptoLib library libsapcrypto.so is installed and available. The trust store utility sapgenpse is available. The SAP Web Dispatcher trust store (SAPSSL.pse) is available. The SAP HANA trust store (sapsrv.pse) is available.
© 2016 Copyright. All rights reserved
HA240
190
Lesson: Authentication and Single Sign-On
Figure 147: X.509 Usage
© 2016 Copyright. All rights reserved
HA240
191
Unit 4: General Security Requirements and Solutions
Figure 148: SAP Logon and Assertion Tickets SAP Logon Tickets
© 2016 Copyright. All rights reserved
HA240
192
Lesson: Authentication and Single Sign-On
Figure 149: SAP Logon and Assertion Tickets SAP Assertion Tickets
© 2016 Copyright. All rights reserved
HA240
193
Unit 4: General Security Requirements and Solutions
Figure 150: SAP Logon and Assertion Tickets Prerequisites: Trust Store
© 2016 Copyright. All rights reserved
HA240
194
Lesson: Authentication and Single Sign-On
Figure 151: Certificate management in SAP HANA Cockpit
© 2016 Copyright. All rights reserved
HA240
195
Unit 4: General Security Requirements and Solutions
Figure 152: Certificate collections in SAP HANA Cockpit
© 2016 Copyright. All rights reserved
HA240
196
Lesson: Authentication and Single Sign-On
Figure 153: SAP Logon and Assertion Tickets Prerequisites: User Configuration
© 2016 Copyright. All rights reserved
HA240
197
Unit 4: General Security Requirements and Solutions
Figure 154: SAP Logon and Assertion Tickets Configurations
© 2016 Copyright. All rights reserved
HA240
198
Lesson: Authentication and Single Sign-On
Figure 155: SAP Logon and Assertion Tickets Usage
© 2016 Copyright. All rights reserved
HA240
199
Unit 4: General Security Requirements and Solutions
Figure 156: SAP HANA Authentication Options
You can integrate SAP HANA into the user authentication infrastructure of your system landscape. To do so, you must configure SAP HANA for the required mechanisms. SAP HANA supports several authentication mechanisms, several of which can be used for the integration of SAP HANA into single sign-on environments (SSO). Depending on which mechanism(s) you are implementing, you must configure SAP HANA accordingly. The authentication mechanisms must be specified also at user level in order to enable a specific user to use one or more authentication option. User Name/Password Authentication Users accessing the SAP HANA database authenticate themselves by entering their database user name and password.
© 2016 Copyright. All rights reserved
HA240
200
Lesson: Authentication and Single Sign-On
Kerberos A Kerberos authentication provider can be used to authenticate users accessing SAP HANA in the following ways: x x x x
Directly from ODBC and JDBC database clients within a network (for example, the SAP HANA studio) Indirectly from front-end applications such as SAP BusinessObjects applications using Kerberos delegation Via HTTP access by means of SAP HANA Extended Services (SAP HANA XS). In this case, Kerberos authentication is enabled with Simple and Protected GSSAPI Negotiation Mechanism (SPNEGO). Security Assertion Markup Language (SAML)
A SAML bearer assertion can be used to authenticate users accessing SAP HANA directly from ODBC/JDBC database clients. SAP HANA can act as service provider to authenticate users accessing via HTTP by means of SAP HANA XS. SAP Logon and Assertion Tickets Users can be authenticated by logon or assertion tickets issued to them when they log on to an SAP system that is configured to create tickets (for example, the SAP Web Application Server or Portal). X.509 Client Certificates For HTTP access to SAP HANA by means of SAP HANA XS, users can be authenticated by client certificates signed by a trusted Certification Authority (CA), which can be stored in the SAP HANA XS trust store.
Figure 157: Summary
© 2016 Copyright. All rights reserved
HA240
201
Unit 4: General Security Requirements and Solutions
Lesson: Multitenant Database Containers
Figure 158: Learning Objective
© 2016 Copyright. All rights reserved
HA240
202
Lesson: Multitenant Database Containers
Figure 159: Multitenancy Introduction
© 2016 Copyright. All rights reserved
HA240
203
Unit 4: General Security Requirements and Solutions
Figure 160: Overview
All the databases in the same multiple-container system share: x x x
The same installation of database system software. The same computing resources. The same system administration.
However, each database is self-contained and fully isolated with its own: x x x x x x
Set of database users Database catalog Repository Persistence Backups Traces and logs
Although database objects such as schemas, tables, views, procedures, and so on are local to the database, cross-database SELECT queries are possible!
© 2016 Copyright. All rights reserved
HA240
204
Lesson: Multitenant Database Containers
This supports in particular cross-application reporting in MCOS (multiple components in one system) scenarios.
Figure 161: SAP HANA multitenant database containers Concept
New administration layer containing a System database x x x x
Landscape topology information System-wide parameter settings Focal point for complete backup of all databases Resource management for all tenant DBs (CPU, memory, etc)
Characteristics: x x x x x
Tenant database related parameter settings Individual backup/restore of tenant database Clear separation of application data and user management One database software version for a SAP HANA system (all tenant databases) One HA/DR setting for a SAP HANA system: all tenants are included in a HA/DR scenario
© 2016 Copyright. All rights reserved
HA240
205
Unit 4: General Security Requirements and Solutions
Figure 162: MDC and its Users
SYSTEM is the database super user. It has irrevocable system privileges, such as the ability to create other database users, access system tables, and so on. In a system with multitenant database containers, the SYSTEM user of the system database has additional privileges for managing tenant databases, for example, creating and dropping databases, changing configuration (*.ini) files of databases, and performing database-specific data backups.
© 2016 Copyright. All rights reserved
HA240
206
Lesson: Multitenant Database Containers
Figure 163: User and Administration layer
© 2016 Copyright. All rights reserved
HA240
207
Unit 4: General Security Requirements and Solutions
Figure 164: Login to MDC system
© 2016 Copyright. All rights reserved
HA240
208
Lesson: Multitenant Database Containers
Figure 165: SAP HANA MDC - Password Policies
© 2016 Copyright. All rights reserved
HA240
209
Unit 4: General Security Requirements and Solutions
Figure 166: SAP HANA MDC - Encryption
© 2016 Copyright. All rights reserved
HA240
210
Lesson: Multitenant Database Containers
Figure 167: SAP HANA MDC - Enable and disable features
The system view M_CUSTOMIZABLE_FUNCTIONALITIES lists all features that can be disabled and their status. This view exists in both the SYS schema of every database, where it contains databasespecific information, and in the SYS_DATABASES schema of the system database, where it contains information about the enablement of features in all databases. For more information, see M_CUSTOMIZABLE_FUNCTIONALITIES in the SAP HANA SQL and Systems View Reference. Features can be enabled and disabled on the System Database level only.
© 2016 Copyright. All rights reserved
HA240
211
Unit 4: General Security Requirements and Solutions
Figure 168: Cross-Tenant Database Access - Introduction
SELECT statements can reference the following objects on a remote database: x
Schemas, Tables (row and column), Views (row and column)
The following local objects can access remote database objects: x SQL views, Calculations views, Procedures These objects cannot reference remote tenant database objects (in other tenant DBs): x Hierarchy views, Analytic views, Attribute views, Synonyms Attribute views and analytic views need to be converted to calculation views in order to use remote tenant database objects Cross-database DDL statements are not supported, DML statements other than SELECT are not supported These remote tenant database objects cannot be accessed in a SELECT query: x Virtual tables, Sequences, Synonyms, Monitoring views, Triggers, Indexes
© 2016 Copyright. All rights reserved
HA240
212
Lesson: Multitenant Database Containers
Note the following with respect to remote identities: x x x x
A user can be the remote identity for only one user in another database. An existing user can be assigned a remote identity using the ALTER USER statement. The association between a user and a remote identity is unidirectional. In the above example, USER2 can access SCHEMA1.TABLE1 in DB1 as USER1, but USER1 cannot access objects in DB2 as USER2. Only the SELECT privileges of the user in the remote database are considered during a crossdatabase query. Any other privileges the remote user may have are ignored.
Figure 169: Cross-Tenant Database Access - Setup
Read-only queries between multitenant database containers are possible through the association of the requesting user with a remote identity on the remote database(s). Cross-database access is not enabled by default and must be configured before such user mappings can be set up. Every tenant database in a multiple-container system is self-contained with its own isolated set of database users and isolated database catalog. However, to support in particular cross-application reporting in MCOS scenarios (multiple components in one system), cross-database SELECT queries are possible. This means that database objects such as tables and views can be local to one database but be read by users from other databases in the same system.
© 2016 Copyright. All rights reserved
HA240
213
Unit 4: General Security Requirements and Solutions
A user in one database can run a query that references objects in another database if the user is associated with a sufficiently privileged user in the remote database. This associated user is called a remote identity. This is the user who executes the query (or part of the query) in the remote database and therefore the user whose authorization is checked.
Figure 170: MDC Security at OS Level
Properties of a system with high isolation level x x x
Processes of individual tenant databases run under the dedicated OS users belonging to dedicated OS groups. Database-specific data on the file system is protected using OS file and directory permissions. x Note: adm does not have OS access to tenant data volumes, log volumes, or backups, but can access tenant-specific trace and configuration files. Operations that require OS access are restricted to users with the correct permissions. This adds another layer of protection between tenants: tenant administrators with access to the OS cannot access other tenants or the system database using OS commands.
© 2016 Copyright. All rights reserved
HA240
214
Lesson: Encryption
Lesson: Encryption
Figure 171: Learning Objective
Figure 172: Scenario
© 2016 Copyright. All rights reserved
HA240
215
Unit 4: General Security Requirements and Solutions
Figure 173: Secure Communications
To support the different SAP HANA scenarios and setups, SAP HANA has different types of network communication channels. x x x x x x x x
Channels used for external access to SAP HANA functionality by end-user clients, administration clients, application servers, and for data provisioning via SQL or HTTP Channels used for SAP HANA internal communication within the database or in a distributed scenario for communication between hosts Channels used for network communication between the primary site and secondary site in system replication scenarios Connections used for administrative purposes Connections used for data provisioning Connections from database clients that access the SQL interface of the SAP HANA database Connections from HTTP(S) clients Outgoing connections
Note: Certified SAP HANA hosts use a separate network adapter with a separate IP address for each of the different networks
© 2016 Copyright. All rights reserved
HA240
216
Lesson: Encryption
Figure 174: External Communications
To support the different SAP HANA scenarios and setups, SAP HANA has different types of network communication channels. x x x x x x x x
Channels used for external access to SAP HANA functionality by end-user clients, administration clients, application servers, and for data provisioning via SQL or HTTP Channels used for SAP HANA internal communication within the database or in a distributed scenario for communication between hosts Channels used for network communication between the primary site and secondary site in system replication scenarios Connections used for administrative purposes Connections used for data provisioning Connections from database clients that access the SQL interface of the SAP HANA database Connections from HTTP(S) clients Outgoing connections
© 2016 Copyright. All rights reserved
HA240
217
Unit 4: General Security Requirements and Solutions
Figure 175: Internal Communications
© 2016 Copyright. All rights reserved
HA240
218
Lesson: Encryption
Figure 176: HANA - Internal Communications
SAP HANA supports encrypted communication of the following internal communication channels: x x x x
Communication between the SAP HANA database and clients that access the SQL interface of the database. Internal network communication between the individual components of an SAP HANA system on a single host and also between multiple hosts if the system is distributed. Communication between SAP HANA Studio and sapstartsrv. Communication between SAP HANA Studio and SAP Host Agent
© 2016 Copyright. All rights reserved
HA240
219
Unit 4: General Security Requirements and Solutions
Figure 177: Data Encryption
© 2016 Copyright. All rights reserved
HA240
220
Lesson: Encryption
Figure 178: Cryptographic Providers for HANA
© 2016 Copyright. All rights reserved
HA240
221
Unit 4: General Security Requirements and Solutions
Figure 179: Simplified certificate management
Note: In-database storage of certificates for HTTPS is currently not available
© 2016 Copyright. All rights reserved
HA240
222
Lesson: Encryption
Figure 180: Certificate management in SAP HANA Cockpit
Notes: x x
There are certificates that are managed in the file system, e.g. TLS/SSL for HTTP, and TLS/SSL for internal communication (automatic setup via SystemPKI). These cannot be managed using the SAP HANA Cockpit functionality. For information on migrating file-based certificates into the database, see SAP Note 2175664
© 2016 Copyright. All rights reserved
HA240
223
Unit 4: General Security Requirements and Solutions
Figure 181: Certificate store in SAP HANA Cockpit
© 2016 Copyright. All rights reserved
HA240
224
Lesson: Encryption
Figure 182: Certificate collections PSE
© 2016 Copyright. All rights reserved
HA240
225
Unit 4: General Security Requirements and Solutions
Figure 183: Certificate collections in SAP HANA Cockpit
Example: x x x
Certificate collection with purpose SSL You have added a private key for the HANA server (used for the actual connection encryption) plus a certificate to identify the server (first entry in the Details list) You have added a certificate with which the server can identify the client (second entry in the Details list); this is optional
© 2016 Copyright. All rights reserved
HA240
226
Lesson: Encryption
Figure 184: Encryption in MDC - 1
© 2016 Copyright. All rights reserved
HA240
227
Unit 4: General Security Requirements and Solutions
Figure 185: Encryption in MDC - 2
The following internal communication channels can be secured: x x x x
Between databases in a multiple-container system; Note: For MDC system currently only encryption is available (but not tenant authentication) Between hosts in a scale-out system (also: between processes in a single-host system) Between SAP HANA systems in system replication scenarios (metadata + data channel) Between the SAP HANA database and additional server components, such as an extended storage server (SAP HANA dynamic tiering option) and smart data streaming server (SAP HANA Smart Data Streaming option).
Keys and certificates used by the system PKI: x x x x
Each component (host, database, additional server etc.) receives a public/private key pair and a public-key certificate for mutual authentication. The certificates are signed by a dedicated trusted certificate authority (CA), which is unique for each SAP HANA system. The certificates are automatically renewed. CommonCryptoLib is used as the cryptographic library.
© 2016 Copyright. All rights reserved
HA240
228
Lesson: Encryption
Figure 186: Summary
© 2016 Copyright. All rights reserved
HA240
229
Unit 4: General Security Requirements and Solutions
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 187: Learning Objective
© 2016 Copyright. All rights reserved
HA240
230
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 188: Scenario
Figure 189: SAP HANA – Security Infrastructure integration
© 2016 Copyright. All rights reserved
HA240
231
Unit 4: General Security Requirements and Solutions
SAP HANA supports standard and documented interfaces to enable integration with customer security network and datacenter infrastructures
Figure 190: SAP solutions for GRC Integrated suite
For further information on SAP GRC Access Control you can refer to the following courses: x x
GRC100 SAP Governance, Risk, and Compliance (GRC) 10.0 Principles and Harmonization GRC300 SAP Access Control 10.0 # Implementation
© 2016 Copyright. All rights reserved
HA240
232
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 191: SAP Access Control Manage access risk and prevent fraud
SAP Access Control enables customers to manage access risk and prevent fraud. Automation is the key here. Note: This slide reads starting at the 1 o’clock slot with Analyze Risk. Through this set of capabilities, SAP Access Control helps you to x x x
Get clean (Analyze risk) Stay clean (Manage access and maintain roles) Stay in control (certify authorizations and monitor privileges
© 2016 Copyright. All rights reserved
HA240
233
Unit 4: General Security Requirements and Solutions
Figure 192: SAP Access Control 10.1 System Components and Plugins
© 2016 Copyright. All rights reserved
HA240
234
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 193: Usage Scenario 1 - Rick Analysis
x x x
SAP Access Control is delivered with a comprehensive rule set based on business process and best practice experience. Technical rules are delivered for SAP ERP, Oracle, JD Edwards, and PeopleSoft Business risks are identified across 10 business processes, and technical rules for additional systems can easily be mapped to these risks.
Terminology: Business Process The business area categories in which you would like to report Risk analysis results. Risk An opportunity for physical loss, fraud, process disruption, or productivity loss that occurs when individuals exploit a specific condition Function A Function is a grouping of one or more related Actions and/or Permissions for a specific business area.
© 2016 Copyright. All rights reserved
HA240
235
Unit 4: General Security Requirements and Solutions
Action An activity that is performed in the system in order to fulfill a specific Function, for example, Create Purchase Order or Create Material Master Record Action = Transaction Code Permission Authorizations that allows a user to perform a particular activity in a system Permission = Authorization Object Rule Rule is a one-to-one transaction code conflict. One risk can have many Rules.
Figure 194: Access Risk Definition based on SAP HANA Security Model Function Actions
© 2016 Copyright. All rights reserved
HA240
236
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 195: Access Risk Definition based on SAP HANA Security Model Function Permissions - examples
© 2016 Copyright. All rights reserved
HA240
237
Unit 4: General Security Requirements and Solutions
Figure 196: Example 1 - SoD Risk Analyse in SAP HANA
© 2016 Copyright. All rights reserved
HA240
238
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 197: Example 1 - Analysis Criteria & Result Screen
© 2016 Copyright. All rights reserved
HA240
239
Unit 4: General Security Requirements and Solutions
Figure 198: Example 2 - Critical Action Risk Analyse in SAP HANA
© 2016 Copyright. All rights reserved
HA240
240
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 199: Example 2 - Analysis Criteria & Result Screen
© 2016 Copyright. All rights reserved
HA240
241
Unit 4: General Security Requirements and Solutions
Figure 200: Usage Scenario 2 - Self-service access request and approval process
Workflow driven by SAP Business Workflow technology helps to eliminate manual tasks and make it faster and easier for users to obtain the access that they need in a compliant manner. Pull user details from HR, LDAP, or IdM systems to leverage a single authoritative source and make the process easier on the end user. Supported Scenarios x x x x x x x x x x
User Creation with User ID Flexible Multistage approval workflows Complete audit trail for approval process Risk analysis & mitigation during request approval Auto-provisioning to SAP HANA Provisioning of runtime roles (via GRANT ROLE) Provisioning of runtime analytical privileges to users De-provisioning from SAP HANA (users, roles & APs) Lock & Unlock users (Unlocking also executed for user locked by administrators) Password reset (self-service)
© 2016 Copyright. All rights reserved
HA240
242
Lesson: SAP GRC Integration for Governance Risk and Compliance
Currently Not possible: x x x x
User first and last name do not exist in SAP HANA Concept of user groups does not exist in HANA No difference between users locked by administrators and user locked due to unsuccessful logon attempts in SAP HANA No repository roles or analytical privileges supported (via procedure GRANT_ACTIVATED_ROLE etc.)
Figure 201: Example 1 - Access Request for a New User in SAP HANA
© 2016 Copyright. All rights reserved
HA240
243
Unit 4: General Security Requirements and Solutions
Figure 202: Example 1 - Request Approval Can Include SoD-Risk Analysis
© 2016 Copyright. All rights reserved
HA240
244
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 203: Example 1 - User provisioning in SAP HANA
© 2016 Copyright. All rights reserved
HA240
245
Unit 4: General Security Requirements and Solutions
Figure 204: SAP Basis Risk from SAP GRC Standard Rule Set
© 2016 Copyright. All rights reserved
HA240
246
Lesson: SAP GRC Integration for Governance Risk and Compliance
Figure 205: Requirements and Best Practices
Figure 206: Summary
© 2016 Copyright. All rights reserved
HA240
247
Unit 4: General Security Requirements and Solutions
Lesson: SAP Netweaver Identity Management integration
Figure 207: Learning Objective
Figure 208: Scenario
© 2016 Copyright. All rights reserved
HA240
248
Lesson: SAP Netweaver Identity Management integration
Figure 209: SAP HANA - Security Infrastructure integration
SSAP HANA supports standard and documented interfaces to enable integration with customer security network and datacenter infrastructures
© 2016 Copyright. All rights reserved
HA240
249
Unit 4: General Security Requirements and Solutions
Figure 210: SAP NetWeaver Identity Management - Capabilities
For further information on SAP Identity Management you can refer to the following course. x
ADM920 SAP Identity Management 7.2
© 2016 Copyright. All rights reserved
HA240
250
Lesson: SAP Netweaver Identity Management integration
Figure 211: SAP NetWeaver Identity Management - Use cases
© 2016 Copyright. All rights reserved
HA240
251
Unit 4: General Security Requirements and Solutions
Figure 212: Example of integration with HR Processes
© 2016 Copyright. All rights reserved
HA240
252
Lesson: SAP Netweaver Identity Management integration
Figure 213: HANA connector for SAP NetWeaver Identity Management - Introduction
© 2016 Copyright. All rights reserved
HA240
253
Unit 4: General Security Requirements and Solutions
Figure 214: HANA connector for SAP NetWeaver Identity Management - Current capabilities
© 2016 Copyright. All rights reserved
HA240
254
Lesson: SAP Netweaver Identity Management integration
Figure 215: HANA connector for SAP NetWeaver Identity Management - Supported operations
Figure 216: Summary
© 2016 Copyright. All rights reserved
HA240
255
Unit 4: General Security Requirements and Solutions
Lesson: Extended Application Services (XS) Security and Application Privileges
Figure 217: Learning Objective
© 2016 Copyright. All rights reserved
HA240
256
Lesson: Extended Application Services (XS) Security and Application Privileges
Figure 218: Scenario
Figure 219: Traditional 3-tier applications (Java, ABAP)
In the traditional 3-tier applications (especially from SAP), the database is largely used as a data stored mechanism only (a bit bucket if you will). Massive queries bring large amounts of data back to the application server for processing. Lots of application execution time is spent in the application server looping over records and performing exclusions, calculations, etc. This leads to the need for
© 2016 Copyright. All rights reserved
HA240
257
Unit 4: General Security Requirements and Solutions
database buffers at the application server level. This also creates a situation where most of the computing resources are allocated to several, large application servers since the bulk of all the logic is performed at this level. With HANA, the key to the best application performance is pushing as much of the logic execution into the database as possible. We now “trust” the database. Keep all the data intensive logic down in the database as SQL, SQLScript, and HANA Views. Lightweight imperative logic, flow logic, and service enablement can be down at the Extended Application Services level (XS). XS is not like the traditional application service – no database buffering, stateless only – it should be treated as a light, passthrough layer only. Finally, the complete UI rendering and processing should be done in the client device. Any client side UI development model can be used, although as we will see later SAP provides SAPUI5 (HTML5 libraries and development tools) as well as UI Integration Services (Open Social based, lightweight portal). HANA should serve out static HTML content and JavaScript libraries as well as expose data and logic via pure REST data services. The UI creation, presentation logic and data injection should all happen on the client side.
Figure 220: SAP HANA Extended Application Services (XS) - Overview
© 2016 Copyright. All rights reserved
HA240
258
Lesson: Extended Application Services (XS) Security and Application Privileges
Figure 221: User handling in XS Plain DB user
Plain DB User Scenario Since the same user is used on all levels, the roles that are assigned to the user must contain all privileges that the user needs to execute the application. x
Homogeneous way of granting all privileges x The granted SQL privileges are also effective when the user works with different applications, or even on the SQL console; in many cases, this is a significant security risk! Note that the announced solution of "context-related privileges" has been withdrawn, due to the too high implementation complexity (the risk that future extensions in HANA would break the model was assessed too high). x Working with personal DB users requires that the HANA userbase is maintained properly; this can be a complex and expensive process (creation and deletion of users, and especially updates to the roles they should have)
© 2016 Copyright. All rights reserved
HA240
259
Unit 4: General Security Requirements and Solutions
Figure 222: User handling in XS SQLCC scenario (best practice for stand-alone XS Apps)
SQLCC Scenario The logon user maps to a personal DB user, but this is user is used on XS level only, the DB activities run via sqlcc connections and thus using a technical user. x x
The necessary SQL privileges are granted to the SQLCC user only, the logon user just needs the XS application privileges -> no security risk anymore Maintaining the personal DB users is still complex (see above)
© 2016 Copyright. All rights reserved
HA240
260
Lesson: Extended Application Services (XS) Security and Application Privileges
Figure 223: User handling in XS Anonymous section scenario
Anonymous Section Scenario No logon is enforced; XS privilege checks will thus fail and must be avoided. OData services and plain DB access from xsjs are only possible in packages with configured default connection. User-specific Instance-filtering is for obvious reasons not possible.
© 2016 Copyright. All rights reserved
HA240
261
Unit 4: General Security Requirements and Solutions
Figure 224: User handling in XS Technical user scenario
Technical User Scenario The logon may be successful without mapping to a DB user; XS will continue working as long as no user is required: XS privilege checks will fail, plain DB access is not possible. To support DB access, packages must be configured with a default connection. All SQL connections (xsjs and OData) are then opened for the configured sqlcc user, which is thus used for checking all SQL privileges. x x x
the necessary SQL privileges are granted to the technical user(s) only -> no security hole no personal DB users are used -> no User Maintenance nightmare in case that multiple technical users are used (not the case for HPAs), the User Maintenance nightmare is replaced with the still difficult task of defining a mapping of logon users to the few technical users
Since XS application privileges cannot be used, the application must use other means to protect their semantics in a fine-grained way. The HPAs use the HDB_AUTHORITY_CHECK. In order to support this, XS provides access to the name of the logged-on user. The ABAP client and the schema of the ABAP tables must be provided to the HPA e.g. via static configuration.
© 2016 Copyright. All rights reserved
HA240
262
Lesson: Extended Application Services (XS) Security and Application Privileges
Figure 225: Application Privileges Introduction
© 2016 Copyright. All rights reserved
HA240
263
Unit 4: General Security Requirements and Solutions
Figure 226: Application Privileges Details
The application privileges referenced in the role definition (for example, Display and View) are actually defined in an application-specific .xsprivileges file which also contains entries for additional privileges. The package where the .xsprivileges resides defines the scope of the application privileges; the privileges specified in the .xsprivileges file can only be used in the package where the .xsprivileges resides (or any sub-packages). This is checked during activation of the .xsaccess file and at runtime in the by the XS JavaScript API $.session.(has|assert)AppPrivilege(). The privileges are authorized for use with an application by inserting the authorization keyword into the corresponding .xsaccess file. Like the .xsprivileges file, the .xsaccess file must reside either in the root package of the application to which the privilege authorizations apply or the specific subpackage which requires the specified authorizations.
© 2016 Copyright. All rights reserved
HA240
264
Lesson: Extended Application Services (XS) Security and Application Privileges
Note: If a privilege is inserted into the .xsaccess file as an authorization requirement, a user must have this privilege to access the application package where the .xsaccess file resides. If there is more than one privilege, the user must have at least one of these privileges to access the content of the package.
Figure 227: Server Side JavaScript Security Considerations
Note: If you want to create own XS-application please have a look in the SAP HANA Development guide. Here you will find best practice how you should write it from security from standpoint of security. The following list illustrates the areas where special attention is required to avoid security-related problems when writing server-side JavaScript. Each of the problems highlighted in the list is described in detail in its own dedicated section:
© 2016 Copyright. All rights reserved
HA240
265
Unit 4: General Security Requirements and Solutions
SSL/HTTPS Enable secure HTTP (HTTPS) for inbound communication required by an SAP HANA application. Injection flaws In the context of SAP HANA Extended Application Services (SAP HANA XS) injection flaws concern SQL injection that modifies the URL to expand the scope of the original request. Cross-site scripting (XSS) Web-based vulnerability that involves an attacker injecting JavaScript into a link with the intention of running the injected code on the target computer. Broken authentication and session management Leaks or flaws in the authentication or session management functions allow attackers to impersonate users and gain access to unauthorized systems and data. Insecure direct object references An application lacks the proper authentication mechanism for target objects. Cross-site request forgery (XSRF) Exploits the trust boundaries that exist between different Web sites running in the same web browser session. Incorrect security configuration Attacks against the security configuration in place, for example, authentication mechanisms and authorization processes. Insecure cryptographic storage Sensitive information such as logon credentials is not securely stored, for example, with encryption tools. Missing restrictions on URL Access Sensitive information such as logon credentials is exposed. Insufficient transport layer protection Network traffic can be monitored, and attackers can steal sensitive information such as logon credentials or credit-card data.
© 2016 Copyright. All rights reserved
HA240
266
Lesson: Extended Application Services (XS) Security and Application Privileges
Invalid redirects and forwards Web applications redirect users to other pages or use internal forwards in a similar manner. XML processing issues Potential security issues related to processing XML as input or to generating XML as output Enable secure HTTP (HTTPS) for inbound communication required by an SAP HANA application. Injection flaws In the context of SAP HANA Extended Application Services (SAP HANA XS) injection flaws concern SQL injection that modifies the URL to expand the scope of the original request. Cross-site scripting (XSS) Web-based vulnerability that involves an attacker injecting JavaScript into a link with the intention of running the injected code on the target computer. Broken authentication and session management Leaks or flaws in the authentication or session management functions allow attackers to impersonate users and gain access to unauthorized systems and data. Insecure direct object references An application lacks the proper authentication mechanism for target objects. Cross-site request forgery (XSRF) Exploits the trust boundaries that exist between different Web sites running in the same web browser session. Incorrect security configuration Attacks against the security configuration in place, for example, authentication mechanisms and authorization processes. Insecure cryptographic storage Sensitive information such as logon credentials is not securely stored, for example, with encryption tools. Missing restrictions on URL Access Sensitive information such as logon credentials is exposed.
© 2016 Copyright. All rights reserved
HA240
267
Unit 4: General Security Requirements and Solutions
Insufficient transport layer protection Network traffic can be monitored, and attackers can steal sensitive information such as logon credentials or credit-card data. Invalid redirects and forwards Web applications redirect users to other pages or use internal forwards in a similar manner. XML processing issues Potential security issues related to processing XML as input or to generating XML as output
© 2016 Copyright. All rights reserved
HA240
268
Lesson: Extended Application Services (XS) Security and Application Privileges
Unit 5: Authorization Trace and Auditing
© 2016 Copyright. All rights reserved
HA240
269
Unit 5: Authorization Trace and Auditing
Lesson: Authorization Trace
Figure 228: Learning Objective
Figure 229: Scenario
© 2016 Copyright. All rights reserved
HA240
270
Lesson: Authorization Trace
Figure 230: Authorization Trace Prerequisites
Figure 231: Procedure: How to use authorization trace
© 2016 Copyright. All rights reserved
HA240
271
Unit 5: Authorization Trace and Auditing
For additional information see the following note 1809199 - SAP HANA DB: Debugging user authorization errors
Figure 232: Procedure: How to use authorization trace - Activate the trace
© 2016 Copyright. All rights reserved
HA240
272
Lesson: Authorization Trace
Figure 233: Procedure: How to use authorization trace - Reproduce the issue
© 2016 Copyright. All rights reserved
HA240
273
Unit 5: Authorization Trace and Auditing
Figure 234: Procedure: How to use authorization trace - Deactivate the trace
© 2016 Copyright. All rights reserved
HA240
274
Lesson: Authorization Trace
Figure 235: Procedure: How to use authorization trace - Analyze the trace
© 2016 Copyright. All rights reserved
HA240
275
Unit 5: Authorization Trace and Auditing
Figure 236: Additional information
In the definition of the analytical privileges, pay attention to two restrictions with the restriction types CUBERESTRICTION and DIMENSIONRESTRICTION: Only if a view is included in the one of the cube restrictions and at least one of its attribute is employed by one of the dimension restrictions, access to the view is granted by this analytical privilege. Without specific authorization a user can only see privileges granted to himself in the system views EFFECTIVE_PRIVILEGES and STRUCTURED_PRIVILEGES. This is sufficient to find out own missing analytical privileges.
© 2016 Copyright. All rights reserved
HA240
276
Lesson: Authorization Trace
Figure 237: Summary
© 2016 Copyright. All rights reserved
HA240
277
Unit 5: Authorization Trace and Auditing
© 2016 Copyright. All rights reserved
HA240
278
Exercise 6: Authorization Trace
Exercise 6: Authorization Trace
Exercise Objectives After completing this exercise, you will be able to: x x
Trace authorization issues Read and understand content of the trace
Task 1: From the HANA Studio execute the following steps. 1. Login to the HANA Database with MINI## user using the following details 1. Username: MINI## (where ## corresponds to your grup ID) 2. Password: Training1 2. Preview the content of the Attribute View “AT_SUPPLIER” view under the package “TRAINING.HA240.Models”. 3. The user MINI## in not authorized to see the content of that view. 4. Now login with STUDENT## and activate a new authorization trace for user MINI##. 5. Try again to preview the content of the Attribute View “AT_SUPPLIER” (package “TRAINING.HA240.Models”) with user MINI## (you get the same error). 6. Deactivate the trace. 7. Analyze the trace. 8. Assign to user MINI## the relevant privileges using the role "TRAINING.HA240.Roles::VIEW_SUPPLIER_OBJP". 9. Try again to preview the content of the Attribute View “AT_SUPPLIER” (package “TRAINING.HA240.Models”) with user MINI## 10. You still get the same error
© 2016 Copyright. All rights reserved
HA240
279
Unit 5: Authorization Trace and Auditing
Task 2: From the HANA Studio execute the following steps. 1. Execute again the trace reproducing the issue with user MINI## as done in the previous task. This time use HA240MINI##TRACE2 (where ## is your group number) as context name for the trace 2. Analyze the new trace 3. Check the Analytic Privilege "AP_SUPPLIER" under package “TRAINING.HA240.AnalyticPrivileges". 4. Assign to user MINI## the relevant privileges using the role "TRAINING.HA240.Roles::VIEW_SUPPLIER_AP". 5. Try again to preview the content of the Attribute View “AT_SUPPLIER” (package “TRAINING.HA240.Models”) with user MINI##. 6. Now you see the content of the view. 7. List all the authorizations that were required to see the content of the view.
© 2016 Copyright. All rights reserved
HA240
280
Exercise 6: Authorization Trace
Solution of Exercise 6
Task 1: From the HANA Studio execute the following steps. 1. Login to the HANA Database with MINI## user using the following details 1. On HANA Studio right click on the current system entry (with STUDENT## user) and select "Add system with different user..."
2. Type username MINI## (where ## is your group numnber) and password Training1 3. Change the password typing the current one and a new password twice 2. Preview the content of the Attribute View “AT_SUPPLIER” view under the package “TRAINING.HA240.Models”. 1. Naviagte to Content >> TRAINING >> HA240 >> Models >> Attribute Views
2. Right click on AT_SUPPLIER and select "Data Preview". 3. Switch to "Raw Data" tab
© 2016 Copyright. All rights reserved
HA240
281
Unit 5: Authorization Trace and Auditing
3. The user MINI## in not authorized to see the content of that view. 4. Now login with STUDENT## and activate a new authorization trace for user MINI##. 1. Double click on the system entry
to open the administration concole
2. Switch to tab 3. On the section "User-Specific Trace" click the configuration button on the right
4. In the resulting window fill the Context Name and Database User as shown in the picture (using your group number instead of 00)
5. In the lower part select the option "Show All Components" 6. Type "Authorization" in the search area and change the System Trace Level for component Authorization under Indexserver to INFO
7. Click on Finish to complete the configuration and activate the trace
© 2016 Copyright. All rights reserved
HA240
282
Exercise 6: Authorization Trace
5. Try again to preview the content of the Attribute View “AT_SUPPLIER” (package “TRAINING.HA240.Models”) with user MINI## (you get the same error). 1. Naviagte to Content >> TRAINING >> HA240 >> Models >> Attribute Views 2. Right click on AT_SUPPLIER and select "Data Preview". 3. Switch to "Raw Data" tab 6. Deactivate the trace. 1. Go back to the configuration on "Trace" tab and click the red cross corresponding to your configuration (check the context name defined before)
2. Check the context name and confirm the pop-up message with Yes
7. Analyze the trace. 1. On the same window switch to tab 2. Locate the file containing the context name you defined before (HA240AUTHTRACE##) 3. If you can't locate the file immediately Use the Modified column to order the file by last modified and the refresh button to update the list
4. Double click on the file name to see the content
5. 6. The error shows a missing privilege on the catalog object corresponding to the view AT_SUPPLIER in schema _SYS_BIC
© 2016 Copyright. All rights reserved
HA240
283
Unit 5: Authorization Trace and Auditing
8. Assign to user MINI## the relevant privileges using the role "TRAINING.HA240.Roles::VIEW_SUPPLIER_OBJP". 1. Open user MINI## using your STUDENT## Security folder 2. Add role "TRAINING.HA240.Roles::VIEW_SUPPLIER_OBJP" to the user and activate the change
9. Try again to preview the content of the Attribute View “AT_SUPPLIER” (package “TRAINING.HA240.Models”) with user MINI## 10. You still get the same error
© 2016 Copyright. All rights reserved
HA240
284
Exercise 6: Authorization Trace
Task 2: From the HANA Studio execute the following steps. 1. Execute again the trace reproducing the issue with user MINI## as done in the previous step. This time use HA240MINI##TRACE2 (where ## is your group number) as context name for the trace
1. Remember to deactivate the trace after you reproduced the issue 2. Analyze the new trace
1. This time the trace shows a missing Analytic Privilege on the attribute view 3. Check the Analytic Privilege "AP_SUPPLIER" under package “TRAINING.HA240.AnalyticPrivileges". 1. Navigate to TRAINING >> HA240 >> AnalyticPrivileges 2. Open object "AP_SUPPLIER" 3. Check that the privilege contain the missing Attribute View without restriction on the content
© 2016 Copyright. All rights reserved
HA240
285
Unit 5: Authorization Trace and Auditing
4. Assign to user MINI## the relevant privileges using the role "TRAINING.HA240.Roles::VIEW_SUPPLIER_XMLAP". 1. Open user MINI## using your STUDENT## Security folder 2. Add role "TRAINING.HA240.Roles::VIEW_SUPPLIER_XMLAP" to the user and activate the change
5. Try again to preview the content of the Attribute View “AT_SUPPLIER” (package “TRAINING.HA240.Models”) with user MINI##. 6. Now you see the content of the view.
7. List all the authorizations that were required to see the content of the view. 1. Object Privilege on the catalog view in schema _SYS_BIC 2. One valid Analytic Privilege on the Attribute View "AT_SUPPLIER"
© 2016 Copyright. All rights reserved
HA240
286
Lesson: Audit Logging
Lesson: Audit Logging
Figure 238: Learning Objective
Around 20 percent of respondents in North America and 31 percent in EMEA say one or more of their co-workers have used administrative privileges to reach confidential or sensitive information. The auditing feature of the SAP HANA database allows you to track actions performed in the database: who did what (or tried to do what), and when. SAP HANA provides audit actions for critical security events and for access to sensitive data. Both successful and unsuccessful events can be logged. In the case of logging of successful and unsuccessful events, one has to specify for each audit policy if successful and/or unsuccessful events will be audited. Audit logging is not enabled by default.
© 2016 Copyright. All rights reserved
HA240
287
Unit 5: Authorization Trace and Auditing
Figure 239: Audit Logging - Introduction
© 2016 Copyright. All rights reserved
HA240
288
Lesson: Audit Logging
Figure 240: Audit Logging - Audit Policy
The first step for using the AUDIT Activity is to "enable" this function like you see it on the screenshot above. For that do you need the system privilege AUDIT ADMIN. Currently the configuration parameter for auditing are stored i global.ini configuration file, in the auditing configuration section. As for all configuration parameters, these parameters can be selected in view M_INIFILE_CONTENTS, assuming that the current user has the required privileges. System Views x x x
AUDIT_POLICIES: All audit policies and their states. M_INIFILE_CONTENTS: Configuration parameter concerning auditing. AUDIT_LOG : Audit logs
© 2016 Copyright. All rights reserved
HA240
289
Unit 5: Authorization Trace and Auditing
Only database users with system privilege CATALOG READ, DATA ADMIN or INIFILE ADMIN can view information in the M_INIFILE_CONTENTS view. For other database users this view will be empty.
Figure 241: Audit Logging - Actions
Main Topics of audit actions are: x x x x x x x x x
Backup Deletions Data Definitions Data Queries Encryption Granting and Revoking Authorizations License deletion and installation Procedure executions Repository content operations User and role management
© 2016 Copyright. All rights reserved
HA240
290
Lesson: Audit Logging
Figure 242: Enable Audit Policy in SAP HANA Studio
Can be combined together in the same policy, therefore compatible audit actions have been grouped together. When you select an action, those actions that are not compatible with the selected action become unavailable for selection. If you need to two audit incompatible audit actions, you need to create two separate audit policies. In addition to the actions to be audited, an audit policy specifies additional parameters that further narrow the number of events actually audited. x
x
Audited action status x On successful execution x On unsuccessful execution x On both successful and unsuccessful execution Target object x Tables x Views x Procedures
© 2016 Copyright. All rights reserved
HA240
291
Unit 5: Authorization Trace and Auditing
x
Audited user x Individual users can be included/excluded from an audit level EMERGENCY ALERT CRITICAL WARNING INFO
When an audit policy is triggered, that is, when an action in the policy occurs under the conditions defined in the policy, an audit entry is created in the audit trail. Firefighter logging logs all actions performed by a specific user. This covers not only all actions that can be audited individually, but also actions that cannot otherwise be audited. Such a policy is useful if you want to audit the actions of a particularly privileged user. Note: Some actions cannot be audited using database auditing even with a policy that includes all actions, in particular, system restart and system recovery. Caution: Firefighter logging may generate a lot of audit entries, so only enable it if required Audit entries written to the table are only accessible through the public system view AUDIT_LOG. Only SELECT operations can be performed on this view by users with the system privilege AUDIT OPERATOR or AUDIT ADMIN.
Figure 243: Events that Can be Audited
© 2016 Copyright. All rights reserved
HA240
292
Lesson: Audit Logging
Changes to user authorization x x x x x
Create/drop user, create/drop role Grant/revoke role Grant/revoke SQL privilege, system privilege, analytical privilege Create/drop analytical privilege Create/drop and alter structured privilege
Authentication of users x
Connection attempts of users to the database
Changes to system configuration x x x
Changes to system configuration, e.g. ini file Uninstall and install license key Set system license/unset system license all
Access to or changing of sensitive data You can specify the following database objects to be audited: x x x
Tables Views Procedures
Both write and read access to data can be recorded: x x x x x
SELECT INSERT UPDATE DELETE EXECUTE
Changes to system configuration As of SPS08 the previous values of parameters are written to the audit trail if audit logging for configuration changes is enabled. Hint: Only actions that take place inside the database engine can be audited. If the database engine is not online when an action occurs, it cannot be detected and therefore cannot be audited. These actions are, for example, an upgrade of an SAP HANA database instance or direct changes to system configuration files using operating system commands.
© 2016 Copyright. All rights reserved
HA240
293
Unit 5: Authorization Trace and Auditing
Activation of Audit Policies Auditing is implemented through the creation and activation of audit polices. An audit policy defines the actions to be audited, as well as the conditions under which the action must be performed to be relevant for auditing. For example, actions in a particular policy are audited only when they are performed by a particular user on a particular object. When an action occurs, the audit policy is triggered and an audit event is written to the audit trail.
Figure 244: Audit Logging – Infrastructure
When an audit policy is triggered, an audit entry is created in the audit trail. The audit trail is written to Linux syslog or to an internal system table.
© 2016 Copyright. All rights reserved
HA240
294
Lesson: Audit Logging
Linux syslog The logging system of the Linux operating system (syslog) is a secure storage location for the audit trail because not even the database administrator can access or change it. There are also numerous storage possibilities for the syslog, including storing it on other systems. In addition, the syslog is the default log daemon in UNIX systems. The syslog therefore provides a high degree of flexibility and security, as well as integration into a larger system landscape. For more information about how to configure syslog, refer to the documentation of your operating system. Database table x x x
Using an SAP HANA database table as the target for the audit trail makes it possible to query and analyze auditing information quickly. It also provides a secure and tamper-proof storage location.– Internal column store table in the _SYS_AUDIT schema of the SAP HANA database Audit entries are only accessible through the public system view AUDIT_LOG. Only SELECT operations can be performed on this view by users with system privilege AUDIT ADMIN or AUDIT OPERATOR To avoid the audit table growing too large, it is possible to delete old audit entries
Note: For test purposes in non-production systems, you can also use a CSV text file as the audit trail. A separate CSV file is created for every service that executes SQL. Hint: As of SPS08 multiple audit trail targets could be configured. System-wide default: Audit entries are written to the audit trail target(s) configured for the system if no other trail target has been configured per audit level Audit level (optional): Audit entries from audit policies with the audit level EMERGENCY, CRITICAL, or ALERT are written to the specified audit trail target(s). If no audit trail target is configured, entries are written to the audit trail target configured for the system.
© 2016 Copyright. All rights reserved
HA240
295
Unit 5: Authorization Trace and Auditing
Figure 245: Viewing the audit trail
If the audit trail target is a database table, you can avoid the audit table growing indefinitely by deleting audit entries created up until a certain time and date. Caution: All information in the audit trail that is older will be immediately deleted.
If auditing is active, certain actions are always audited and are therefore not available for inclusion in user-defined audit policies. In the audit trail, these action are labeled with the internal audit policy MandatoryAuditPolicy. Mandatory audit actions: x x
Creation, modification, or deletion of audit policies x Deletion of audit entries from the audit trail. This only applies if audit entries are written to column store database tables. Changes to auditing configuration, that is: x Enabling or disabling auditing x Changing the audit trail target x Changing the location of the audit trail target if it is a CSV text file
© 2016 Copyright. All rights reserved
HA240
296
Lesson: Audit Logging
AUDIT_POLICIES: All audit policies and their states. M_INIFILE_CONTENTS: Configuration parameter concerning auditing. AUDIT_LOG: Audit log. Only database users with system privilege CATALOG READ, DATA ADMIN or INIFILE ADMIN can view information in the M_INIFILE_CONTENTS view. For other database users this view will be empty.
Figure 246: Empty the audit table if it grows too large
© 2016 Copyright. All rights reserved
HA240
297
Unit 5: Authorization Trace and Auditing
Figure 247: Audit Policy Example
© 2016 Copyright. All rights reserved
HA240
298
Exercise 7: Auditing
Exercise 7: Auditing
Exercise Objectives After completing this exercise, you will be able to: x x x
Configuring Audit Logging Enabling an Audit Policy Read the Audit Trail
Task: 1. Open the Security Console in HANA Studio or in the Web IDE (Security) 2. Check that audit logging is active and use Database Table as audit trail target. 3. Activate an audit policy which records grant role and revoke role actions for your user STUDENT## 4. Open user USER## and revoke role ROLE_ANALYTIC_##, save and activate 5. Now add again role ROLE_ANALYTIC_##, save and activate 6. Check the content of the Audit Log table and search these to actions
© 2016 Copyright. All rights reserved
HA240
299
Unit 5: Authorization Trace and Auditing
Solution of Exercise 7
Task: Activate an audit policy which records all role grant and revoke operations executed by your STUDENT## user. 1. Open the Security Console in HANA Studio or in the Web IDE (Security) 2. Check that audit logging is active and use Database Table as audit trail target.
3. Activate an audit policy which records grant role and revoke role actions for your user STUDENT## 1. Add a new policy 2. Use “STUENT## - Role grants and revokes” as policy name 3. Select “Enabled” as policy status 4. Select “GRANT ROLE” and REVOKE ROLE” as actions 5. Select “INFO” as Audit Level 6. Select only your STUDENT## user in Users column 7. Save and activate the rule
4. Open user USER## and revoke role ROLE_ANALYTIC_##, save and activate 5. Now add again role ROLE_ANALYTIC_##, save and activate 6. Check the content of the Audit Log table and search these to actions 1. Right click on the HANA system which uses ‘STUDENT##’ user for connection and select SQL Console 2. To check the resulting entry in the audit trail (database table) enter the sql command below: select * from AUDIT_LOG
© 2016 Copyright. All rights reserved
HA240
300
Exercise 7: Auditing
Unit 6: Integrative Authorization Scenarios
© 2016 Copyright. All rights reserved
HA240
301
Unit 6: Integrative Authorization Scenarios
Lesson: Scenarios Introduction
Figure 248: Learning Objective
Figure 249: Scenario
© 2016 Copyright. All rights reserved
HA240
302
Lesson: Scenarios Introduction
Figure 250: Traditional security architecture
© 2016 Copyright. All rights reserved
HA240
303
Unit 6: Integrative Authorization Scenarios
Figure 251: SAP HANA Scenario Overview of different scenario types
Traditional 3-tier application Classical architecture with Client, Application Server and SAP HANA used as a database for the NetWeaver platform Data mart (3-tier or 2-tier) HANA used as data mart platform to load data from external source and execute analysis and queries on those data using end-users client or analytics applications (Business Object BI Platform). Native 2-tier application In this architecture the XS Engine component is used and the HANA platform acts as Database and Application Server. In this case all the server pieces are provided by the HANA Platform.
© 2016 Copyright. All rights reserved
HA240
304
Lesson: Scenarios Introduction
Figure 252: Traditional 3-tier application - Database migration to HANA
End-users authorizations All the authorization and user management functionaly previously used in Netweaver are still valid and working after the migration. No change here. Developers All the ABAP development and customizing can still be done using the same authorizations as before. No change here. Administrators The basis administrators working on the application server can still work using the same authorizations. No change here. All the administrators working on the database level can still use the DBA Cockpit transaction or create a specific user with specific authorizations on the database level.
© 2016 Copyright. All rights reserved
HA240
305
Unit 6: Integrative Authorization Scenarios
Figure 253: Integrated Scenario - Reporting in ERP Data in SAP HANA
In this case tha HANA is used as database where data should be replicated (side-car) or reside (Netweaver on HANA). In addition to the standard access via Application Server (see previous scenario) you also would like to access the data in HANA directly and this requires a user on the database level with specific authorizations. For additional details please see the following link: http://help.sap.com/saphelp_hba/helpdata/en/da/28a39e975f4e85a5eb69d20b5668de/frameset.h tm
© 2016 Copyright. All rights reserved
HA240
306
Lesson: Scenarios Introduction
Figure 254: Integrated Scenario - Reporting on BW Data in SAP HANA
Starting with BW 740 SP5, BW can automatically generate views incl. HANA privileges based on BW privileges These HANA privileges are always automatically assigned to a HANA role that is also automatically generated Role is automatically granted to all database users in HANA if they fulfil the following requirements: x x
For each database user in HANA there is a corresponding BW user (either configured in SU01, or via name matching BW user HANA database user) The BW user is authorized to execute queries on the respective info provider
Recommendation: regularly update the HANA authorizations from the BW authorizations, schedule a regular process chain BW for this More information: http://help.sap.com/saphelp_nw74/helpdata/en/a0/f2b32ffcaa40deb60ba4515bbb559e/co ntent.htm?frameset=/en/fd/1971cc49a94afc934706cbece6f2d7/frameset.htm
© 2016 Copyright. All rights reserved
HA240
307
Unit 6: Integrative Authorization Scenarios
Figure 255: Integrated Scenario - Users generation from ABAP
More information on SAP Help Portal: http://help.sap.com/saphelp_nw74/helpdata/en/22/47bbe205af4c9b9ffef355f9d1a89d/content.htm?fra meset=/en/22/47bbe205af4c9b9ffef355f9d1a89d/frameset.htm
© 2016 Copyright. All rights reserved
HA240
308
Lesson: Scenarios Introduction
Figure 256: Data Mart - Customer specific analytic reporting on SAP HANA
© 2016 Copyright. All rights reserved
HA240
309
Unit 6: Integrative Authorization Scenarios
Figure 257: HANA as Web Application Server - Native applications built on SAP HANA XS
© 2016 Copyright. All rights reserved
HA240
310
Lesson: Scenarios Introduction
Figure 258: Multitenant database containers - A new way to separate access
System database x x x
No schemas with business data Monitoring – system, cumulated for tenants Configuration/management – system, high-level for tenants
Tentant databases x x
Schemas with business data Monitoring, configuration, management of tenant database
© 2016 Copyright. All rights reserved
HA240
311
Unit 6: Integrative Authorization Scenarios
2 levels of administration Administration tasks performed in the system database include: x x x x
Starting and stopping the whole system Monitoring the system Configuring parameters at system level Managing tenant databases: Creating/dropping databases, configuring database-specific parameters, adding services to databases for scalability, backing up databases, recovering databases
Administration tasks performed in tenant databases include: x x x x x
Monitoring the database Provisioning database users Creating and deleting schemas, tables, and indexes in the database Backing up the database Configuring database-specific parameters
Figure 259: Summary
© 2016 Copyright. All rights reserved
HA240
312
Lesson: Scenario BW + SAP HANA
Lesson: Scenario BW + SAP HANA
Figure 260: Learning Objective
© 2016 Copyright. All rights reserved
HA240
313
Unit 6: Integrative Authorization Scenarios
Figure 261: Scenario
In our course we use BW 7.5. and HANA SPS11. The basic procedure in former releases are the same but some details are a bit different (for example the names of generated HANA objects).
© 2016 Copyright. All rights reserved
HA240
314
Lesson: Scenario BW + SAP HANA
Figure 262: The Idea behind
x x x x x x
Direct consumption of BW data via generated HANA views Clear Interface to schema/data managed by BW Usage of generated view in HANA Studio to build own data models using BW data and HANA native algorithms Part of the BW InfoProvider lifecycle, also regarding transportation Automatic replication of required BW authorizations (no View access if authorizations cannot be replicated) Data is requested directly from SAP HANA w/o BW in between (no cache, OLAP statistics, …)
© 2016 Copyright. All rights reserved
HA240
315
Unit 6: Integrative Authorization Scenarios
Figure 263: Access data from BW and SAP HANA Studio
© 2016 Copyright. All rights reserved
HA240
316
Lesson: Scenario BW + SAP HANA
Figure 264: Representation of BW Authorizations in SAP HANA
x x x
Roles contain SQL Privileges and EXECUTE rights on generated procedures SQL Privileges use procedures to read filter string from BW table Procedures access BW table to read filter string and add 0REQUID/0REQTSN condition if required
© 2016 Copyright. All rights reserved
HA240
317
Unit 6: Integrative Authorization Scenarios
Figure 265: (General) Prerequisites when Replicating BW Authorizations to SAP HANA
© 2016 Copyright. All rights reserved
HA240
318
Lesson: Scenario BW + SAP HANA
Figure 266: Settings for External SAP HANA View for BW Objects
In our exercise we are going to use option 'C'. That means we use the same user names for BW and HANA.
© 2016 Copyright. All rights reserved
HA240
319
Unit 6: Integrative Authorization Scenarios
Figure 267: Step-bystep procedure
Analysis authorizations must be created. The analysis authorizations must be defined for all characteristics flagged as authorization-relevant in the InfoProvider. They must also contain all technical characteristics for the InfoProvider, the key figures and the activity.
© 2016 Copyright. All rights reserved
HA240
320
Lesson: Scenario BW + SAP HANA
Figure 268: How to keep replicated authorizations in SAP HANA up2date
You will execute all these steps in the following exercise.
© 2016 Copyright. All rights reserved
HA240
321
Unit 6: Integrative Authorization Scenarios
Figure 269: Step-bystep procedure - Filter String in BW
This is an example for a limited authorization of USER MINI01. In row VALUE is defined that this user can only see values for company code ‘0001’- (0COMP_CODE is the technical name of the BW characteristic for company code).
© 2016 Copyright. All rights reserved
HA240
322
Lesson: Scenario BW + SAP HANA
Figure 270: Step-bystep procedure - Generating the View and the Authorizations
Please note: All the generate objects have the präfix ‘bw2hana’
© 2016 Copyright. All rights reserved
HA240
323
Unit 6: Integrative Authorization Scenarios
Figure 271: Step-bystep procedure - Role content in SAP HANA
© 2016 Copyright. All rights reserved
HA240
324
Lesson: Scenario BW + SAP HANA
Figure 272: Automatical assigment role to HANA user
The new role just generated from BW system (automatically assigned)
© 2016 Copyright. All rights reserved
HA240
325
Unit 6: Integrative Authorization Scenarios
Figure 273: Summary
© 2016 Copyright. All rights reserved
HA240
326
Exercise 8: BW Authorizations Reuse by SAPHANA
Exercise 8: BW Authorizations Reuse by SAPHANA
Exercise Objectives After completing this exercise, you will be able to: x
Replicate BW authorizations from BW on HANA to plain HANA
Figure 274: Exercise 8: Business Background
© 2016 Copyright. All rights reserved
HA240
327
Unit 6: Integrative Authorization Scenarios
Figure 275: Exercise 8: Initial situation
For those of you who are not familare with SAP BW some additional information. From a reporting point of view, an InfoCube describes a self-contained dataset, for example, of a business-orientated area. This dataset can be evaluated in a Query. From the technical side an InfoCube is a quantity of relational tables arranged according to the star schema: A large fact table in the middle surrounded by several dimension tables. And Multiprovider have access to more than one Infoprovider (e.g. Cube). They are used for the definition of queries.
© 2016 Copyright. All rights reserved
HA240
328
Exercise 8: BW Authorizations Reuse by SAPHANA
Its main components are: Charkateristics like for instance Company Code, Costcenter, material, sales order etc. Key Figures
like for example Benefit, Overhead cost, Production cost etc.
All InfoObjects (characteristics and key figures) are available independent of the InfoCube. Characteristics refer to master data with their attributes and text descriptions. Characteristics refer to the master data with their attributes and text descriptions. All InfoObjects (characteristics with their master data as well as key figures) are available for all InfoCubes, unlike dimensions, which represent the specific organizational form of characteristics in one InfoCube. In the cernel of each cube is the fact table. It holds the data to be analyzed, and a dimension table stores data about the ways in which the data in the fact table can be analyzed. Usally you can find hundreds of cubes an thousends of InfoObject in an fully developed BW System. But only some charakteristics are important for authorization. For example: Costcenter:
Because only the costcenter manager should see the results of its costcenter.
Company Code: Because its the are of balance sheet and its important to select the range of receivers for all special informations regarding a company code. You can define the authorizatian relevant charakteristics for each cube seperately!! For our cube ZH240_00 the authorization relevant InfoObjects are: x x x
Company Code Costcenter Client
Special technical mandantory characteristics for the definition of authorization are: x x x x
0TCAKYFNM - This InfoObject allow even to see some key figures 0TCAIPROV - With this charateristic you can control access for an Infoprovider (for example for a cube in the case its only one component of an Multiprovider) 0TCAACTVT - This characteristic is to handle general activity like create, change, display AND 0TCAVALID - This handles the authorization for period validity
© 2016 Copyright. All rights reserved
HA240
329
Unit 6: Integrative Authorization Scenarios
Figure 276: Exercise 8: The cube ZH240_00
Lets have a look in the fact table of our cube. In the screen above you see an view of selected fields of ZH240_00. You see the content of the fields: x x
0COMPANY_CODE and 0AMOUNT
© 2016 Copyright. All rights reserved
HA240
330
Exercise 8: BW Authorizations Reuse by SAPHANA
Figure 277: Exercise 8: Task 1
© 2016 Copyright. All rights reserved
HA240
331
Unit 6: Integrative Authorization Scenarios
Figure 278: Exercise 8: Task 2
Figure 279: Exercise 8: Task 3
© 2016 Copyright. All rights reserved
HA240
332
Exercise 8: BW Authorizations Reuse by SAPHANA
Figure 280: Exercise 8: Task 4
© 2016 Copyright. All rights reserved
HA240
333
Unit 6: Integrative Authorization Scenarios
Figure 281: Exercise 8: Task 5
© 2016 Copyright. All rights reserved
HA240
334
Exercise 8: BW Authorizations Reuse by SAPHANA
Figure 282: Exercise 8: The result
© 2016 Copyright. All rights reserved
HA240
335
Unit 6: Integrative Authorization Scenarios
Solution of Exercise 8
Figure 283: Exercise 8: Solution Task 1
Please log in in BW- Client 001 of the system T85.
Start Transaction x x
RSECADMIN.
Choose the button with the magnifier with label "Ind.Maint." (Authorization Maintenance"). Enter the name of your authorization "HA240-##" and press the "Create Button" . ##- is your group number!
x
Please enter a short discription in the field "Short Text"
© 2016 Copyright. All rights reserved
HA240
336
Exercise 8: BW Authorizations Reuse by SAPHANA
Three hints to make your work easier. To create a '*' entry in the column " Interval" please you the '*' - Button on the top To insert the authorization relevant charakteristics; please use the cube button
By using this Icon (Insert special characteristics) you will complete the necessary entries.
© 2016 Copyright. All rights reserved
HA240
337
Unit 6: Integrative Authorization Scenarios
Now you have to specify the company code. Therefore you have to select charakteristic 0COMPCODE and choose "Detail".
Now press the "White paper button" to create the selection.
##- is your group number! Choos the green arrow (F3) to go back.
Now use the star- button for the other fields. After that you should have the following definitions.
© 2016 Copyright. All rights reserved
HA240
338
Exercise 8: BW Authorizations Reuse by SAPHANA
Please don't forget to
save and activate your authorization!
Figure 284: Exercise 8: Solution Task 2 and 3
With transaction
RSU01 assign the Authorization to the BW-USER.
Please choose 'change' because the user itself is already there. In field "Name (techn.)" you have select your authorization from the previous step.
© 2016 Copyright. All rights reserved
HA240
339
Unit 6: Integrative Authorization Scenarios
Figure 285: Exercise 8: Deep technical look in the table
Please start transaction SE16 and choose table RS2HANA_AUTH_STR. In the case that the value field is empty please check once more if you have use the field 0TCAKYFNM by creation of your authorization with transaction RSECADMIN.
© 2016 Copyright. All rights reserved
HA240
340
Exercise 8: BW Authorizations Reuse by SAPHANA
Figure 286: Exercise 8: Solution Task 4
Maybe you have to change the password from "Training1" to another one.
© 2016 Copyright. All rights reserved
HA240
341
Unit 6: Integrative Authorization Scenarios
Figure 287: Exercise 8: Solution Task 5
© 2016 Copyright. All rights reserved
HA240
342
Exercise 8: BW Authorizations Reuse by SAPHANA
Figure 288: Exercise 8: the goal that was to be reached
© 2016 Copyright. All rights reserved
HA240
343
Unit 6: Integrative Authorization Scenarios
Lesson: Business Object BI Platform 4.X and HANA Integration
Figure 289: Learning Objective
© 2016 Copyright. All rights reserved
HA240
344
Lesson: Business Object BI Platform 4.X and HANA Integration
Figure 290: Client and connectivity options
What does it means BI 4? BI 4 is an acronym for SAP BusinessObjects Business Intelligence platform 4.0 SAP BusinessObjects Business Intelligence (BI) platform provides flexible systems management for an enterprise BI standard that allows administrators to confidently deploy and standardize their BI implementations on a proven, scalable, and adaptive service-oriented architecture.
© 2016 Copyright. All rights reserved
HA240
345
Unit 6: Integrative Authorization Scenarios
Figure 291: Data Marts with SAP HANA - Overview of BI HANA Interaction
© 2016 Copyright. All rights reserved
HA240
346
Lesson: Business Object BI Platform 4.X and HANA Integration
Figure 292: Data Marts with SAP HANA - Interaction Analysis HANA
© 2016 Copyright. All rights reserved
HA240
347
Unit 6: Integrative Authorization Scenarios
Figure 293: Data Marts with SAP HANA - Interaction Explorer HANA
© 2016 Copyright. All rights reserved
HA240
348
Lesson: Business Object BI Platform 4.X and HANA Integration
Figure 294: Data Marts with SAP HANA - Interaction “Other Tools” HANA (not Explorer, not Analysis)
© 2016 Copyright. All rights reserved
HA240
349
Unit 6: Integrative Authorization Scenarios
Figure 295: User Provisioning
© 2016 Copyright. All rights reserved
HA240
350
Lesson: Business Object BI Platform 4.X and HANA Integration
Figure 296: SAP HANA + BI: What Are My Authentication Options?
© 2016 Copyright. All rights reserved
HA240
351
Unit 6: Integrative Authorization Scenarios
Figure 297: SSO with credential mapping
© 2016 Copyright. All rights reserved
HA240
352
Lesson: Business Object BI Platform 4.X and HANA Integration
Figure 298: SSO with Kerberos and SAML
© 2016 Copyright. All rights reserved
HA240
353
Unit 6: Integrative Authorization Scenarios
Figure 299: What can be secure and where?
Figure 300: Summary
© 2016 Copyright. All rights reserved
HA240
354
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 301: Learning Objective
© 2016 Copyright. All rights reserved
HA240
355
Unit 6: Integrative Authorization Scenarios
Figure 302: Scenario 1: Expose SAP HANA views in ERP
© 2016 Copyright. All rights reserved
HA240
356
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 303: Scenario 1: Details
© 2016 Copyright. All rights reserved
HA240
357
Unit 6: Integrative Authorization Scenarios
Figure 304: Scenario 2: Reporting in ERP Data in SAP HANA
© 2016 Copyright. All rights reserved
HA240
358
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 305: SAP HANA Live - Introduction (1)
© 2016 Copyright. All rights reserved
HA240
359
Unit 6: Integrative Authorization Scenarios
Figure 306: SAP HANA Live - Introduction (2)
© 2016 Copyright. All rights reserved
HA240
360
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 307: SAP HANA Live - Introduction (3)
© 2016 Copyright. All rights reserved
HA240
361
Unit 6: Integrative Authorization Scenarios
Figure 308: Scenario 3: SAP S/4HANA Finance real-time analytics
© 2016 Copyright. All rights reserved
HA240
362
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 309: SAP Smart Business apps - Real-time analytics architecture (SAP HANA Live)
© 2016 Copyright. All rights reserved
HA240
363
Unit 6: Integrative Authorization Scenarios
Figure 310: SAP S/4HANA, the great simplifier of enterprise software
SAP Business Suite 4 SAP HANA SAP S/4HANA is our next generation business suite. It is a new product fully built on the SAP HANA platform and designed with SAP Fiori user experience. SAP S/4HANA delivers massive simplifications (adoption, data model, user experience, decisionmaking and business processes) and innovations (for internet of things, big data, business networks, mobile first) to help reinvent businesses. SAP S/4HANA brings the next big wave of innovation to customers, similar to the transition from SAP R/2 to SAP R/3.
© 2016 Copyright. All rights reserved
HA240
364
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 311: SAP S/4HANA - Real time analytics architecture
© 2016 Copyright. All rights reserved
HA240
365
Unit 6: Integrative Authorization Scenarios
Figure 312: ABAP vs. HANA Authorizations
© 2016 Copyright. All rights reserved
HA240
366
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 313: Analytics Authorization Assistant - Introduction
With the SAP HANA Live Authorization Assistant, you can provide users authorizations in the SAP HANA system that is required to access business data displayed by the virtual data model of SAP HANA Live. For this, SAP HANA Live Authorization Assistant take those permissions into account that the same users already have in ABAP-based Business Suite application. See SAP Note 1796718 for details on this tool
© 2016 Copyright. All rights reserved
HA240
367
Unit 6: Integrative Authorization Scenarios
Figure 314: Analytics Authorization Assistant - Benefit
You can select multiple query views for multiple users and create analytic privileges for all the query views. You do not need to manually check for privileges in the SAP ABAP system and manually create privileges for each query view. Hence, the mass process available with this tool reduces the effort required to create analytic privileges for query views. The existing analytic privileges can be reused between different users.
Figure 315: Analytics Authorization Assistant - Installation Overview
© 2016 Copyright. All rights reserved
HA240
368
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 316: Analytics Authorization Assistant - Installation pre-requisites
For more information, refer to the Administration guide on SAP Service Marketplace at http://service.sap.com/instguides SAP In-memory Computing SAP HANA Live for SAP Business Suite (Section 4.3.5 Download and Deploy Content Package). _SYS_REPO user should have SQL Execute privilege REPOSITORY_REST with Grantable to others option selected. You have replicated the tables USRBF2 and UST12 from the ABAP— based system where you want to create the authorizations.
© 2016 Copyright. All rights reserved
HA240
369
Unit 6: Integrative Authorization Scenarios
Figure 317: Analytics Authorization Assistant - Installation steps
* The two available plug-ins are Analytic Authorization Assistant and Analytic Authorization Assistant — Metadata. If the user does not want to enter new metadata and only generates analytic privileges with SAP delivered metadata, then you require only Analytic Authorization Assistant plug-in. For more information, refer to the Administration guide on SAP Service Marketplace at http://service.sap.com/instguides SAP In-memory Computing SAP HANA Live for SAP Business Suite (Section 4.3.5 Download and Deploy Content Package).
© 2016 Copyright. All rights reserved
HA240
370
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 318: Analytics Authorization Assistant - Key content after the installation
Developer role is needed to maintain additional meta data for custom views.
© 2016 Copyright. All rights reserved
HA240
371
Unit 6: Integrative Authorization Scenarios
Figure 319: Analytics Authorization Assistant - Implementation
There are two main tools available with AAA that are downloaded from SMP: x
Generate Analytic Privileges (this also includes Update Privileges function)
x
Maintain Analytics Meta Data
© 2016 Copyright. All rights reserved
HA240
372
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 320: Analytics Authorization Assistant - Steps to generate privileges (1)
* If you have selected views that use tables from multiple SAP HANA schemas you can then select a schema in this step from where the user authorizations will be taken. ** A role is automatically generated with the name ROLE_ and the generated privilege is automatically assigned to this role. If this role already exists (from a previous generation) the new privilege will be added to the role. Note: Do not manually modify any analytic privilege or roles generated by the tool.
© 2016 Copyright. All rights reserved
HA240
373
Unit 6: Integrative Authorization Scenarios
Figure 321: Analytics Authorization Assistant - Steps to generate privileges (2)
© 2016 Copyright. All rights reserved
HA240
374
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Figure 322: Analytics Authorization Assistant Maintain additional meta-data
SAP delivers the required metadata for all the relevant query views of the virtual data model. For customer created views, the metadata is defined with the view as specific properties. To view the SAP delivered metadata, open the respective query view and navigate to Properties Analytics Metadata Maintain Metadata. In addition, you can use this tool to maintain metadata for views created using tables from the ERP system. You can add more rows by pressing the + button to map your own attributes to ABAP fields
© 2016 Copyright. All rights reserved
HA240
375
Unit 6: Integrative Authorization Scenarios
Figure 323: Summary
© 2016 Copyright. All rights reserved
HA240
376
Lesson: Reuse of ERP Authorizations in HANA Live and Smart Business Analytics Applications
Unit 7: (Optional) HANA Cloud Solutions
© 2016 Copyright. All rights reserved
HA240
377
Unit 7: (Optional) HANA Cloud Solutions
Lesson: HANA Cloud Platform (HCP) Security
Figure 324: Learning Objective
© 2016 Copyright. All rights reserved
HA240
378
Lesson: HANA Cloud Platform (HCP) Security
Figure 325: What Is the SAP HANA Cloud Platform
© 2016 Copyright. All rights reserved
HA240
379
Unit 7: (Optional) HANA Cloud Solutions
Figure 326: SAP HANA Cloud Platform in more Detail Application platform, managed services and self-service tools
Now let’s shortly have a high level look at technology, at the application services that we provide. First, SAP HANA Cloud Platform is not the classic NW you know in a hosted environment. We have gone back to the drawing board and architected and built a new cloud platform from ground up, with cloud principles like scale and multi-tenancy baked in right from the beginning. It is a java-based platform and we make use of Open Source AND we contribute back to the open source community where we can. The first commandment for the platform is “open standards” so we support open standards everywhere, making it easy to integrate with our platform and also making it fast in getting started. Our goal is to provide you all services that you need to design and run your applications. You should be able to focus on your business and on your code, we do the rest for you. First, let’s look at design and runtime. The runtime is as I said java based and we currently support the Java EE6 web profile and standard web applications as a programming model. You also can use other frameworks like Spring on our platform, we even have one of our own SAP applications that is available on the platform built using Spring. There are blogs which show you how to run JRuby on the platform and we are working on releasing also server side java scrip, node.js on HCP. In short we want ti make this a multi-language platform where you don’t have to learn new languages just because you want to build on our platform. You should be able to start fast and that means “with what you know”. Our design time is using standard Eclipse, is supporting the latest two versions of Eclipse
© 2016 Copyright. All rights reserved
HA240
380
Lesson: HANA Cloud Platform (HCP) Security
always and we bring you local implementation of our services in our SDK so you can program and test on your local machine and when you’re ready deploy with a couple of mouse clicks from your Eclipse environment directly into the cloud. In addition to plain runtime and design time we also provide you with essential application services. Let’s take persistence for example. Using standard JDBC based APIs we offer database storage for your application –either classic relational database or SAP HANA as I mentioned. Or let’s look at unstructured storage – we have a full-fledged document management service based on the CMIS standard at your disposal. Store and retrieve documents, do versioning and manage access control lists, all as a service in our Cloud. By the way, you may have heard of our recently announced SAP Mobile Documents solution. The cloud version of this solution is based on our platform and this service in particular! When we look at the “Extend” theme from the previous slide it is clear that we need to provide you with an easy means to connect securely to you on premise back-ends – this is what our connectivity service is for. You install a small component called cloud connector in your data center, simply configure the systems that should communicate with your cloud application and we provide you with an SSL encrypted tunnel without the need to open up firewalls etc. making sure that your data is kept safe where you want to have it. Along the same lines – you will want to have your users log on only once, no matter how many cloud applications you build. AND you want to use the existing roles and users you have maintained already in one of your systems – no duplication of this kind of data. So that’s exactly what our identity service using SAML2.0 can do for you. We don’t stop there, we also develop additional higher level services if you will on the platform that you can use for your applications. The first one is our cloud portal. Think of it as a cloud based portal where you can easily and intuitively create sites where information from various sources comes together. This is optimized for mobile consumption, it can be easily themed, and also here you can leverage content and investments you have done for your on premise portal already. Whether you want to complement an existing portal or whether you want to build out a new one quickly and easily, you have to look at this technology. A couple of words on the Operations: you can simply do that via a web based console. Start and stop your applications, look at error logs, manage users, all done via browser. Lastly, and this is quite important both for our partners and our customers, we integrate our cloud platform offering with the SAP HANA Marketplace & SAP Store so that SAP customers have easy access to applications that our partners are building on the SAP HANA Cloud Platform.
© 2016 Copyright. All rights reserved
HA240
381
Unit 7: (Optional) HANA Cloud Solutions
Figure 327: Connectivity Service
© 2016 Copyright. All rights reserved
HA240
382
Lesson: HANA Cloud Platform (HCP) Security
Figure 328: Cloud Integration
© 2016 Copyright. All rights reserved
HA240
383
Unit 7: (Optional) HANA Cloud Solutions
Figure 329: Federated Security Management
© 2016 Copyright. All rights reserved
HA240
384
Lesson: HANA Cloud Platform (HCP) Security
Figure 330: Federated authentication & SSO in SAP HANA Cloud Platform
© 2016 Copyright. All rights reserved
HA240
385
Unit 7: (Optional) HANA Cloud Solutions
Figure 331: Federated authentication and SSO for browser-based applications with SAML 2.0
© 2016 Copyright. All rights reserved
HA240
386
Lesson: HANA Cloud Platform (HCP) Security
Figure 332: Security Configuration in the Cloud Identity Provider Configuration in the Cloud - Option 1
© 2016 Copyright. All rights reserved
HA240
387
Unit 7: (Optional) HANA Cloud Solutions
Figure 333: Security Configuration in the Cloud Identity Provider Configuration in the Cloud - Option 2
© 2016 Copyright. All rights reserved
HA240
388
Lesson: HANA Enterprise Cloud Security
Lesson: HANA Enterprise Cloud Security
Figure 334: Learning Objective
© 2016 Copyright. All rights reserved
HA240
389
Unit 7: (Optional) HANA Cloud Solutions
Figure 335: HANA Enterprise Cloud (HEC)
The fundamental security architecture of the HEC infrastructure is the principal of a private cloud. This means customer will receive an isolated, logical grouping of several Virtual Machines and physical systems. All customer networks are completely isolated from each other. HEC administrative tasks will be done using management networks
© 2016 Copyright. All rights reserved
HA240
390
Lesson: HANA Enterprise Cloud Security
Figure 336: Details for Customer Landscapes
© 2016 Copyright. All rights reserved
HA240
391
Unit 7: (Optional) HANA Cloud Solutions
Figure 337: Details for Network Integration
© 2016 Copyright. All rights reserved
HA240
392
Lesson: HANA Enterprise Cloud Security
Figure 338: Security & Data Protection Requirements – Data Center (Building / Facilities)
Cloud hosted customer environments must be operated in an SAP Tier Level III, III+ or IV classified Datacenter to meet the physical security and operational compliance requirements of the customer. For co-location data centers (non-SAP DC), access to SAP HEC infrastructure needs to be physically separated from other DC customers, e.g. using cages
© 2016 Copyright. All rights reserved
HA240
393
Unit 7: (Optional) HANA Cloud Solutions
Figure 339: Benefits HANA Enterprise Cloud Multi Layers of Defense
© 2016 Copyright. All rights reserved
HA240
394
Lesson: HANA Enterprise Cloud Security
Figure 340: Holistic Security & Compliance Approach
© 2016 Copyright. All rights reserved
HA240
395
Unit 7: (Optional) HANA Cloud Solutions
Figure 341: Security, Compliance & Data Protection Processes: Internal Control System – Certifications as of today
© 2016 Copyright. All rights reserved
HA240
396