Subscribe

UiPath Orchestrator

The UiPath Orchestrator Guide

CORS/CSP Configuration

Web browser access to Amazon and Azure storage buckets can sometimes be restricted due to Cross Origin Resource Sharing (CORS) and Content Security Policy (CSP) settings. This applies to Orchestrator buckets as well, when Orchestrator's composite storage is configured to use Azure or Amazon.

The following operations are impaired when accessing bucket content from the Orchestrator UI:

📘

Note

Accessing storage files using activities is not impacted by CORS and CSP policies because they are browser-specific and are validated/enforced at browser level only.

Both CORS and CSP allow whitelisting identified entities in the web application. See below details about each.

CORS

CORS is a mechanism that allows resources on a web page to be accessed across domain boundaries.
Orchestrator web browser access to Amazon and Azure storage buckets can be restricted due to same-origin-policy on the provider side. Successfully accessing the content of such a bucket from the Orchestrator UI requires you to configure the respective provider to allow cross-origin requests from Orchestrator.

Amazon S3

Add a rule that allows GET and PUT requests from Orchestrator. For example:

<CORSConfiguration>
<CORSRule>
<AllowedOrigin>http://your.orchestrator.dns.name</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>

See here the official Amazon S3 documentation on the subject of cross-origin resource sharing.

Azure

Enable GET and PUT operations for requests originating from the Orchestrator. For example:

<Cors>
<CorsRule>
<AllowedOrigins>http://your.orchestrator.dns.name</AllowedOrigins>
<AllowedMethods>PUT,GET</AllowedMethods>
<AllowedHeaders>*</AllowedHeaders>
<ExposedHeaders>*</ExposedHeaders>
</CorsRule>
<Cors>

See here the official Azure documentation on the subject of cross-origin resource sharing.

CSP

Content Security Policy is a web browser security layer that prevents a web app from making requests outside a trusted set of hosts.
When using storage buckets, Orchestrator automatically allows calls to Azure or Amazon S3, if these providers are enabled or if Orchestrator's composite storage is configured to use Azure or Amazon S3.

🚧

Important!

To prevent CSP issues, use canonical Azure or Amazon names for the container, and avoid vanity URLs.

To fix possible CSP issues, add the Buckets.ContentSecurityPolicy parameter in UiPath.Orchestrator.dll.config and set its value to a comma-separated list of all domains to be whitelisted. This parameter overrides the corresponding Orchestrator settings in regards to Azure and AWS, so make sure to adds Azure and/or AWS as well, if needed.

Updated 2 months ago


CORS/CSP Configuration


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.