Skip to main content

为托管自动化设置自定义应用程序

CertCentral 托管自动化支持常用的开箱即用的 web 服务器应用程序。

CertCentral 还允许使用“自定义应用程序”选项配置第三方 ACME 客户端,从而为其他不受本机支持的应用程序灵活地扩展证书管理。

要为自定义应用程序启用托管自动化,请执行以下步骤:

  1. Deploy DigiCert agent

    Install and configure a DigiCert agent on the server system. The agent coordinates automation requests sent from Trust Lifecycle Manager.

  2. 设置第三方 ACME 客户端

    在证书主机上,安装并配置首选的第三方 ACME 客户端。

  3. 创建 shell 脚本

    在证书主机上,创建一个帮助脚本,CertCentral 可以使用该脚本调用第三方 ACME 客户端。

  4. Add script details in Trust Lifecycle Manager

    Configure the shell script details in Trust Lifecycle Manager so it knows how to find and execute the custom automation script.

  5. 配置托管自动化设置

    在 CertCentral 中,使用管理自动化菜单配置 shell 脚本以用于自定义应用程序。

Deploy DigiCert agent

Custom automations require that a DigiCert agent be installed and running on each server. The agent coordinates automation requests received from Trust Lifecycle Manager and calls your custom shell script to handle certificate lifecycle events for the custom application.

For detailed instructions about setting up a DigiCert agent, see Deploy and manage agents.

设置第三方 ACME 客户端

CertCentral 托管自动化可用于任何支持行业标准 ACME 协议的第三方客户端。

按照软件提供商的指南在证书主机上安装和配置首选的第三方 ACME 客户端。

创建 shell 脚本

CertCentral 需要使用证书主机上的 shell 脚本来调用第三方 ACME 客户端。在自动化事件期间,DigiCert 代理调用 shell 脚本来调用客户端,客户端进而获取并安装证书。

shell 脚本必须包含用于第三方 ACME 客户端的基本自动化命令。命令句法将根据所使用的第三方 ACME 客户端而有所不同。请查看软件供应商的指南以了解更多信息。

以下是用于通过第三方客户端 EFF Certbot (Linux) 和 Win-ACME (Windows) 获取 DigiCert 证书的 shell 脚本示例:

这些 shell 脚本顶部的变量定义读入所需的 ACME 参数:

  • 这些参数必须与您在 CertCentral 中为自定义应用程序配置的 ACME 参数相匹配。

  • 在自动化事件期间,这些参数的值由调用 shell 脚本的本地 DigiCert 自动化代理提供。

shell 脚本中使用的命令:

  • 必须包括所有强制参数。

  • 不得超过 512 个字符。

  • 不得包括 rm -rfrmdir 等特殊指令

shell 脚本文件名:

  • 必须以 .bat.sh 结尾

  • 不得超过 255 个字符。

配置托管自动化设置

使用 CertCentral 管理自动化菜单完成自定义应用程序的配置:

  1. 在 CertCentral 的左侧主菜单中,转到自动化 > 管理自动化

  2. From the More actions dropdown at top, select Add script.

  3. Fill out the Add script form:

    1. Name: Enter a user-friendly name to use when referencing the script.

    2. Operating system: Select the applicable operating system (Linux or Windows).

    3. Script type: Select Custom automation.

    4. Script filename: Enter the script's filename in or path relative to the local agent's packages sub-directory. The filename must start with ./ (Linux) or .\ (Windows) and cannot have any spaces in it. For example:

      • Linux: If your script is named "myscript.sh" and is stored directly in the agent's packages sub-directory, enter ./myscript.sh here. If you stored the script within an additional sub-directory called "custom-apps" in the packages sub-directory, enter ./custom-apps/myscript.sh instead.

      • Windows: If your script is named "myscript.bat" and is stored directly in the agent's packages folder, enter .\myscript.bat here. If you stored the script within an additional sub-folder called "custom-apps" in the packages folder, enter .\custom-apps\myscript.bat instead.

      警告

      Make sure there are no spaces in the filename for either Linux or Windows. The script will fail if the path or filename has spaces in it.

    5. Command-line arguments: Enter a space-separated list of general ACME parameters to use with your custom automation script.

      例如:

      {acmeDirectoryUrl} {hosts} {email} {key} {extActKid} {extActHmac}

      请注意:

      • 每个参数必须完全按照此处所示输入。

      • 参数的顺序必须与它们在 shell 脚本中的使用方式相匹配。

      • 在自动化事件期间,系统将自动从选定的自动化配置文件中获取这些参数所需的值。

      CertCentral 托管自动化支持的 ACME 参数说明:

      • {acmeDirectoryUrl} - ACME 目录 URL 设置。

      • {hosts} - 证书主机详细信息。

      • {email} - 接收通知的电子邮件地址。

      • {key} - 密钥算法(RSA 或 ECC)。

      • {extActKid} - URL 中使用的外部帐户密钥标识符。

      • {extActHmac} - 用于为响应签名的 HMAC 密钥。

    6. Description (optional): Enter an optional description for the script to help identify it when working with DigiCert agents and agent-based automations in Trust Lifecycle Manager.

  4. 管理自动化视图中,选择与自定义应用程序在同一证书主机上运行的本地 ACME 代理的名称

Assign script to the applicable agent IP/port targets

To complete the custom automation configuration, assign the script to any DigiCert agents that will coordinate certificate lifecycle automation events for the custom application:

  1. From the Trust Lifecycle Manager main menu, select Integrations > Agents.

  2. Locate the local DigiCert agents on the systems where the custom application is running. Select each agent by name to view the details for it.

  3. Select the pencil (edit) icon on the right of the agent details page to update the agent configuration.

  4. In the IP/port targets section for the agent, locate any IP/port targets where the custom application is running and configure them as follows:

    • Application: Select Custom.

    • Custom automation script: Select the custom automation script by the name assigned to it in Trust Lifecycle Manager.

  5. Select the Update button at bottom to save your changes.

What's next

After enabling managed automation for your custom application, you can schedule certificate lifeycle automation events for it as you would any other application in Trust Lifecycle Manager.