UiPath Documentation
orchestrator
2023.10
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Orchestrator 安装指南

上次更新日期 2026年4月28日

Identity Server AppSettings.json

appsettings.json 文件 (C:\Program Files (x86)\UiPath\Orchestrator\Identity) 包含身份服务器的开箱即用配置设置。第二个相同的文件 appsettings.Production.json 包含您的特定身份服务器设置。

重要提示:
  • 要根据需要配置标识服务器,应修改 appsettings.Production.json 文件。每次安装完成后,此文件将覆盖 appsettings.json 中预先存在的任何设置。
  • 如果您使用 2023.4 及更高版本,并通过添加X-Content-Type-Options修改了applicationhost.config ,则必须将其从 Identity appsettings.Production.json文件中删除。请参阅以下示例:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<!--
<add name="X-Content-Type-Options" value="nosniff" />
-->
</customHeaders>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<!--
<add name="X-Content-Type-Options" value="nosniff" />
-->
</customHeaders>
备注:

建议只有管理员更改这些参数的值。 此外,建议您关闭 IIS 服务器,以便在任何情况下修改 appsettings.Production.json 设置。 未记录在此页中的参数不应更改。 所有参数都区分大小写。

设置优先级

可以在多个位置配置设置。以下是身份服务器在确定设置的值时使用的优先级,从高 (1) 到低 (3):

  1. appsettings.Production.json 文件中的值
  2. appsettings.json 文件中的值
  3. 代码中的默认值设置。仅当在 appsettings.Production.jsonappsettings.json 中找不到特定设置时使用。

设置

文件 appsettings.json 的内部结构由多个 json 部分组成,用逗号分隔。

连接字符串

ConnectionStrings 部分用于存储身份服务器数据库连接字符串。此值由安装程序填充。

此设置具有 appsettings.Production.jsonappsettings.json 中的值。

"ConnectionStrings": { "DefaultConnection": "Server=.\\sqlexpress;Database=IdentityServer;User ID=<username>;Password=<password>;" }
"ConnectionStrings": { "DefaultConnection": "Server=.\\sqlexpress;Database=IdentityServer;User ID=<username>;Password=<password>;" }

加密方式

EncryptionSettings 部分用于存储租户加密密钥。在安装过程中,这些值会自动从 Orchestrator 的 UiPath.Orchestrator.dll.config 迁移。

此设置具有 appsettings.Production.jsonappsettings.json 中的值。

"EncryptionSettings": {
  "EncryptionKey": "3wkO1hkaXLwR9LZoRZIueIxG3GIEB/YMDZUWhD9AR8g="
}
"EncryptionSettings": {
  "EncryptionKey": "3wkO1hkaXLwR9LZoRZIueIxG3GIEB/YMDZUWhD9AR8g="
}

可以将身份服务器配置为使用本地密钥(见上文)或 Azure 密钥保管库(见下文),就像 Orchestrator 一样。

"EncryptionSettings": {
  "MultiTenantEncryptionKeyProvider": "AzureKeyVault",
  "EncryptionKeyPerTenant": true,
  "AzureKeyVaultAddress": "keyVaultAddress",
  "AzureKeyVaultCertificateThumbprint": "keyvaultCertificateThumbprint",
  "AzureKeyVaultClientId" : "azureClientId"
},
"EncryptionSettings": {
  "MultiTenantEncryptionKeyProvider": "AzureKeyVault",
  "EncryptionKeyPerTenant": true,
  "AzureKeyVaultAddress": "keyVaultAddress",
  "AzureKeyVaultCertificateThumbprint": "keyvaultCertificateThumbprint",
  "AzureKeyVaultClientId" : "azureClientId"
},
  • MultiTenantEncryptionKeyProvider - 指示在哪个密钥管理应用程序中存储从 Orchestrator 生成的每个租户的加密密钥。默认情况下,该设置在代码中具有 ConfigFileKey 值。接受的值是 AzureKeyVaultConfigFileKey。在 Identity Server 安装期间,该值将从 UiPath.Orchestrator.dll.config 的 EncryptionKeyPerTenant.KeyProvider 设置中复制。

以下身份服务器密钥与 UiPath.Orchestrator.dll.config安全应用程序设置部分中的 Orchestrator 密钥匹配:

身份服务器步骤Orchestrator 密钥
EncryptionKeyPerTenantEncryptionKeyPerTenant.Enabled
AzureKeyVaultAddressAzure.KeyVault.VaultAddress
AzureKeyVaultCertificateThumbprintAzure.KeyVault.CertificateThumbprint
AzureKeyVaultClientIdAzure.KeyVault.ClientId
AzureKeyVaultDirectoryIdAzure.KeyVault.DirectoryId
MultiTenantEncryptionKeyProviderEncryptionKeyPerTenant.KeyProvider
重要提示:

如果 UiPath.Orchestrator.dll.config 中的 CertificatesStoreLocation 参数设置为 LocalMachine,请确保 appsettings.Production.json 中的 AzureKeyVaultCertificateStoreLocation 具有相同的值。

重要提示:

如果在 Orchestrator 的UiPath.Orchestrator.dll.config内更改加密密钥Azure 密钥保管库设置,则还必须使用相同的值更新身份服务器的appsettings.Production.json

日志记录

Logging 部分为身份服务器使用的每个组件配置日志级别。这是一个通用的日志记录配置。在此处查找更多信息。

此部分具有 appsettings.json 中的值。

"Logging": {
  "LogLevel": {
    "Default": "Trace",
    "Microsoft": "Warning",
    "Microsoft.Hosting.Lifetime": "Information"
  }
}
"Logging": {
  "LogLevel": {
    "Default": "Trace",
    "Microsoft": "Warning",
    "Microsoft.Hosting.Lifetime": "Information"
  }
}

身份服务器为一些主要组件(如 MicrosoftMicrosoft.Hosting.Lifetime)提供一些默认值。

NLog

NLog 部分用于定义如何通过 NLog 目标在身份服务器中记录信息,就像在 Orchestrator 中一样。

此部分具有 appsettings.json 中的值。

json
"NLog": {
  "IncludeScopes": true,
  "throwConfigExceptions": false,
  "targets": {
    "EventLog": {
      "type": "EventLog",
      "source": "IdentityService",
      "layout": "${longdate} ${logger} ${message}${onexception:${newline}${exception:maxInnerExceptionLevel=10:format=shortType,message,stacktrace:separator=*:innerExceptionSeparator=&#xD;&#xA;&#x9;}}"
    }
  },
  "rules": [
    {
      "logger": "*",
      "minLevel": "Info",
      "writeTo": "EventLog"
    }
  ]
},
json
"NLog": {
  "IncludeScopes": true,
  "throwConfigExceptions": false,
  "targets": {
    "EventLog": {
      "type": "EventLog",
      "source": "IdentityService",
      "layout": "${longdate} ${logger} ${message}${onexception:${newline}${exception:maxInnerExceptionLevel=10:format=shortType,message,stacktrace:separator=*:innerExceptionSeparator=&#xD;&#xA;&#x9;}}"
    }
  },
  "rules": [
    {
      "logger": "*",
      "minLevel": "Info",
      "writeTo": "EventLog"
    }
  ]
},

默认情况下,NLog 配置为将日志写入应用程序事件。在此处阅读更多有关如何使用 json 部分配置 NLog 的信息。

应用程序设置

AppSettings 部分是身份服务器的主配置部分。此部分具有 appsettings.Production.jsonappsettings.json 中的值。

  • IdentityServerAddress - 表示身份服务器在验证用于调用身份服务器 API 的令牌时检查的受众。在安装过程中,此字段会自动将身份服务器的地址填充到 appsettings.Production.json不要修改此值,因为它将中断 Orchestrator 数据传播。

此设置具有 appsettings.Production.jsonappsettings.json 中的值。

