UiPath Documentation
orchestrator
2024.10
false
Orchestrator 安装指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Identity Server 脚本

运行 Publish-IdentityServer.ps1 脚本,以对 Identity Server 进行初始部署或更新

发布到身份服务器

下表介绍了可与 Publish-IdentityServer.ps1 脚本一起使用的所有参数。

参数

描述

-action

必填。指示要启动的场景类型。

可用的选项如下:

  • Deploy - 指定它为全新安装。
  • Update - 指定要更新 Identity Server 实例。

-azureAccountApplicationId

必填。Azure 服务主体 ID。

请注意,需要在订阅范围内为所用的服务主体分配应用程序服务的"参与者"角色

-azureAccountPassword

Mandatory. The Azure token password for the service principal ID.

-azureSubscriptionId

Mandatory. The Azure subscription ID for the App Service that hosts Orchestrator.

-azureAccountTenantId

Mandatory. The Azure tenant ID.

-orchestratorUrl

必需。Orchestrator 实例的 URL。

-identityServerUrl

必填。Identity Server 的 URL。

重要提示:URL 必须包含 Identity Server 地址和小写后缀 /identity

示例:https://[identity_server]/identity

-resourceCatalogUrl

必填。资源的 URL

目录。

-orchDetails

此参数是包含以下值的哈希表:

  • resourceGroupName - 必填。包含 Orchestrator 应用程序服务的 Azure 资源组名称。
  • appServiceName - 必填。Orchestrator Azure 应用程序服务名称。
  • targetSlot - 必填。Azure 设置的目标应用程序服务槽。

-identityServerDetails

此参数是包含以下值的哈希表:

  • resourceGroupName - 必填。包含 Identity Server 应用程序服务的 Azure 资源组名称。
  • appServiceName - 必填。Identity Server Azure 应用程序服务名称。
  • targetSlot - 必填。Azure 设置的目标应用程序服务槽。

-package

必填。指示 UiPath.IdentityServer.Web.zip 存档的完整路径或相对路径。

-cliPackage

必填。指示 UiPath.IdentityServer.Migrator.Cli.zip 存档的完整路径或相对路径。

-productionSlotName

可选。 只有当身份服务器应用程序服务部署槽不同于 Azure 设置的默认生产应用程序服务槽时,才能使用它。

-stopApplicationBeforePublish

可选。如果存在,它会在部署之前停止应用程序,并在部署完成后启动应用程序。

-unattended

可选。 如果存在,则部署将继续,无需任何用户确认。

-tmpDirectory

可选。启用下载和解压缩所需文件的目录的规范。

-noAzureAuthentication

可选。允许您依靠自己的用户身份发布到 Azure 应用程序服务,而无需创建服务主体。

如果使用此参数,则不再需要 UseServicePrincipal 参数集(其中包括 Azure 应用程序 ID、密码、订阅 ID 和租户 ID 等项目)。

Publish-IdentityServer.ps1 脚本用于身份服务器的初始部署或更新。该脚本假定网页应用程序已配置 DefaultConnection 数据库连接字符串。

.\Publish-IdentityServer.ps1 `
    -action Deploy `
    -orchestratorUrl "<orchestrator_address>" `
    -identityServerUrl "https://<identity_server_url>/identity" ` // must be in lowercase
    -resourceCatalogUrl "<resource_catalog_address>" `
    -orchDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>";  targetSlot = "Production" } `
    -identityServerDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>"; targetSlot = "Production" } `
    -azureSubscriptionId "<subscription_id>" `
    -azureAccountTenantId "<azure_tenant_id>" `
    -azureAccountApplicationId "<azure_application_id>" `
    -azureAccountPassword "<azure_account_password>" `
    -package "UiPath.IdentityServer.Web.zip" `
    -cliPackage "UiPath.IdentityServer.Migrator.Cli.zip" `
    -stopApplicationBeforePublish `
    -unattended
.\Publish-IdentityServer.ps1 `
    -action Deploy `
    -orchestratorUrl "<orchestrator_address>" `
    -identityServerUrl "https://<identity_server_url>/identity" ` // must be in lowercase
    -resourceCatalogUrl "<resource_catalog_address>" `
    -orchDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>";  targetSlot = "Production" } `
    -identityServerDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>"; targetSlot = "Production" } `
    -azureSubscriptionId "<subscription_id>" `
    -azureAccountTenantId "<azure_tenant_id>" `
    -azureAccountApplicationId "<azure_application_id>" `
    -azureAccountPassword "<azure_account_password>" `
    -package "UiPath.IdentityServer.Web.zip" `
    -cliPackage "UiPath.IdentityServer.Migrator.Cli.zip" `
    -stopApplicationBeforePublish `
    -unattended
重要提示:

运行上述脚本后,请确保执行下面列出的额外步骤,以成功进行初始部署。

发布身份服务器后,执行以下步骤:

  1. 转到 Azure 门户。
  2. 选择您的身份服务器应用程序服务。
  3. 在“证书”菜单中,转到“自带证书”。
  4. 上传具备有效密码的 .pfx 私钥证书。
备注:

此证书用于对访问令牌和 ID 令牌进行签名。

  1. 在“配置”菜单下,按照“应用程序设置”列中写入的内容准确添加以下应用程序设置:

    应用程序设置

    描述

    
       AppSettings__IdentityServerAddress
      
    
       AppSettings__IdentityServerAddress
      
    

    https://[identity_server]/identity

    身份服务器的公共 URL。

    重要提示:URL 必须包含 Identity Server 的地址 + 后缀
    
      /identity
     
    
      /identity
     
    
    小写。

    
       AppSettings__SigningCredentialSettings__StoreLocation__Location
      
    
       AppSettings__SigningCredentialSettings__StoreLocation__Location
      
    

    当前用户

    这必须指向当前用户

    
       AppSettings__SigningCredentialSettings__StoreLocation__Name
      
    
       AppSettings__SigningCredentialSettings__StoreLocation__Name
      
    

    XXXXXXXXXXXXXXXXXXXXXXXXXXXX

    之前上传的证书的指纹。

    
       AppSettings__SigningCredentialSettings__StoreLocation__NameType
      
    
       AppSettings__SigningCredentialSettings__StoreLocation__NameType
      
    

    
       Thumbprint
      
    
       Thumbprint
      
    

    Enter
    
      Thumbprint
     
    
      Thumbprint
     
    
    作为上一字段的类型。

    
       AppSettings__LoadBalancerSettings__RedisConnectionString
      
    
       AppSettings__LoadBalancerSettings__RedisConnectionString
      
    

    
       XXXXXXXXXXXX:XXXX,password=XXXXXX
      
    
       XXXXXXXXXXXX:XXXX,password=XXXXXX
      
    

    设置 Redis 服务器所需的连接字符串,包含服务器的 URL、密码和端口。

    您也可以在 Orchestrator 节点和 Redis 服务之间启用 SSL 加密连接。

    
          AppSettings__LoadBalancerSettings__SlidingExpirationTimeInSeconds
         
    
          AppSettings__LoadBalancerSettings__SlidingExpirationTimeInSeconds
         
    

    秒数

    缓存中项目的过期时间。

    此过期时间适用于 Redis 缓存和内存缓存。

    
          AppSettings__RedisSettings__UseRedisStoreCache
         
    
          AppSettings__RedisSettings__UseRedisStoreCache
         
    

    
         true
        
    
         true
        
    
    /
    
         false
        
    
         false
        
    
    将其值设置为
    
         true
        
    
         true
        
    
    启用 OAuth 客户端数据的 Redis 缓存。

    这有助于防止使用交互式登录在短时间内连接大量机器人时出现性能问题。此缓存使用与 中指定的相同的 Redis 连接字符串。

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

    
          AppSettings__RedisSettings__UseRedisStoreClientCache
         
    
          AppSettings__RedisSettings__UseRedisStoreClientCache
         
    

    
         true
        
    
         true
        
    
    /
    
         false
        
    
         false
        
    

    将其值设置为 True,可为第一方客户端(UiPath 应用程序)或第三方客户端(外部应用程序)启用 Redis 缓存。

    如果您有大规模部署,建议启用此标志。

    
          App__Saml2ValidCertificateOnly
         
    
          App__Saml2ValidCertificateOnly
         
    

    
         true
        
    
         true
        
    
    /
    
         false
        
    
         false
        
    
    对于通过 Azure 网页应用进行的 Orchestrator 部署,此参数必须设置为
    
         false
        
    
         false
        
    

    这是因为 SAML2 要求将证书添加到其信任存储区,但 Azure 网页应用程序不允许此操作。将值设置为

    
    false
    
    false
    
    意味着绕过证书检查。

    
          WEBSITE_LOAD_CERTIFICATES
         
    
          WEBSITE_LOAD_CERTIFICATES
         
    

    XXXXXXXXXXXXXXXXXXXXXXXXXXXX

    之前上传的证书的指纹值。

    
          WEBSITE_LOAD_USER_PROFILE
         
    
          WEBSITE_LOAD_USER_PROFILE
         
    

    1

    用户配置文件。
    
         -azureUSGovernmentLogin
        
    
         -azureUSGovernmentLogin
        
    
    可选。此参数仅用于美国政府部署。  
    6.

    保存更改。

    Microsoft Azure 文档中查找更多详细信息。

    替换私钥证书

    当您将私钥证书替换为新证书时,请确保按照以下步骤操作:

    1. AppSettings__SigningCredentialSettings__StoreLocation__NameWEBSITE_LOAD_CERTIFICATES 参数的值替换为新证书的指纹。
    2. 重新启动身份应用程序服务。
    3. 重新启动 Orchestrator 应用程序服务。

    迁移到身份服务器

    下表介绍了可与 MigrateTo-IdentityServer.ps1一起使用的所有参数。

    参数

    描述

    -cliPackage

    必填项

    指示 UiPath.IdentityServer.Migrator.Cli.zip 存档的完整路径或相对路径。

    -azureDetails

    此参数是包含以下值的哈希表:

    • azureAccountApplicationId - 必填。Azure 服务主体 ID。

      请注意,需要在订阅范围内为所用的服务主体分配应用程序服务的"参与者"角色

    • azureSubscriptionId - 必填。托管 Orchestrator 的应用程序服务的 Azure 订阅 ID。
    • azureAccountTenantId - 必填。Azure 租户 ID。
    • azureAccountPassword - 必填。服务主体 ID 的 Azure 令牌密码。

    -orchDetails

    此参数是包含以下值的哈希表:

    • resourceGroupName - 必填。包含 Orchestrator 应用程序服务的 Azure 资源组名称。
    • appServiceName - 必填。Orchestrator Azure 应用程序服务名称。
    • targetSlot - 必填。Azure 设置的目标应用程序服务槽。

    -identityServerDetails

    此参数是包含以下值的哈希表:

    • resourceGroupName - 必填。包含 Identity Server 应用程序服务的 Azure 资源组名称。
    • appServiceName - 必填。Identity Server Azure 应用程序服务名称。
    • targetSlot - 必填。Azure 设置的目标应用程序服务槽。

    -identityServerUrl

    必填。Identity Server 的公共地址。

    重要提示:URL 必须包含 Identity Server 的地址和小写后缀 /identity

    示例:https://[identity_server]/identity

    -orchestratorUrl

    必填。Orchestrator 的公共地址。

    -tmpDirectory

    可选。启用下载和解压缩所需文件的目录的规范。

    -hostAdminPassword

    当将-action设置为Deploy时,仅全新部署为必需

    为主机管理员设置自定义密码。请注意,密码必须至少 8 个字符长,并且必须至少有一个小写字符和至少一个数字。

    -isHostPassOneTime

    可选。使您能够在主机管理员首次登录时强制执行密码重置。

    如果省略此参数,则主机管理员密码不是一次性密码。

    -defaultTenantAdminPassword

    当将-action设置为Deploy时,仅全新部署为必需

    为默认租户管理员设置自定义密码。请注意,密码必须至少 8 个字符长,并且必须至少有一个小写字符和至少一个数字。

    -isDefaultTenantPassOneTime

    可选。使您能够在默认租户管理员首次登录时强制执行密码重置。

    如果省略此参数,则租户管理员密码不是一次性密码。

    -noAzureAuthentication

    可选。允许您依靠自己的用户身份发布到 Azure 应用程序服务,而无需创建服务主体。

    如果使用此参数,则不再需要 UseServicePrincipal 参数集(其中包括 Azure 应用程序 ID、密码、订阅 ID 和租户 ID 等项目)。

    MigrateTo-IdentityServer.ps1 脚本用于将用户数据从 Orchestrator 迁移到 Identity Server,并为两者设置好配置。它将 Orchestrator 的身份授权设置到 Identity Server,并在 Identity Server 中为 Orchestrator 创建客户端配置。

    该脚本假定 Orchestrator 和身份服务器已发布。

    .\MigrateTo-IdentityServer.ps1 `
        -cliPackage "UiPath.IdentityServer.Migrator.Cli.zip" `
        -azureDetails @{azureSubscriptionId = "<subscription_id>"; azureAccountTenantId = "<azure_tenant_id>"; azureAccountApplicationId = "<azure_application_id>"; azureAccountPassword = "<azure_account_password>" } `
        -orchDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>";  targetSlot = "Production" } `
        -identityServerDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>"; targetSlot = "Production" } `
        -identityServerUrl "https://<identity_server_url>/identity" ` // must be in lowercase
        -orchestratorUrl "https://<OrchestratorURL>" `
        -hostAdminPassword "12345qwert" `
        -defaultTenantAdminPassword "12345qwert"
    .\MigrateTo-IdentityServer.ps1 `
        -cliPackage "UiPath.IdentityServer.Migrator.Cli.zip" `
        -azureDetails @{azureSubscriptionId = "<subscription_id>"; azureAccountTenantId = "<azure_tenant_id>"; azureAccountApplicationId = "<azure_application_id>"; azureAccountPassword = "<azure_account_password>" } `
        -orchDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>";  targetSlot = "Production" } `
        -identityServerDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>"; targetSlot = "Production" } `
        -identityServerUrl "https://<identity_server_url>/identity" ` // must be in lowercase
        -orchestratorUrl "https://<OrchestratorURL>" `
        -hostAdminPassword "12345qwert" `
        -defaultTenantAdminPassword "12345qwert"
    
  • 发布到身份服务器
  • 替换私钥证书
  • 迁移到身份服务器

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新