UiPath Documentation
automation-suite
2.2510
true
EKS/AKS 上的 Automation Suite 安装指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

管理证书

在 EKS/AKS 上的 Automation Suite 中更新 TLS 和身份令牌签名证书。

重要提示:

安装流程会代表您生成自签名证书。这些证书将在 90 天后过期。安装完成后,您必须将这些证书替换为由受信任的证书颁发机构 (CA) 签名的证书。如果不更新证书,安装将在 90 天后停止工作。

You can use the uipathctl CLI tool to update certificates post-installation. For details, refer to uipathctl documentation.

生成证书签名请求 (CSR) 和私钥​

要生成 CSR 和私钥,请运行以下命令:

# copy the machine openssl configuration locally
cp /etc/pki/tls/openssl.cnf ./openssl.tmp.cnf

# Replace the [AUTOMATION_SUITE_FQDN] value. For example, "automationsuite.corp.com"
AS_FQDN=[AUTOMATION_SUITE_FQDN]
cat >> ./openssl.tmp.cnf <<EOF
[SAN]
subjectAltName=DNS:$AS_FQDN,DNS:alm.$AS_FQDN,DNS:monitoring.$AS_FQDN,DNS:registry.$AS_FQDN,DNS:objectstore.$AS_FQDN,DNS:insights.$AS_FQDN,DNS:apps.$AS_FQDN
EOF

# create the certificate request
openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout server.key -subj "/C=xx/ST=xx/O=xx/OU=xx/CN=$AS_FQDN" -reqexts SAN -config openssl.tmp.cnf -out ${AS_FQDN}.csr
# copy the machine openssl configuration locally
cp /etc/pki/tls/openssl.cnf ./openssl.tmp.cnf

# Replace the [AUTOMATION_SUITE_FQDN] value. For example, "automationsuite.corp.com"
AS_FQDN=[AUTOMATION_SUITE_FQDN]
cat >> ./openssl.tmp.cnf <<EOF
[SAN]
subjectAltName=DNS:$AS_FQDN,DNS:alm.$AS_FQDN,DNS:monitoring.$AS_FQDN,DNS:registry.$AS_FQDN,DNS:objectstore.$AS_FQDN,DNS:insights.$AS_FQDN,DNS:apps.$AS_FQDN
EOF

# create the certificate request
openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout server.key -subj "/C=xx/ST=xx/O=xx/OU=xx/CN=$AS_FQDN" -reqexts SAN -config openssl.tmp.cnf -out ${AS_FQDN}.csr

您的 IT 团队使用获取的值生成签名证书。 生成的私钥保留在本地。

管理 TLS 证书​

要查看有关更新 TLS 证书的更多信息,请运行以下命令:

uipathctl config update-tls-certificates --help
uipathctl config update-tls-certificates --help

输出:

************************************************************************************
Manage tls certificates

Usage:
  uipathctl config tls-certificates [flags]
  uipathctl config tls-certificates [command]

Available Commands:
  get         Get the current tls certificates
  update      Update tls certificates

Flags:
  -h, --help   help for tls-certificates

Global Flags:
      --context string      name of the kubeconfig context to use
      --kubeconfig string   kubectl configuration file (default: ~/.kube/config)
      --log-format string   log format. one of [text,json] (default "text")
      --log-level string    set log level. one of [trace,debug,info,error] (default "error")
  -q, --quiet               suppress all output except for errors and warnings
      --timeout duration    timeout of the command (default 1h0m0s)

************************************************************************************
************************************************************************************
Manage tls certificates

Usage:
  uipathctl config tls-certificates [flags]
  uipathctl config tls-certificates [command]

Available Commands:
  get         Get the current tls certificates
  update      Update tls certificates

Flags:
  -h, --help   help for tls-certificates

Global Flags:
      --context string      name of the kubeconfig context to use
      --kubeconfig string   kubectl configuration file (default: ~/.kube/config)
      --log-format string   log format. one of [text,json] (default "text")
      --log-level string    set log level. one of [trace,debug,info,error] (default "error")
  -q, --quiet               suppress all output except for errors and warnings
      --timeout duration    timeout of the command (default 1h0m0s)