备注:

确保提供小写 URL 作为 IdentityServerAddress 的值;否则,将发生错误。

  • Saml2ValidCertificateOnly - 如果设置为 true,则在配置 SAML2 时不允许使用无效证书。

默认情况下,该设置在代码中具有 true 值。

  • EnablePII - 当设置为 true 时,异常包含敏感信息(例如,外部身份提供程序的 URL 地址或身份服务器的地址等)。

默认情况下,该设置在 appsettings.json 和代码中具有 false 值。

  • HideErrorCodesInUi - 控制是否在 UI 中显示登录错误代码。默认情况下不显示此参数。默认值为 false。将其设置为 true 可以隐藏 UI 中的登录错误代码。例如,"HideErrorCodesInUi": true
  • CookieValidationInterval - 表示时间间隔(以秒为单位),此时间段过后将检查 Cookie,以确定用户和租户是否仍处于活动状态,以及用户是否尚未登录其他浏览器。appsetttings.Production.json 中的值会自动从具有相同设置的 Orchestrator 中迁移。

默认情况下,该值在 appsettings.Production.json 和代码内设置为60 秒。

  • CookieExpireMinutes - 表示身份服务器 Cookie 过期前的时间间隔(以分钟为单位)。appsetttings.Production.json 中的值从具有相同设置的 Orchestrator 自动迁移。

默认情况下,该值在 appsettings.Production.json 和代码内设置为 30 分钟。

  • OrchestratorUrl - 表示 Orchestrator 的 URL。当您单击身份管理门户中心菜单中的 Orchestrator 图标时,身份服务器会在此处将您重定向至其他页面。

该值在安装过程中在 appsettings.Production.json 中设置。

备注:

确保提供小写 URL 作为 OrchestratorUrl 的值;否则,将发生错误。

"AppSettings": {
    "IdentityServerAddress": "https://myIdentity.domain.local/identity",
    "EnablePII": false,
    "HideErrorCodesInUi": true,
    "CookieExpireMinutes": 30,
    "OrchestratorUrl": "https://myOrchestratorURL.domain.local"
  }
}
"AppSettings": {
    "IdentityServerAddress": "https://myIdentity.domain.local/identity",
    "EnablePII": false,
    "HideErrorCodesInUi": true,
    "CookieExpireMinutes": 30,
    "OrchestratorUrl": "https://myOrchestratorURL.domain.local"
  }
}

本地化

LocalizationSettings 部分在代码中具有以下默认值:

"LocalizationSettings": {
  "EnabledLanguages": "en,ja,de,es,es-MX,fr,ko,pt,pt-BR,ru,tr,zh-CN"
}
"LocalizationSettings": {
  "EnabledLanguages": "en,ja,de,es,es-MX,fr,ko,pt,pt-BR,ru,tr,zh-CN"
}
  • EnabledLanguages - 列出身份服务器中可用的语言。它用于限制可用语言的数量。

Load balancer

LoadBalancerSettings 部分在 appsettings.Production.json 和代码中具有以下默认值:

"LoadBalancerSettings": {
  "RedisConnectionString": "",
  "SlidingExpirationTimeInSeconds":  600
}
"LoadBalancerSettings": {
  "RedisConnectionString": "",
  "SlidingExpirationTimeInSeconds":  600
}

在多节点升级情况下,appsetttings.Production.json 中的值会自动从 Orchestrator 的 UiPath.Orchestrator.dll.config 中迁移。如果未在 Orchestrator 中配置 Redis,appsettings.Production.json 将包含此设置。

  • RedisConnectionString - 只有在将 LoadBalancer.UseRedis 设置为 true 时才能使用。一个连接字符串,允许您设置 Redis 服务器,其中包含服务器的 URL、密码和与 Redis 一起使用的端口。也可以在 Orchestrator 节点和 Redis 服务之间启用 SSL 加密连接。有关详细信息,请单击此处。例子:
    • 启用 SSL - "RedisConnectionString": A"DOCWREDIS02:6379,password=12345678,ssl=true"
    • 未启用 SSL - "RedisConnectionString": "DOCWREDIS02:6379,password=12345678"
  • SlidingExpirationTimeInSeconds - 控制缓存内项目的可调过期时间。此过期时间适用于 Redis 缓存和 InMemory 缓存(当 Redis 不可用时,这是默认值)。

