为托管自动化设置自定义应用程序
CertCentral 托管自动化支持常用的开箱即用的 web 服务器应用程序。
CertCentral 还允许使用“自定义应用程序”选项配置第三方 ACME 客户端,从而为其他不受本机支持的应用程序灵活地扩展证书管理。
要为自定义应用程序启用托管自动化,请执行以下步骤:
Custom automations require an active DigiCert agent on the server. The agent:
Coordinates each automation request sent through Trust Lifecycle Manager, including details about the requested certificate type and properties.
Invokes your custom shell script on the server to complete the request and install the certificate for your application.
For detailed instructions about how to install and activate DigiCert agents on your servers, see Deploy and manage agents.
In addition to a DigiCert agent, the server must have the Certbot ACME client installed.
Your custom shell script invokes Certbot to complete each request and install the resulting certificate for your custom Linux or Windows application.
For detailed instructions about how to download and install the Certbot client, refer to the official Certbot instructions.
You need a shell script to help manage the certificates for your custom application.
The shell script contains the Certbot command to request and install certificates for your application via the Trust Lifecycle Manager ACME service. Below are example shell scripts for Linux and Windows.
Example scripts
Usage notes
Variable definitions at the top of these shell scripts set the required ACME request parameters:
These must match up with the ACME arguments you configure for the custom application in Trust Lifecycle Manager (see below).
During an automation event, values for these arguments are supplied to the shell script by the local DigiCert agent.
Commands used in the shell script:
Must include all mandatory parameters.
Must not exceed 512 characters.
Must not include special directives like
rm -rf
orrmdir
The shell script filename:
Must end with
.sh
or.bat
.Must not exceed 255 characters.
使用 CertCentral 管理自动化菜单完成自定义应用程序的配置:
在 CertCentral 的左侧主菜单中,转到自动化 > 管理自动化。
From the More actions dropdown at top, select Add script.
Fill out the Add script form:
Name: Enter a user-friendly name to use when referencing the script.
Operating system: Select the applicable operating system (Linux or Windows).
Script type: Select Custom automation.
Script filename: Enter the script's filename in or path relative to the local agent's user-scripts sub-directory.
Linux: If your script is named "myscript.sh" and is stored directly in the agent's user-scripts sub-directory, enter myscript.sh here. If you stored the script within an additional sub-directory called "custom-apps" in the user-scripts sub-directory, enter custom-apps/myscript.sh instead.
Windows: If your script is named "myscript.bat" and is stored directly in the agent's user-scripts folder, enter myscript.bat here. If you stored the script within an additional sub-folder called "custom-apps" in the user-scripts 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.
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 密钥。
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.
在管理自动化视图中,选择与自定义应用程序在同一证书主机上运行的本地 ACME 代理的名称。
To complete the custom automation configuration, assign the script to any DigiCert agents that will coordinate certificate lifecycle automation events for the custom application:
From the Trust Lifecycle Manager main menu, select Discovery & automation tools > Agents.
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.
Select the pencil (edit) icon on the right of the agent details page to update the agent configuration.
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.
Select the Update button at bottom to save your changes.
What's next
After enabling managed automation for your custom application, you can manage certificate deployments for it as you would any other server application in Trust Lifecycle Manager.
When you need a new certificate for your custom application:
You submit the request through the Trust Lifecycle Manager web console or REST API.
The DigiCert agent on the local system processes the certificate request and invokes your custom shell script with the required parameters.
Your custom shell script invokes the Certbot ACME client to complete the request and install the new certificate for your application.