************************************************************************************

查找 TLS 证书​

证书在 Istio 级别存储为密码。 您可以在 <istio-system> 命名空间中的 istio-ingressgateway-certs 名称下找到证书。

请参阅以下列表中的证书文件:

  • 服务器 TLS 证书存储为tls.crt
  • 作为tls.key的服务器 TLS 私钥
  • CA 捆绑包存储为ca.crt

您可以使用以下命令验证密码:

kubectl -n <istio-system> get secrets istio-ingressgateway-certs -o yaml
kubectl -n <istio-system> get secrets istio-ingressgateway-certs -o yaml

Certificates are also stored in the <uipath> namespace. This is applicable to every UiPath® product that needs certificate information to trust incoming calls. For details, refer to Understanding the container architecture related to certificates.

更新 TLS 证书​

重要提示:

Before updating the server certificate, you must decrypt the private key that was generated in the Generating a Certificate Signing Request (CSR) and a private key section. Skipping this decryption step will result in an error.

要解密证书密钥,请运行以下命令:

# replace /path/to/encrypted/cert/key to absolute file path of key
# replace /path/to/decrypt/cert/key to store decrypt key
# Once prompted, please entry the passphrase or password to decrypt the key

openssl rsa -in /path/to/encrypted/cert/key -out /path/to/decrypt/cert/key
# replace /path/to/encrypted/cert/key to absolute file path of key
# replace /path/to/decrypt/cert/key to store decrypt key
# Once prompted, please entry the passphrase or password to decrypt the key

openssl rsa -in /path/to/encrypted/cert/key -out /path/to/decrypt/cert/key
证书链的组合方式​

运行uipathctl config tls-certificates update命令时, uipathctl会从两个单独的输入文件组合完整证书链:

  • server.crt - PEM 格式的完整公共服务器证书链:叶服务器证书、后跟的中间 CA 证书和根 CA 构成该叶证书的签名路径。仅包含属于叶证书实际签名链的证书,请勿包含同级 CA 证书、不相关证书、重复证书或备用 CA 证书。
  • ca.crt - 完整的 CA 链,包括所有中间证书和根 CA。该文件必须仅包含用于对 TLS 服务器证书进行签名的证书。包括其他任何内容都会导致失败。

uipathctl在运行时合并这些文件。

要更新证书,请提供三个证书文件中每一个的路径。所有证书文件必须为PEM格式。

  • 证书颁发机构捆绑包- 用于对 TLS 服务器证书进行签名的完整 CA 链。包括所有中间证书和根 CA。不要包含分支证书或未用于对 TLS 服务器证书进行签名的任何其他证书,因为包含其他任何证书都会导致失败。链式证书上限为最多九个证书。
  • 服务器证书- PEM 格式的完整公共服务器证书链,从分支服务器证书开始,然后是中间 CA 证书和根 CA。仅包括形成叶证书实际签名链的证书。
  • 私钥- 服务器证书的私钥。
uipathctl config tls-certificates update --cert server.crt --cacert ca.crt --key server.key
uipathctl config tls-certificates update --cert server.crt --cacert ca.crt --key server.key

For troubleshooting TLS certificate validation errors, refer to TLS certificate validation errors.

如果您选择自行管理证书,则必须将--use-istio-cert标志与证书更新命令一起使用。此标志允许将现有密码复制到uipath命名空间。请注意,在使用--use-istio-cert标志时,您不得使用任何其他证书标志,否则命令将失败。

如果使用uipath以外的命名空间,则必须通过将其传递给--namespace <uipath>标志来指定该命名空间,其中<uipath>表示部署 Automation Suite 的命名空间。

访问 TLS 证书​

要打印证书文件,请运行以下命令:

uipathctl config tls-certificates get
uipathctl config tls-certificates get

管理其他 CA 证书​

要查看有关其他 CA 证书的更多信息,请运行以下命令:

 uipathctl config additional-ca-certificates --help
 uipathctl config additional-ca-certificates --help

输出:

***************************************************************************************

Manage additional ca certificates

Usage:
  uipathctl config additional-ca-certificates [flags]
  uipathctl config additional-ca-certificates [command]

Available Commands:
  get         Get the current additional ca certificates
  update      Update additional ca certificates

Flags:
  -h, --help   help for additional-ca-certificates

Global Flags:
      --context string      name of the kubeconfig context to use
  -f, --force               override all user prompts to true
      --kubeconfig string   kubectl configuration file (default: ~/.kube/config)
      --log-format string   log format. one of [text,json] (default "text")
      --log-level string    set log level. one of [trace,debug,info,error] (default "info")
  -q, --quiet               suppress all output except for errors and warnings
      --timeout duration    timeout of the command (default: 90 minutes) (default 1h30m0s)
      --versions string     optional path to versions file

Use "uipathctl config additional-ca-certificates [command] --help" for more information about a command.

***************************************************************************************
***************************************************************************************

Manage additional ca certificates

Usage:
  uipathctl config additional-ca-certificates [flags]
  uipathctl config additional-ca-certificates [command]

Available Commands:
  get         Get the current additional ca certificates
  update      Update additional ca certificates

Flags:
  -h, --help   help for additional-ca-certificates

Global Flags:
      --context string      name of the kubeconfig context to use
  -f, --force               override all user prompts to true
      --kubeconfig string   kubectl configuration file (default: ~/.kube/config)
      --log-format string   log format. one of [text,json] (default "text")
      --log-level string    set log level. one of [trace,debug,info,error] (default "info")
  -q, --quiet               suppress all output except for errors and warnings
      --timeout duration    timeout of the command (default: 90 minutes) (default 1h30m0s)
      --versions string     optional path to versions file

Use "uipathctl config additional-ca-certificates [command] --help" for more information about a command.

***************************************************************************************

以下部分描述了可以使用 uipathctl config additional-ca-certificates 命令执行的操作。

更新 CA 证书​

要更新 CA 证书,请执行以下步骤:

  1. Update the input.json file to point to the file with additional_ca_certs. For details, refer to Certificate configuration.
  2. 应用清单:
    uipathctl manifest apply input.json --versions versions.json
    uipathctl manifest apply input.json --versions versions.json
    
    此命令可能会失败,并显示如下错误:
    Error: [failed to wait for application argocd/<app-name1>: timed out waiting for the condition,
    failed to wait for application argocd/<app-name2>: timed out waiting for the condition]]
    Error: [failed to wait for application argocd/<app-name1>: timed out waiting for the condition,
    failed to wait for application argocd/<app-name2>: timed out waiting for the condition]]
    
    无论失败原因如何,请继续执行步骤 3 以重新启动部署并稳定环境。
  3. 手动重新启动uipath命名空间中的所有部署和状态集:
    kubectl rollout restart deployment -n <uipath>
    kubectl rollout restart sts -n <uipath>
    kubectl rollout restart deployment -n <uipath>
    kubectl rollout restart sts -n <uipath>
    
备注:

To append the old certificates, you must use the get command from the Accessing the CA certificates section and append them in the CA certificate .pem file that you must provide in the additional_ca_certs field.

CA 证书捆绑包文件应为有效的 .pem 格式,并且可以包含多个证书。

访问 CA 证书​

要下载已配置的 CA 证书,请运行以下命令:

 uipathctl config additional-ca-certificates get
 uipathctl config additional-ca-certificates get

管理身份令牌签名证书​

Automation Suite 提供了两种方法来管理身份令牌签名证书的轮换:自动和手动。

要查看有关身份令牌签名证书的更多信息,请运行以下命令:

 uipathctl config token-signing-certificates --help
 uipathctl config token-signing-certificates --help

输出:

************************************************************************************

Manage token signing certificates

Usage:
  uipathctl config token-signing-certificates [flags]
  uipathctl config token-signing-certificates [command]

Available Commands:
  automatic-key-management Manage key management
  get                      Get the current token signing certificate
  rotate                   Rotate token signing certificates
  update                   Update future token signing certificate

Flags:
  -h, --help   help for token-signing-certificates