Redis 设置

RedisSettings 部分控制启用哪些缓存。

  • UseRedisStoreCache - 将其值设置为 true 以启用 OAuth 客户端数据的 Redis 缓存。使用交互式登录在短时间内连接大量机器人时,这有助于防止出现性能问题。此缓存使用 LoadBalancerSettings 中指定的相同 Redis 连接字符串。默认情况下,UseRedisStoreCache 设置不会显示。

    备注:

    如果您使用外部应用程序功能,则不建议这样做,因为此设置将缓存客户端,并且不会反映对外部应用程序的更新。

  • UseRedisStoreClientCache - 将其值设置为 true,可为第一方客户端(UiPath 应用程序)或第三方客户端(外部应用程序)启用 Redis 缓存。如果您有大规模部署,建议启用此标志。

签名凭据

SigningCredentialSettings 部分描述用于对身份服务器生成的令牌进行签名的证书的位置。此部分中的设置值由安装程序根据您的输入填充。可以配置这些设置,以便从证书存储区或 Azure 密钥保管库中读取证书。

证书轮换设置

ValidationKeys - 用于指示第二个证书的 NameLocationNameType。这是证书轮换的必要操作。

备注:

出于安全原因,签名证书必须具有 2048 位公钥。确保证书有效、未过期,并且 Identity Server 可以访问私钥。有关您需要对SigningCredentialSettings部分做出的调整,请参阅证书轮换了解详情,以确保您始终在证书有效期内使用证书。

证书存储位置设置示例

下面是在证书存储区内查找证书的传统配置:

"SigningCredentialSettings": {
  "StoreLocation": {
    "Name": "30f3c11e676fc8eb1f9dd4e330f3ce668d796796",
    "Location": "LocalMachine",
    "NameType": "Thumbprint"
  }
"SigningCredentialSettings": {
  "StoreLocation": {
    "Name": "30f3c11e676fc8eb1f9dd4e330f3ce668d796796",
    "Location": "LocalMachine",
    "NameType": "Thumbprint"
  }

此示例中,Name 表示指纹值。

我们不建议为 LocationNameType 使用其他值。

Azure 密钥保管库位置设置示例
"SigningCredentialSettings": {
  "AzureKeyVaultLocation": {
    "KeyName": "key_name_534553553"
  }
"SigningCredentialSettings": {
  "AzureKeyVaultLocation": {
    "KeyName": "key_name_534553553"
  }

在此示例中,KeyName 表示要在 Azure 密钥保管库内搜索的密钥。

授权

  • RestrictBasicAuthentication - 允许您配置用户是否可以使用基本身份验证凭据登录 Orchestrator 实例。默认情况下,此设置不会显示在 appsettings.Production.json 中。以下值可用:
    • true - 用户无法使用基本身份验证凭据登录。
    • false - 用户无法使用基本身份验证凭据登录。这是默认值。
  • EnableBasicAuthenticationForHostTenant - 允许您配置主机管理员是否可以使用基本身份验证凭据登录 Orchestrator 实例的主机租户。此设置在 appsettings.Production.json 文件中默认不显示。以下值可用:
    • true - 主机管理员无法使用基本身份验证凭据登录。这是默认值。
    • false - 主机管理员无法使用基本身份验证凭据登录。

此参数绕过 RestrictBasicAuthentication 参数,这意味着如果将 EnableBasicAuthenticationForHostTenant 设置为 true,并且将 RestrictBasicAuthentication 设置为 true,则只能在主机级别使用基本身份验证凭据登录。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新