Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions guides/security/cap-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -1529,16 +1529,6 @@ Avoid iterating through all subscriber tenants to perform tenant-specific tasks.
Instead, prefer a task-based approach which processes specific subscriber tenants selectively.
:::

To use IAS-based Remote Services in background executions, you might in addition need to manually inject the tenant-specific IAS host into the created Request Context. If the background execution is initialized with a fresh Request Context, it will not carry inherited authentication details from a previous Request Context and thereby lacks the IAS host information required for remote service calls. The host can be retrieved from a `TenantInfo` object provided for example by the `TenantProviderService`.

```java
TenantInto tenantInfo = ...;
String tenantHost = tenantInfo.get("subscriber").get("tenantHost");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we leave with tenantInfo = ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BraunMatthias : You mean removing ´tenantInfo.get("subscriber").get("tenantHost");` and leaving a bit unclear where to get the tenantHost? I think it depends a bit if and when we will get an automatic solution which works out of the box. However, people will then ask where they can read the tenantHost from. We would need to mention the xsuaa api which the stakeholder has to call manually.

runtime.requestContext().systemUser(tenantId).modifyUser(user->user.setAdditionalAttribute("iss", tenantHost)).run((reqContext) -> {
… //call remote service
});
```

</div>

<div class="impl node">
Expand Down
Loading