Global Flags:
      --context string      name of the kubeconfig context to use
  -f, --force               override all user prompts to true
      --kubeconfig string   kubectl configuration file (default: ~/.kube/config)
      --log-format string   log format. one of [text,json] (default "text")
      --log-level string    set log level. one of [trace,debug,info,error] (default "info")
  -q, --quiet               suppress all output except for errors and warnings
      --timeout duration    timeout of the command (default: 90 minutes) (default 1h30m0s)
      --versions string     optional path to versions file

Use "uipathctl config token-signing-certificates [command] --help" for more information about a command.

************************************************************************************
************************************************************************************

Manage token signing certificates

Usage:
  uipathctl config token-signing-certificates [flags]
  uipathctl config token-signing-certificates [command]

Available Commands:
  automatic-key-management Manage key management
  get                      Get the current token signing certificate
  rotate                   Rotate token signing certificates
  update                   Update future token signing certificate

Flags:
  -h, --help   help for token-signing-certificates

Global Flags:
      --context string      name of the kubeconfig context to use
  -f, --force               override all user prompts to true
      --kubeconfig string   kubectl configuration file (default: ~/.kube/config)
      --log-format string   log format. one of [text,json] (default "text")
      --log-level string    set log level. one of [trace,debug,info,error] (default "info")
  -q, --quiet               suppress all output except for errors and warnings
      --timeout duration    timeout of the command (default: 90 minutes) (default 1h30m0s)
      --versions string     optional path to versions file

Use "uipathctl config token-signing-certificates [command] --help" for more information about a command.

************************************************************************************
重要提示:

您可以使用最大密钥长度 4096 位对证书进行签名。 作为最佳实践,我们强烈建议您使用至少 512 位(64 字节)长度的密钥。

下一节将详细介绍可以使用uipathctl config token-signing-certificates命令执行的操作。

自动证书轮换​

自动证书轮换意味着 Automation Suite 管理签名密钥的生命周期。 这包括每 90 天轮换一次密钥,在轮换前 14 天宣布新密钥,轮换后将旧密钥保留 14 天,然后在 14 天的期限结束时将其删除。

如果要从旧版本升级到 2.2510,默认情况下会禁用自动证书轮换。要启用自动密钥管理,请运行以下命令:

uipathctl config token-signing-certificates automatic-key-management enable
uipathctl config token-signing-certificates automatic-key-management enable
重要提示:

启用自动证书轮换可能会导致长达一小时的停机。

默认情况下,为全新 Automation Suite 安装启用证书自动轮换。要禁用自动密钥管理,请运行以下命令:

uipathctl config token-signing-certificates automatic-key-management disable
uipathctl config token-signing-certificates automatic-key-management disable

如果禁用了自动管理功能,则需要手动更新和轮换签名证书。有关手动密钥管理的详细信息,请参阅有关手动更新和轮换证书的文档。

手动更新证书​

备注:

以下命令不会替换现有令牌签名证书。

确保您提供的证书为.pem格式。server.crt文件必须包含整个链,如以下示例所示:

-----server cert-----
-----root ca chain-----
-----server cert-----
-----root ca chain-----

要上传新证书以对令牌进行签名,请运行以下命令:

uipathctl config token-signing-certificates update --cert server.crt --key server.key
uipathctl config token-signing-certificates update --cert server.crt --key server.key

运行更新命令后,重新启动身份部署,并等待 48 小时后再运行轮换命令。

手动轮换证书​

要轮换旧证书或将其替换为新证书,请运行以下命令:

uipathctl config token-signing-certificates rotate
uipathctl config token-signing-certificates rotate

轮换后,通过运行以下命令重新启动部署和状态集:

kubectl -n <uipath> rollout restart deploy
kubectl -n <uipath> rollout restart sts
kubectl -n <uipath> rollout restart deploy
kubectl -n <uipath> rollout restart sts

访问证书​

要下载当前的令牌签名证书,请运行以下命令:

uipathctl config token-signing-certificates get
uipathctl config token-signing-certificates get
备注:

证书更新和轮换之间应有大约 24 到 48 小时的前置时间。

我们需要这个提前期来继续支持由旧证书签名的缓存令牌的身份验证。

在缓存令牌过期之前过早轮换证书可能会导致停机。 在这种情况下,您可能必须重新启动所有机器人。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新