You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/abap-environment-monitoring-calm-health-monitoring/abap-environment-monitoring-calm-health-monitoring.md
- How to configure outbound communication from your SAP BTP ABAP Environment using the communication arrangement**`SAP_COM_0276`**
22
-
- How to configure communication from your SAP BTP ABAP Environment instance to the SAP Cloud ALM service using the communication arrangement**`SAP_COM_0527`**
21
+
- How to configure outbound communication from your SAP BTP ABAP Environment using the communication scenario**`SAP_COM_0276`**
22
+
- How to configure communication from your SAP BTP ABAP Environment instance to the SAP Cloud ALM service using the communication scenario**`SAP_COM_0527`**
23
23
- How to configure the use cases you want for SAP Cloud ALM
24
24
25
25
@@ -33,8 +33,11 @@ For more information, see SAP Help Portal: [Integration in Central Monitoring an
33
33
34
34
Throughout this tutorial, objects name include a prefix, such as **`Zxx`** or suffix, such as **`XXX`**. Always replace this with your group number or initials.
3. Create a service key for your SAP Cloud ALM service and download it; you will need it later - that is, the SAP Cloud ALM service mentioned in the prerequisites above.
Your SAP BTP ABAP environment is registered in your SAP Cloud ALM instance. However, it could take **up to one hour** before the first monitoring data is pushed to your service.
This tutorial will guide you through creating and setting up a simple Node.js application in cf CLI. You will start by building and deploying a web application that returns simple data – a **Hello World!** message, and then invoking this app through a web microservice (application router). Finally, you will set authentication checks and authorization roles to properly access and manage your web application.
28
27
29
-
---
30
-
31
28
### Log on to SAP BTP
32
-
33
-
34
29
First, you need to connect to the SAP BTP, Cloud Foundry environment with your productive subaccount. Your Cloud Foundry URL depends on the region where the API endpoint belongs to. To find out which one is yours, see: [Regions and API Endpoints Available for the CF Environment] (https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/f344a57233d34199b2123b9620d0bb41.html?version=Cloud)
35
30
36
31
In this tutorial, we use `eu20.hana.ondemand.com` as an example.
@@ -58,14 +53,12 @@ In this tutorial, we use `eu20.hana.ondemand.com` as an example.
58
53
> This step is skipped if you're using a trial account.
59
54
60
55
61
-
#### RESULT
62
56
57
+
#### RESULT
63
58
Details about your personal SAP BTP subaccount are displayed (API endpoint, user, organization, space).
64
59
65
60
66
61
### Create a Node.js application
67
-
68
-
69
62
You're going to create a simple Node.js application.
70
63
71
64
1. In your local file system, create a new directory (folder). For example: `node-tutorial`
@@ -183,15 +176,12 @@ You're going to create a simple Node.js application.
183
176
That is: `https://node-1234-aaaa-5678.cfapps.eu20.hana.ondemand.com`
184
177
185
178
#### RESULT
186
-
187
179
Your Node.js application is successfully deployed and running on the SAP BTP, Cloud Foundry environment. A **Hello World!** message is displayed in the browser.
188
180
189
181
190
182
191
183
192
184
### Run an Authentication Check
193
-
194
-
195
185
Authentication in the SAP BTP, Cloud Foundry environment is provided by the Authorization and Trust Management (XSUAA) service. In this example, OAuth 2.0 is used as the authentication mechanism. The simplest way to add authentication is to use the Node.js `@sap/approuter` package. To do that, a separate Node.js micro-service will be created, acting as an entry point for the application.
196
186
197
187
1. In the `node-tutorial` folder, create an `xs-security.json` file for your application with the following content:
@@ -203,7 +193,7 @@ Authentication in the SAP BTP, Cloud Foundry environment is provided by the Auth
203
193
}
204
194
```
205
195
206
-
> **NOTE**: For trial accounts, enter the following additional `oauth2-configuration` lines in your `xs-security.json` file:
196
+
> **IMPORTANT**: For trial accounts, enter the following additional `oauth2-configuration` lines in your `xs-security.json` file:
207
197
208
198
209
199
```JSON
@@ -386,17 +376,13 @@ Authentication in the SAP BTP, Cloud Foundry environment is provided by the Auth
386
376
> Both the `myapp` and `web` applications are bound to the same Authorization and Trust Management (XSUAA) service instance `nodeuaa`. In this scenario, the authentication is handled by XSUAA through the application router.
387
377
388
378
#### RESULT
389
-
390
379
- Click the `My Node.js Application` link. The browser window displays **Application user:** `<e-mail>`, showing the email you have used for your Cloud Foundry logon.
391
380
392
381
- Check that the `myapp` application is not accessible without authentication. To do that, refresh its previously loaded URL in a web browser – you should get a response `401 Unauthorized`.
393
382
394
383
395
384
396
-
397
385
### Run an Authorization Check
398
-
399
-
400
386
Authorization in the SAP BTP, Cloud Foundry environment is also provided by the XSUAA service. In the previous example, the `@sap/approuter` package was added to provide a central entry point for the business application and to enable authentication. Now to extend the example, authorization will be added through the implementation of a `users` REST service. Different authorization checks will be introduced for the GET and CREATE operations to demonstrate how authorization works. The authorization concept includes elements such as roles, scopes, and attributes provided in the security descriptor file `xs-security.json`. For more information, see: [Application Security Descriptor Configuration Syntax] (https://help.sap.com/docs/BTP/65de2977205c403bbc107264b8eccf4b/517895a9612241259d6941dbf9ad81cb.html?version=Cloud)
401
387
402
388
1. To introduce application roles, open the `xs-security.json` in the `node-tutorial` folder, and add scopes and role templates as follows:
@@ -516,7 +502,7 @@ Authorization in the SAP BTP, Cloud Foundry environment is also provided by the
516
502
});
517
503
```
518
504
519
-
> **NOTE:** Authorization checks are enforced by the `xssec` package in the `@sap` directory. To every request object, using `passport` and `xssec.JWTStrategy`, a security context is attached as an `authInfo` object. The resulting request object is initialized with the incoming JWT token. To check the full list of methods and properties of the security context, see: [Authentication for Node.js Applications] (https://help.sap.com/docs/BTP/65de2977205c403bbc107264b8eccf4b/4902b6e66cbd42648b5d9eaddc6a363d.html?version=Cloud)
505
+
> Authorization checks are enforced by the `xssec` package in the `@sap` directory. To every request object, using `passport` and `xssec.JWTStrategy`, a security context is attached as an `authInfo` object. The resulting request object is initialized with the incoming JWT token. To check the full list of methods and properties of the security context, see: [Authentication for Node.js Applications] (https://help.sap.com/docs/BTP/65de2977205c403bbc107264b8eccf4b/4902b6e66cbd42648b5d9eaddc6a363d.html?version=Cloud)
520
506
521
507
As defined in the `start.js` file, for HTTP GET requests users need the `Display` scope to be authorized. For HTTP POST requests, they need to have the `Update` scope assigned.
522
508
@@ -591,16 +577,13 @@ Authorization in the SAP BTP, Cloud Foundry environment is also provided by the
591
577
8. Try to access `myapp` again (in a browser) in both ways – directly and through the `web` application router.
592
578
593
579
#### RESULT
594
-
595
580
- When you access it directly, you should still get a response `401 Unauthorized`. This is a correct and expected behavior.
596
581
- When you access the `web` application and click the `Show users` link, it should result in a `403 Forbidden` response due to missing permissions. The same error is thrown if you try to add a new user.
597
582
598
583
To get permissions, you need to create a role collection containing the roles `Viewer` and `Manager` and assign these roles to your user. You can do this only from the SAP BTP cockpit.
599
584
600
585
601
586
### Assigning Roles to a User in SAP BTP Cockpit
602
-
603
-
604
587
1. Open the SAP BTP cockpit and go to your subaccount.
605
588
606
589
2. From the left-side menu, navigate to `Security` > `Role Collections`.
@@ -631,12 +614,8 @@ To get permissions, you need to create a role collection containing the roles `V
631
614
632
615
633
616
#### RESULT
634
-
635
617
Accessing the `myapp` application results in the following:
636
618
637
619
- If you try to access it directly, a response `401 Unauthorized` is still displayed due to lack or permissions (roles). This is a correct and expected behavior.
638
620
639
621
- If you try to access it through the `web` application router, the `Show users` link will show the list of users - **John** and **Paula**. If you enter a new name, it will be successfully recorded in the user database.
### Subscribe to SAP Omnichannel Promotion Pricing trial
33
33
34
34
35
-
1. In the [SAP BTP trial](https://account.hanatrial.ondemand.com), enter your trial account.
35
+
1. In the [SAP BTP trial](https://account.hanatrial.ondemand.com), enter your trial account. You trial account must be in the Singapore - Azure region.
36
36
37
37
2. Navigate to your subaccount. It is usually named `trial`.
Once the subscription is finished, you can choose the three dot symbol **°°°** and **Go to Application** in the **Application Plans** section to make configuration settings in the **Configure Omnichannel Promotion Pricing** app. <!-- Using the app is optional and not part of the basic tutorial but is included in our advanced tutorial.-->
50
50
<!-- Add link to advanced tutorial once available -->
51
51
52
-
> If **SAP Omnichannel Promotion Pricing (Trial)** does not appear in the service marketplace, you probably created a new subaccount to an already existing trial account. In this case, you must assign the SaaS app and services to your subaccount in the **Entitlements** section. For more information, see [Configure Entitlements for Subaccounts](https://help.sap.com/viewer/7c87270e23c64c2aa922ce297a6df23d/Cloud/en-US/6fce2cbd9df94d88be99f7662c6b7ed6.html).
53
-
54
52
55
53
56
54
57
55
### Set up roles and authorizations
58
56
59
57
60
-
In order to use the **Configure Omnichannel Promotion Pricing** app, you must create a role collection and assign users to it. With the configuration app, you can maintain various parameters to influence the behavior of the **Calculation service**. <!--Using the app is not part of the basic tutorial. -->
58
+
In order to use the apps provided with SAP Omnichannel Promotion Pricing, you must create a role collection and assign users to it. With the **Configure Omnichannel Promotion Pricing**app, you can maintain various parameters to influence the behavior of the **Calculation service**. With the **Maintain Promotions** app, you can create promotional rules and define, for example, eligibilities and rewards. Using the apps is not part of the tutorials.
61
59
62
60
1. Navigate back to your subaccount.
63
61
@@ -69,20 +67,18 @@ In order to use the **Configure Omnichannel Promotion Pricing** app, you must cr
69
67
70
68
5. Select the role collection you've just created from the list and choose **Edit**.
71
69
72
-
6. Under **Role Name**, select **`Configure_OPPS`** from the dropdown list.
70
+
6. Under **Role Name**, select **`Configure_OPPS`**and **`Maintain_OPPS`**from the dropdown list.
73
71
74
72
7. Assign **User** or **User Groups** to your role collection and choose **Save**.
75
73
76
-
<!-- Should we explain Step 7 a bit more?
77
-
COS has already implemented a role collection for trial, should we do sth similar? -->
78
74
79
75
80
76
81
77
### Create service instances
82
78
83
79
84
80
1. Navigate to your subaccount and the **space** in which you want to create the service instances.
85
-
> To save some clicks, do the following steps in your space. You can also do this in your subaccount but then you have to provide further information.
81
+
> To save you some clicks, do the following steps in your space. You can also do this in your subaccount but then you have to provide further information.
86
82
87
83
2. In the navigation pane, choose **Services > Service Marketplace**.
88
84
@@ -135,6 +131,6 @@ You have now successfully set up your SAP Omnichannel Promotion Pricing trial on
135
131
### Additional Information
136
132
137
133
* Basic Tutorial: [Apply a Simple Promotion with SAP Omnichannel Promotion Pricing](opps-basic-scenario)
0 commit comments