Skip to content

Commit

Permalink
Introduce placeholder for fragment (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmikhailenko authored Jun 26, 2024
1 parent e83dcd6 commit 23a1550
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,12 @@ A precise description of the general authorization capabilities in CAP can be fo
Use CDS annotation `@requires` to specify in the CDS model which role a user requires to access the annotated CDS resources such as services, entities, actions, and functions (see [Restricting Roles with @requires](../guides/security/authorization#requires)). The generic authorization handler of the runtime rejects all requests with response code 403 that don't match the accepted roles.
More specific access control is provided by the `@restrict` annotation, which allows to combine roles with the allowed set of events. For instance, this helps to distinguish between users that may only read an entity from those who are allowed to edit. See section [Control Access with @restrict](../guides/security/authorization#restrict-annotation) to find details about the possibilities.


### Instance-Based Authorization { #instance-based-auth}

Whereas role-based authorization applies to whole entities only, [Instance-Based Authorization](../guides/security/authorization#instance-based-auth) allows to add more specific conditions that apply on entity instance level and depend on the attributes that are assigned to the request user. A typical use case is to narrow down the set of visible entity instances depending on user properties (for example, `CountryCode` or `Department`). Instance-based authorization is also basis for [domain-driven authorizations](../guides/security/authorization#domain-driven-authorization) built on more complex model constraints.

<span id="declarative-auth"></span>

#### Current Limitations

The CAP Java SDK translates the `where`-condition in the `@restrict` annotation to a predicate, which is appended to the `CQN` statement of the request. This applies only to `READ`,`UPDATE`, and `DELETE` events. In the current version, the following limitations apply:
Expand Down

0 comments on commit 23a1550

Please sign in to comment.