Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cap-js/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
renejeglinsky committed Dec 5, 2023
2 parents 383c268 + 4aa5c57 commit 4b10bb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ jobs:
run: |
echo "DIFF_FILES=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- '*.md' | xargs)" >> "$GITHUB_OUTPUT"
- name: Run cspell
if: steps.changes.outputs.DIFF_FILES != ''
id: cspell
continue-on-error: true
working-directory: docs/@external
run: |
npx cspell --no-progress --show-suggestions --show-context ${{ steps.changes.outputs.DIFF_FILES }} >> ${{ github.workspace }}/docs/@external/CSPELL.log
- name: Run markdownlint
if: steps.changes.outputs.DIFF_FILES != ''
id: markdownlint
continue-on-error: true
working-directory: docs/@external
Expand Down
12 changes: 8 additions & 4 deletions guides/using-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -1474,9 +1474,7 @@ Using the tenant of the request's JWT token means reading from the **subscriber

<div class="impl node">

You can change the destination lookup behavior using the [`selectionStrategy`](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination#multi-tenancy) property for the [destination options](#use-destinations-with-node-js).

With the value `alwaysProvider` you can ensure that the destination is always read from your provider subaccount. With that you ensure that a subscriber cannot overwrite your destination.
You can change the destination lookup behavior as follows:

```jsonc
"cds": {
Expand All @@ -1487,13 +1485,19 @@ With the value `alwaysProvider` you can ensure that the destination is always re
/* ... */
},
"destinationOptions": {
"selectionStrategy": "alwaysProvider"
"selectionStrategy": "alwaysProvider",
"jwt": null
}
}
}
}
```


Setting the [`selectionStrategy`](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination#multi-tenancy) property for the [destination options](#use-destinations-with-node-js) to `alwaysProvider`, you can ensure that the destination is always read from your provider subaccount. With that you ensure that a subscriber cannot overwrite your destination.

Set the destination option `jwt` to `null`, if you don't want to pass the request's JWT to SAP Cloud SDK. Passing the request's JWT to SAP Cloud SDK has implications on, amongst others, the effective defaults for selection strategy and isolation level. In rare cases, these defaults are not suitable, for example when the request to the upstream server does not depend on the current user. Please see [Authentication and JSON Web Token (JWT) Retrieval](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destinations#authentication-and-json-web-token-jwt-retrieval) for more details.

</div>

<div class="impl java">
Expand Down

0 comments on commit 4b10bb9

Please sign in to comment.