Skip to content

Document tenant-specific IAS host injection in RequestContext#2474

Open
StefanHenke wants to merge 2 commits intomainfrom
StefanHenke-patch-2
Open

Document tenant-specific IAS host injection in RequestContext#2474
StefanHenke wants to merge 2 commits intomainfrom
StefanHenke-patch-2

Conversation

@StefanHenke
Copy link
Copy Markdown
Contributor

Added instructions for injecting tenant-specific IAS host in background threads.

Added instructions for injecting tenant-specific IAS host in background threads.
Instead, prefer a task-based approach which processes specific subscriber tenants selectively.
:::

When creating a new RequestContext in a background thread (without propagating an existing request), you must manually inject the tenant-specific IAS host to use IAS-based Remote Services. Unlike inherited request contexts that automatically carry authentication details, a fresh asynchronous request 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`.
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.

I assume "background thread" and "background executions" (from previous paragraph) mean the same thing.
If that is correct, I assume the difference between those two paragraphs is the target: persistence vs. remote service. Is that correct?

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.

@renejeglinsky : Yes you are right. I rephrased the sentence a bit to make it bit clearer.

Instead, prefer a task-based approach which processes specific subscriber tenants selectively.
:::

To use IAS-based Remote Services in background executions, you must in addition manually inject the tenant-specific IAS host into the created Request Context. Unlike inherited request contexts that automatically carry authentication details, a fresh Request Context 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`.
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.

I feel that this would be clearer (as long as it's correct).

Suggested change
To use IAS-based Remote Services in background executions, you must in addition manually inject the tenant-specific IAS host into the created Request Context. Unlike inherited request contexts that automatically carry authentication details, a fresh Request Context 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`.
To use IAS-based Remote Services in background executions, you must in addition manually inject the tenant-specific IAS host into the created Request Context. As background executions need a fresh Request Context, they cannot inherit request contexts that automatically carry authentication details and thereby lack the IAS host information required for remote service calls. The host can be retrieved from a `TenantInfo` object provided for example by the `TenantProviderService`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants