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: guides/deploy/to-cf.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ cds add xsuaa
159
159
```
160
160
161
161
::: tip This will also generate an `xs-security.json` file
162
-
The roles/scopes are derived from authorization-related annotations in your CDS models. Ensure to rerun `cds compile --to xsuaa`, as documented in the [_Authorization_ guide](/guides/security/authorization#xsuaa-configuration) whenever there are changes to these annotations.
162
+
The roles/scopes are derived from authorization-related annotations in your CDS models. Ensure to rerun `cds compile --to xsuaa`, as documented in the [_Authorization_ guide](../security/authorization#xsuaa-configuration) whenever there are changes to these annotations.
163
163
:::
164
164
165
165
[Learn more about SAP Authorization and Trust Management/XSUAA.](https://discovery-center.cloud.sap/serviceCatalog/authorization-and-trust-management-service?region=all){.learn-more}
Copy file name to clipboardExpand all lines: guides/multitenancy/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,7 +329,7 @@ In a first terminal, start the MTX sidecar process:
329
329
[cds] - [ terminate with ^C ]
330
330
```
331
331
332
-
[If you get an error on server start, read the troubleshooting information.](/get-started/troubleshooting#why-do-i-get-an-error-on-server-start){.learn-more}
332
+
[If you get an error on server start, read the troubleshooting information.](../../get-started/troubleshooting#why-do-i-get-an-error-on-server-start){.learn-more}
333
333
:::
334
334
335
335
@@ -667,7 +667,7 @@ You should now see the route mapped to your application.
667
667
668
668
There are several ways to update the database schema of a multitenant application.
669
669
670
-
* For **CAP Java** applications, schema updates should be done as described in the respective [Java Guide](/java/multitenancy#database-update)
670
+
* For **CAP Java** applications, schema updates should be done as described in the respective [Java Guide](../../java/multitenancy#database-update)
671
671
* For **CAP Node.js** applications, you can use either of:
672
672
- the `cds-mtx upgrade` command from a terminal
673
673
- the [MTX Sidecar API](mtxs#upgrade-tenants-→-jobs)
@@ -778,7 +778,7 @@ For CAP Java, all these services are supported natively and SaaS dependencies ar
778
778
:::tip Explicitly activate the Destination service
779
779
SaaS dependency for Destination service needs to be activated explicitly in the `application.yaml` due to security reasons. SaaS dependencies for some of the other services can be **de**activated by setting the corresponding property to `false` in the `application.yaml`.
780
780
781
-
Refer to the `cds.multiTenancy.dependencies` section in the [CDS properties](/java/developing-applications/properties#cds-properties).
781
+
Refer to the `cds.multiTenancy.dependencies` section in the [CDS properties](../../java/developing-applications/properties#cds-properties).
782
782
:::
783
783
784
784
For CAP Node.js, all these services are supported natively and can be activated individually by providing configuration in `cds.requires`. In the most common case, you simply activate service dependencies like so:
Copy file name to clipboardExpand all lines: guides/security/authorization.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,8 +42,8 @@ From perspective of CAP, the authentication method is freely customizable. For c
42
42
43
43
Find detailed instructions for setting up authentication in these runtime-specific guides:
44
44
45
-
-[Set up authentication in Node.js.](/node.js/authentication)
46
-
-[Set up authentication in Java.](/java/security#authentication)
45
+
-[Set up authentication in Node.js.](../../node.js/authentication)
46
+
-[Set up authentication in Java.](../../java/security#authentication)
47
47
48
48
49
49
In _productive_ environment with security middleware activated, **all protocol adapter endpoints are authenticated by default**<sup>1</sup>, even if no [restrictions](#restrictions) are configured. Multi-tenant SaaS-applications require authentication to provide tenant isolation out of the box. In case there is the business need to expose open endpoints for anonymous users, it's required to take extra measures depending on runtime and security middleware capabilities.
@@ -110,7 +110,7 @@ For XSUAA or IAS authentication, the request user is attached with the pseudo ro
110
110
:::
111
111
112
112
#### internal-user
113
-
Pseudo-role `internal-user` allows to define application endpoints that can be accessed exclusively by the own PaaS tenant (technical communication). The advantage is that similar to `system-user` no technical CAP roles need to be defined to protect such internal endpoints. However, in contrast to `system-user`, the endpoints protected by this pseudo-role do not allow requests from any external technical clients. Hence is suitable for **technical intra-application communication**, see [Security > Application Zone](/guides/security/overview#application-zone).
113
+
Pseudo-role `internal-user` allows to define application endpoints that can be accessed exclusively by the own PaaS tenant (technical communication). The advantage is that similar to `system-user` no technical CAP roles need to be defined to protect such internal endpoints. However, in contrast to `system-user`, the endpoints protected by this pseudo-role do not allow requests from any external technical clients. Hence is suitable for **technical intra-application communication**, see [Security > Application Zone](../../guides/security/overview#application-zone).
114
114
115
115
::: tip
116
116
For XSUAA or IAS authentication, the request user is attached with the pseudo role `internal-user` if the presented JWT token has been issued with grant type `client_credentials` or `client_x509` on basis of the **identical** XSUAA or IAS service instance.
@@ -137,8 +137,8 @@ CAP does not make any assumptions on the presented claims given in the token. St
137
137
In most cases, CAP's default mapping will match your requirements, but CAP also allows you to customize the mapping according to specific needs. For instance, `user_name` in XSUAA tokens is generally not unique if several customer IdPs are connected to the underlying identity service.
138
138
Here a combination of `user_name` and `origin` mapped to `$user` might be a feasible solution that you implement in a custom adaptation. Similarly, attribute values can be normalized and prepared for [instance-based authorization](#instance-based-auth). Find details and examples how to programmatically redefine the user mapping here:
139
139
140
-
-[Set up Authentication in Node.js.](/node.js/authentication)
141
-
-[Custom Authentication in Java.](/java/security#custom-authentication)
140
+
-[Set up Authentication in Node.js.](../../node.js/authentication)
141
+
-[Custom Authentication in Java.](../../java/security#custom-authentication)
142
142
143
143
::: warning Be very careful when redefining `$user`
144
144
The user name is frequently stored with business data (for example, `managed` aspect) and might introduce migration efforts. Also consider data protection and privacy regulations when storing user data.
@@ -173,7 +173,7 @@ service BookshopService {
173
173
}
174
174
```
175
175
176
-
Note that both annotations introduce access control on an entity level. In contrast, for the sake of [input validation](/guides/services/providing-services#input-validation), you can also use `@readonly` on a property level.
176
+
Note that both annotations introduce access control on an entity level. In contrast, for the sake of [input validation](../../guides/services/providing-services#input-validation), you can also use `@readonly` on a property level.
177
177
178
178
In addition, annotation `@Capabilities` from standard OData vocabulary is enforced by the runtimes analogously:
179
179
@@ -225,7 +225,7 @@ In general, **implicitly auto-exposed entities cannot be accessed directly**, th
225
225
226
226
In contrast, **explicitly auto-exposed entities can be accessed directly, but only as `@readonly`**. The rationale behind that is that entities representing value lists need to be readable at the service level, for instance to support value help lists.
227
227
228
-
See details about `@cds.autoexpose` in [Auto-Exposed Entities](/guides/services/providing-services#auto-exposed-entities).
228
+
See details about `@cds.autoexpose` in [Auto-Exposed Entities](../../guides/services/providing-services#auto-exposed-entities).
229
229
230
230
This results in the following access matrix:
231
231
@@ -278,7 +278,7 @@ The following values are supported:
278
278
279
279
- The `to` property lists all [user roles](#roles) or [pseudo roles](#pseudo-roles) that the privilege applies to. Note that the `any` pseudo-role applies for all users and is the default if no value is provided.
280
280
281
-
- The `where`-clause can contain a Boolean expression in [CQL](/cds/cql)-syntax that filters the instances that the event applies to. As it allows user values (name, attributes, etc.) and entity data as input, it's suitable for *dynamic authorizations based on the business domain*. Supported expressions and typical use cases are presented in [instance-based authorization](#instance-based-auth).
281
+
- The `where`-clause can contain a Boolean expression in [CQL](../../cds/cql)-syntax that filters the instances that the event applies to. As it allows user values (name, attributes, etc.) and entity data as input, it's suitable for *dynamic authorizations based on the business domain*. Supported expressions and typical use cases are presented in [instance-based authorization](#instance-based-auth).
282
282
283
283
A privilege is met, if and only if **all properties are fulfilled** for the current request. In the following example, orders can only be read by an `Auditor` who meets `AuditBy` element of the instance:
284
284
@@ -509,7 +509,7 @@ annotate Articles with @(restrict: [
You can define `where`-conditions in restrictions based on [CQL](/cds/cql)-where-clauses.<br>
512
+
You can define `where`-conditions in restrictions based on [CQL](../../cds/cql)-where-clauses.<br>
513
513
Supported features are:
514
514
* Predicates with arithmetic operators.
515
515
* Combining predicates to expressions with `and` and `or` logical operators.
@@ -641,7 +641,7 @@ Be aware that deep paths might introduce a performance bottleneck. Access Contro
641
641
642
642
### Association Paths { #association-paths}
643
643
644
-
The `where`-condition in a restriction can also contain [CQL path expressions](/cds/cql#path-expressions) that navigate to elements of associated entities:
644
+
The `where`-condition in a restriction can also contain [CQL path expressions](../../cds/cql#path-expressions) that navigate to elements of associated entities:
645
645
646
646
```cds
647
647
service SalesOrderService @(requires: 'authenticated-user') {
@@ -811,7 +811,7 @@ As shown before, defining an adequate authorization strategy has a deep impact o
811
811
812
812
### Separation of Concerns
813
813
814
-
Consider using [CDS Aspects](/cds/cdl#aspects) to separate the actual service definitions from authorization annotations as follows:
814
+
Consider using [CDS Aspects](../../cds/cdl#aspects) to separate the actual service definitions from authorization annotations as follows:
815
815
816
816
<!--- % include _code sample='services.cds' %} -->
817
817
::: code-group
@@ -855,8 +855,8 @@ The service provider frameworks **automatically enforce** restrictions in generi
855
855
856
856
If generic enforcement doesn't fit your needs, you can override or adapt it with **programmatic enforcement** in custom handlers:
857
857
858
-
-[Authorization Enforcement in Node.js](/node.js/authentication#enforcement)
859
-
-[Enforcement API & Custom Handlers in Java](/java/security#enforcement-api)
858
+
-[Authorization Enforcement in Node.js](../../node.js/authentication#enforcement)
859
+
-[Enforcement API & Custom Handlers in Java](../../java/security#enforcement-api)
860
860
861
861
## Role Assignments with IAS and AMS
862
862
@@ -968,7 +968,7 @@ Inline configuration in the _mta.yaml_ `config` block and the _xs-security.json_
968
968
969
969
### 3. Assembling Roles and Assigning Roles to Users
970
970
971
-
This is a manual step an administrator would do in SAP BTP Cockpit. See [Set Up the Roles for the Application](/node.js/authentication#auth-in-cockpit) for more details. If a user attribute isn't set for a user in the IdP of the SAP BTP Cockpit, this means that the user has no restriction for this attribute. For example, if a user has no value set for an attribute "Country", they're allowed to see data records for all countries.
971
+
This is a manual step an administrator would do in SAP BTP Cockpit. See [Set Up the Roles for the Application](../../node.js/authentication#auth-in-cockpit) for more details. If a user attribute isn't set for a user in the IdP of the SAP BTP Cockpit, this means that the user has no restriction for this attribute. For example, if a user has no value set for an attribute "Country", they're allowed to see data records for all countries.
972
972
In the _xs-security.json_, the `attribute` entity has a property `valueRequired` where the developer can specify whether unrestricted access is possible by not assigning a value to the attribute.
Copy file name to clipboardExpand all lines: guides/security/data-protection.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ CAP doesn't require any specific authentication strategy, but it provides out of
118
118
On configured authentication, *all CAP endpoints are authenticated by default*.
119
119
120
120
::: warning
121
-
❗ **CAP applications need to ensure that an appropriate [authentication method](/guides/security/authorization#prerequisite-authentication) is configured**.
121
+
❗ **CAP applications need to ensure that an appropriate [authentication method](authorization#prerequisite-authentication) is configured**.
122
122
It's highly recommended to establish integration tests to safeguard a valid configuration.
123
123
:::
124
124
@@ -180,9 +180,9 @@ The set of rules that apply to a user reflects a specific conceptual role that d
180
180
Obviously, the business roles are dependent from the scenarios and hence *need to be defined by the application developers*.
181
181
182
182
Enforcing authorization rules at runtime is highly security-critical and shouldn't be implemented by the application as this would introduce the risk of security flaws.
183
-
Instead, [CAP authorizations](/guides/security/authorization) follow a declarative approach allowing applications to design comprehensive access rules in the CDS model.
183
+
Instead, [CAP authorizations](authorization) follow a declarative approach allowing applications to design comprehensive access rules in the CDS model.
184
184
185
-
Resources in the model such as services or entities can be restricted to users that fulfill specific conditions as declared in `@requires` or `@restrict`[annotations](/guides/security/authorization#restrictions).
185
+
Resources in the model such as services or entities can be restricted to users that fulfill specific conditions as declared in `@requires` or `@restrict`[annotations](authorization#restrictions).
186
186
According to the declarations, server-side authorization enforcement is guaranteed for all requests. It's executed close before accessing the corresponding resources.
187
187
188
188
::: warning
@@ -196,7 +196,7 @@ To verify CAP authorizations in your model, it's recommended to use [CDS lint ru
196
196
197
197
The rules prepared by application developers are applied to business users according to grants given by the subscribers user administrator, that is, they're applied tenant-specific.
198
198
199
-
CAP authorizations can be defined dependently from [user claims](/guides/security/authorization#user-claims) such as [XSUAA scopes or attributes](https://help.sap.com/docs/btp/sap-business-technology-platform/application-security-descriptor-configuration-syntax)
199
+
CAP authorizations can be defined dependently from [user claims](authorization#user-claims) such as [XSUAA scopes or attributes](https://help.sap.com/docs/btp/sap-business-technology-platform/application-security-descriptor-configuration-syntax)
200
200
that are deployed by application developers and granted by the user administrator of the subscriber.
201
201
Hence, CAP provides a seamless integration of central identity service without technical lock-in.
202
202
@@ -222,7 +222,7 @@ Based on the CDS model and configuration of CDS services, the CAP runtime expose
| CDS Service `Foo`|`service Foo {}`|`/<protocol-path>/Foo/**`<sup>1</sup> |`@restrict`/`@requires`<sup>2</sup> |
225
-
|| OData v2/v4 |`/<odata-path>/Foo/$metadata`<sup>1</sup> | See [here](/guides/security/authorization#requires)|
225
+
|| OData v2/v4 |`/<odata-path>/Foo/$metadata`<sup>1</sup> | See [here](authorization#requires)|
226
226
| Index page ||`/index.html`| none, but disabled in production |
227
227
228
228
> <sup>1</sup> See [protocols and paths](../../java/cqn-services/application-services#configure-path-and-protocol)
@@ -302,7 +302,7 @@ CAP guarantees that code for business requests runs on a DB connection opened fo
302
302
### Isolated Transient Data { #isolated-transient-data }
303
303
304
304
Although CAP microservices are stateless, the CAP Java runtime (generic handlers inclusive) needs to cache data in-memory for performance reasons.
305
-
For instance, filters for [instance-based authorization](/guides/security/authorization#instance-based-auth) are constructed only once and are reused in subsequent requests.
305
+
For instance, filters for [instance-based authorization](authorization#instance-based-auth) are constructed only once and are reused in subsequent requests.
Copy file name to clipboardExpand all lines: guides/uis/fiori.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -520,7 +520,7 @@ SELECT.from(Books.drafts) //returns all drafts of the Books entity
520
520
521
521
## Use Roles to Toggle Visibility of UI elements
522
522
523
-
In addition to adding [restrictions on services, entities, and actions/functions](/guides/security/authorization#restrictions), there are use cases where you only want to hide certain parts of the UI for specific users. This is possible by using the respective UI annotations like `@UI.Hidden` or `@UI.CreateHidden` in conjunction with `$edmJson` pointing to a singleton.
523
+
In addition to adding [restrictions on services, entities, and actions/functions](../security/authorization#restrictions), there are use cases where you only want to hide certain parts of the UI for specific users. This is possible by using the respective UI annotations like `@UI.Hidden` or `@UI.CreateHidden` in conjunction with `$edmJson` pointing to a singleton.
524
524
525
525
First, you define the [singleton](../advanced/odata#singletons) in your service and annotate it with [`@cds.persistence.skip`](../databases/index.md#cds-persistence-skip) so that no database artefact is created:
0 commit comments