Orchestrator
2020.10
False
横幅背景图像
不在支持范围内
Orchestrator 安装指南
上次更新日期 2023年12月12日

Identity Server AppSettings.json

appsettings.json 文件 (C:\Program Files (x86)\UiPath\Orchestrator\Identity) 包含身份服务器的开箱即用配置设置。第二个相同的文件 appsettings.Production.json 包含您的特定身份服务器设置。
重要提示:要根据需要配置标识服务器,应修改 appsettings.Production.json 文件。每次安装完成后,此文件将覆盖 appsettings.json 中预先存在的任何设置。
备注:

建议仅由管理员更改这些参数的值。

此外,建议您关闭 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 密钥

EncryptionKeyPerTenant

EncryptionKeyPerTenant.Enabled

AzureKeyVaultAddress

Azure.KeyVault.VaultAddress

AzureKeyVaultCertificateThumbprint

Azure.KeyVault.CertificateThumbprint

AzureKeyVaultClientId

Azure.KeyVault.ClientId

MultiTenantEncryptionKeyProvider

EncryptionKeyPerTenant.KeyProvider

重要提示: 如果 UiPath.Orchestrator.dll.config 中的 CertificatesStoreLocation 参数设置为 LocalMachine,请确保 {8 AzureKeyVaultCertificateStoreLocation 中的 appsettings.Production.json 具有相同的值。
重要提示: 如果在 Orchestrator 的 UiPath.Orchestrator.dll.config中更改 加密密钥Azure 密钥保管库 设置,则还必须使用相同的值更新身份服务器的 appsettings.Production.json

日志记录

Logging 部分用于配置 Identity Server 使用的每个组件的日志级别。这是一个通用的日志记录配置。在此处了解更多信息。
此部分具有 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 和代码内设置为 60 分钟。
  • 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": {
  "UseRedis": false,
  "RedisConnectionString": "",
  "SlidingExpirationTimeInSeconds":  600
}"LoadBalancerSettings": {
  "UseRedis": false,
  "RedisConnectionString": "",
  "SlidingExpirationTimeInSeconds":  600
}
在多节点升级情况下,appsetttings.Production.json 中的值会自动从 Orchestrator 的 UiPath.Orchestrator.dll.config 中迁移。如果未在 Orchestrator 中配置 Redis,appsettings.Production.json 将包含此设置。
  • UseRedis - 使用 Redis 作为数据库,将消息和缓存在通过负载均衡器连接的所有计算机之间分发。这对多节点来说是必需的。
  • RedisConnectionString - 只有在将 LoadBalancer.UseRedis 设置为 true 时才能使用。一个连接字符串,用于设置 Redis 服务器,其中包含服务器的 URL、密码和与 Redis 一起使用的端口。也可以在 Orchestrator 节点和 Redis 服务之间启用 SSL 加密连接。有关详细信息,请单击此处。示例:
    • 启用 SSL - "RedisConnectionString": "DOCWREDIS02:6379,password=12345678,ssl=true"
    • 未启用 SSL - "RedisConnectionString": "DOCWREDIS02:6379,password=12345678"
  • SlidingExpirationTimeInSeconds - 控制缓存内项目的可调过期时间。此过期时间适用于 Redis 缓存和 InMemory 缓存(当 Redis 不可用时,这是默认值)。

签名凭据

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

证书轮换设置

  • SigningCredential - 用于指定默认证书的 NameLocationNameType
  • 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,则只能在主机级别使用基本身份验证凭据登录。
  • 设置优先级
  • 设置
  • 连接字符串
  • 加密方式
  • 日志记录
  • NLog
  • 应用程序设置
  • 本地化
  • Load balancer
  • 签名凭据
  • 授权

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.