Skip to content

Modular certificate workflows

For a practical walkthrough of labels, references, conditions, Tomcat/P12 delivery, and backups, see Agent workflow usage.

This reference describes the modular workflows in Agent 1.3.70 and later. A modular workflow controls what happens after the Agent has issued or renewed a certificate: export it, update an application, and check the result. The certificate's ACME account, names, key type, delegation, renewal schedule, and revocation state remain part of its certificate policy.

On Windows, use Workflows → + New certificate workflow to choose a template, start from scratch, or import a JSON definition. Configure it in Workflow studio, then continue to certificate setup. For an existing certificate, choose Edit workflow… → Edit workflow settings and steps…. The studio has Setup, Steps, Review, and Advanced tabs; see the illustrated walkthrough.

A certificate uses either its selected modular workflow or its compatible storage/installation plans. Choose modular template… switches a certificate from plans to a workflow while retaining the old plan definitions and installed files. Bundled templates cannot be edited in place. Local workflow JSON can be exported/imported as independent copies. Templates are compiled into the Agent and come with its signed release: there are no template packages to download, and an Agent 1.5.0 template that talks to an appliance (see Appliance deployment) is still a bundled template that runs on the Agent machine. On Linux, the terminal interface (sudo certintel tui, Agent 1.3.77+) creates and edits workflows with guided types: save files (PEM, CRT + KEY, PFX, P12, DER, P7B or JKS), NGINX, Apache httpd and Tomcat, and (Agent 1.5.0+) the Linux service targets HAProxy, Caddy, Traefik, LiteSpeed, Postfix, Dovecot, PostgreSQL and MySQL, each optionally followed by a post-renewal script run through hook.run. Agent 1.5.0 and later also create a workflow from any bundled template that runs on the machine with T on the Workflows screen (New workflow from a template), and w/e on a template-based workflow edit only its fields, never its steps (This workflow comes from the bundled template … Only its fields are edited here; its steps stay as they are.). Windows-only templates are never offered there. For scripted setups use the CLI's versioned configuration transaction: config get --json, validate --file, then config apply --file, preserving the current revision when applying a proposal; Agent 1.3.93 and later also offer certintel workflows create, which clones a bundled template and adds the certificate in one command (see the command-line example).

Bundled template setup fields

Fields marked * are required in the template setup form. output_password is stored as an Agent protected secret, outside the workflow JSON. Template file paths refer to the local Agent machine. The Windows editor offers to detect keytool and to select an installed IIS site, and (Agent 1.5.0+) to pre-fill a template from the servers it finds on the machine (see Server detection).

Template Platform Setup fields
Windows machine certificate store Windows store_name (My or WebHosting, default My), exportable (default false), remove_old_certificate (Remove previous certificate after confirmation, default false), cleanup_acknowledges_other_consumers (No other application uses the previous certificate*, default false)
Protected PEM files Windows, Linux directory, name (default certificate), output_password*
PKCS#12 / PFX Windows, Linux directory, name (default certificate), output_password*
PKCS#12 (.p12) Windows, Linux directory, name (default certificate), output_password*
Java KeyStore Windows, Linux directory, name (default server), keytool, alias (default server), output_password*
IIS HTTPS binding Windows store_name (My or WebHosting, default WebHosting), site (IIS site (name or ID); Agent 1.3.92 and earlier: numeric site_id), host, port (default 443), sni (Bind by hostname (SNI), default true from Agent 1.3.93, false earlier), replace_shared_binding (Replace a shared IP:port binding*, default false, Agent 1.3.93 and later), remove_old_certificate (default false), cleanup_acknowledges_other_consumers (default false; not normally needed because the post-binding endpoint check supplies activation evidence). See SNI.
Windows service + PFX Windows directory, name (default certificate), service, host, port (default 443), output_password
NGINX + PEM Linux directory, name (default certificate), service, host, port (default 443), output_password
Apache + PEM Windows, Linux directory, name (default certificate), service, host, port (default 443), output_password
Tomcat + PKCS#12 (.p12) Windows, Linux directory, name (default certificate), service, host, port (default 443), output_password
Tomcat + JKS Windows, Linux directory, name (default certificate), service, host, port (default 443), output_password, keytool, alias (default server)

service is the exact Windows service name or systemd unit. host and port identify the endpoint to verify after installation. The IIS template creates a binding on the selected site and verifies that it serves the new thumbprint. The Windows store and IIS templates end with Remove previous certificate from Windows store, which runs only when Remove previous certificate after confirmation is on. It rechecks the replacement and removes the renewal's recorded predecessor when the IIS template's post-binding endpoint comparison matched, or (machine-store template) when No other application uses the previous certificate is also on, and no IIS HTTPS binding, HTTP.sys SSL binding or Remote Desktop listener still references it. Otherwise the predecessor is retained and the step reports why. See Windows store verification. The service templates' first "inspect the current endpoint" step runs only when a previous certificate exists (${certificate.previousThumbprint}), so first issuance on an endpoint that is not yet serving TLS does not fail. The JKS templates import an Agent owned key into the keystore. Use the JKS CSR plan when the private key must be created inside that keystore.

Templates added in Agent 1.5.0

Agent 1.5.0 adds three groups of bundled templates (each version 1.0.0, minimum Agent 1.5.0). Their fields are listed on their own pages:

Group (category) Templates Platform Page
Appliances (remote) (appliance) f5-bigip, fortigate, paloalto-panos, netscaler-adc, sonicwall Windows, Linux Appliance deployment - tested against simulated APIs, not real devices
Microsoft services (microsoft-services) exchange, exchange-hybrid, rd-gateway, rdp-listener, rds-deployment, rras-sstp, rras-ikev2, directaccess-iphttps, sql-server, ssrs, adfs, adfs-wap, nps, winrm-https Windows Microsoft services - not verified on a live server
Linux services (linux-services) haproxy-standard, caddy-standard, traefik-standard, litespeed-standard, postfix-standard, dovecot-standard, postgresql-standard, mysql-standard Linux Linux service targets - each needs its root starter hook

The Windows desktop app groups templates by category: Appliances (remote) and Microsoft services join Certificate stores and files, Java and Tomcat keystores and Web servers and services (older templates have no category). The Linux service templates are meant for dashboard assignments; on the machine itself the terminal interface's guided types do the same job.

Template field types

Each template field has a type. Agent 1.5.0 adds choice and credential:

Type Value
string, integer, boolean, path Text, a whole number, on/off, an absolute path on the Agent machine.
secret A protected value stored outside the workflow JSON (certintel secret set workflow); never offered in a dashboard assignment, where the Agent generates it.
choice (Agent 1.5.0+) One of at most 16 listed values (field … must be one of …).
credential (Agent 1.5.0+) Where an appliance credential comes from - local (set on the machine with certintel secret set remote WORKFLOW-ID:FIELD) or platform:<id> (a platform credential, only in a workflow a dashboard assignment created) - never the credential itself (field … must be local or platform:<credential id>, never the credential itself). Its kind is username-password or api-token.

A field marked local only (Agent 1.5.0+, shown with (this computer only), for example Accept any management certificate (not recommended)) can be set only on the Agent machine: it is not reported to CertIntel and is refused in an assignment (field … is set only by a local administrator on this agent and cannot be assigned). Field rules (Agent 1.4.1+: file-name, keystore-name, keystore-alias, absolute-path) gain host-name (a DNS name or IP address without scheme, port or path) and sha256-hex (64 hexadecimal digits without colons) in Agent 1.5.0.

Workflow document fields

The editor manages the following versioned workflows[] document. Use these same JSON names when applying a configuration with the CLI.

Field Meaning
schema_version Required; currently 1.
id Required stable local ID: lowercase letter/digit first, then lowercase letters, digits, _ or -, at most 64 characters.
name, description Required display name (up to 200 characters); optional description (up to 2,000).
version Required positive document version; the editor increments it on save.
platforms Optional array of windows and/or linux; the current Agent OS must be included when set.
variables Optional object of values referenced as ${variables.name}; at most 128 entries.
secret_refs Optional list of protected secret names; at most 64. A secret is set separately and referenced as ${secrets.name}.
template Optional provenance object with id and version for a cloned template.
vendor_managed Catalog marker; saved user workflows set this to false.
steps Required ordered array of 1–128 steps. Each step's id must be unique.
deployment_window Optional (Agent 1.4.0+): the weekly window in which a renewed certificate of this workflow is installed, replacing the Agent default. See Deployment windows.
report_step_output Optional (Agent 1.4.0+): false stops sending the redacted end of a failed step's output for this workflow; omitted inherits the Agent setting (on by default). See Reporting failed step output.

Each steps[] item accepts id, optional name, action, positive action_version (currently 1 for every built-in action), optional with input object (up to 128 keys), optional when condition, optional failure policy, and optional timeout_seconds. The default timeout is 300 seconds per attempt; the range is 1–3,600 when set. failure accepts mode (fail, continue, or rollback), retries (0–10), retry_delay_seconds (0–600), and backoff (boolean). Continuing leaves a partially successful run. Rollback applies only to actions that advertise rollback support; a certificate export, IIS binding, store installation, JKS write, or service restart is not automatically undone. See the rollback limits before relying on file rollback to restore an overwritten destination.

when is an object with operator, left, and, where needed, right. Supported operators are equals, notEquals, exists, notExists, true, false, greaterThan, lessThan, contains, matches (regular expression), and certificateChanged. The editor offers true/false selection for earlier boolean results, a Compare a value form, and advanced JSON for the full set. For example:

{"operator":"false","left":"${steps.check_directory.exists}"}

References may use ${workflow.id}, ${workflow.name}, ${workflow.version}, ${variables.name}, ${secrets.name}, ${steps.STEP_ID.OUTPUT}, ${certificate.thumbprint}, ${renewal.id}, and ${system.os}, ${system.arch}, ${system.date}, ${system.dateCompact}, ${system.timestamp}, or ${system.timestampUtc}. The system dates are UTC; dateCompact is YYYYMMDD and timestamp is YYYYMMDD-HHMMSS. Certificate values also include previousThumbprint (empty on first issuance), subject, issuer, serial, notBefore, notAfter, domains, and generation. A step may refer only to outputs of earlier steps.

Reference rules the validator enforces

  • An input name that the action does not declare is rejected (step "x" action "y" has unknown input "z").
  • A secret reference must be the entire input value and may appear only in inputs marked sensitive: password inputs and the environment map of process.execute. Secrets are never allowed in when conditions or in process.execute.arguments.
  • Runtime-derived references (${steps.*}, ${certificate.*}, ${renewal.*}, ${system.*}) may not be used to build a target: any input of an action that changes state (export, write, install, copy, delete, restart, run a program) or a path, URL, host, port, service, store, site or name input of a read-only action. Variables and literals are fine there. The exceptions are certificate.compare (public certificate facts), windows_cert_store.cleanup.confirmed and activation_confirmed fed by a certificate.compare result, and file.backup.filename, which may use exactly ${system.dateCompact} or ${system.timestamp}.

Step action inputs

The following are all built-in version 1 action inputs. * means the input is required. Optional values are omitted unless needed. Use an absolute path for every path, directory, source, destination, executable, working_directory, and keytool input. These actions execute locally under the Agent service identity; remote.deploy also runs on the Agent machine, but its target is an appliance's management API.

Action Platform with inputs
acme.obtain_certificate Both None; exposes the already issued certificate artifact and public facts (thumbprint, renewalId, …) to later steps.
certificate.export Both format (pem, crtkey, pfx, p12, p7b, der, centralssl), directory, name, password, backup_directory, unencrypted_key (boolean, Agent 1.3.77+). password is required for pem, crtkey, pfx, p12 and centralssl and unused for der and p7b. unencrypted_key: true is accepted only for pem and crtkey, writes a plain PKCS#8 key as an owner-only file for applications that cannot read an encrypted key, and must not be combined with password (remove the password input when unencrypted_key is true); keys stay encrypted by default and the setting is reviewed as a delivery change. Agents after 1.3.71 reject an unknown literal format, a missing password for those formats, a relative directory or an invalid name at definition time (Validate with agent*, workflows preflight); earlier agents only fail when the step runs. Since 1.3.77 the name rule is also checked when the workflow is saved, with the template's own variable values. The rule is letters, digits, ., - and _ (up to 64, starting with a letter or digit, not ending with .), without an extension the Agent adds (.pem, .pfx, ...) or a Windows device name such as CON before the first dot, in Agent releases after 1.4.0; 1.4.0 and earlier accept only lowercase letters, digits, - and _. A ${variables.…} format is checked when the workflow runs.
keystore.jks.write Both directory, name, keytool, alias, password*. keytool must be an absolute path and alias a simple lowercase alias (letters, digits, _, -). Agents after 1.3.71 reject missing inputs and literal values that would fail at run time at definition time; on 1.3.71 and earlier, definition validation requires only directory and name and the rest fails when the step runs. ${variables.…} and ${secrets.…} references are checked at run time. A legacy format: "jks" input is accepted and ignored.
windows_cert_store.install Windows store_name* (My or WebHosting), exportable (default false), read_principals (Agent 1.5.0+: up to 16 Windows account names such as NT SERVICE\MSSQLSERVER or NT AUTHORITY\NETWORK SERVICE that get read access to the private key).
windows_cert_store.verify Windows store_name*. Verifies the issued certificate and usable private key in this store; outputs thumbprint.
windows_cert_store.cleanup Windows store_name, confirmed (boolean, normally ${steps.confirm.matches}), activation_confirmed (boolean; the IIS template passes its post-binding endpoint comparison), acknowledged (boolean; normally ${variables.cleanup_acknowledges_other_consumers}). Removes only this renewal's recorded predecessor when confirmed and either activation evidence or the acknowledgement is true and no IIS, HTTP.sys or Remote Desktop consumer still references it. Outputs completed, retained, removed, no_previous and reason (acknowledgement_required or in_use); a retained predecessor reports completed: false even though the step succeeds. No rollback.
iis.bind_certificate Windows store_name, site (name or ID, Agent 1.3.93 and later) or site_id (integer) - one of them is required, host, port (default 443), ip (default *), sni (default false), create_binding (default false), replace_shared_binding (default false, Agent 1.3.93 and later: acknowledge replacing the certificate of every site and HTTP.sys application on a shared non-SNI ip:port; without it a shared binding is refused with the conflicting sites and applications named). Outputs include site and site_id.
certificate.inspect_endpoint Both host*, port (default 443). Outputs include thumbprint, sha256, subject, issuer, sans, notBefore, notAfter, daysRemaining, trusted.
certificate.inspect_file Both path*, password, keytool, alias. Supply the protected password for PFX/JKS and keytool/alias for JKS.
certificate.compare Both expected_thumbprint, actual_thumbprint, old_not_after, new_not_after, expected_sans, actual_sans. Use a pair for the comparison(s) you want; SAN values are string arrays and expiration values are RFC 3339 times. Outputs matches.
service.status, service.start, service.stop, service.restart, service.reload Both service* (exact Windows service or systemd unit name).
process.execute Both executable*, arguments (string array), working_directory, environment (object), success_exit_codes (integer array; default [0]).
file.exists Both path*.
hook.run Linux script* (filename of a root-owned script in /etc/certintel/hooks.d), directory, name, format (pem, crtkey, der, pfx, p12, p7b, jks), unencrypted_key (boolean). Asks the root hook runner (certintel-agent-hooks.socket, enabled by the installers, Agent 1.3.77+) to run the named script; the Agent itself never runs anything as root and can only name a script root installed. directory/name/format/unencrypted_key describe the preceding save step so the runner can hand the script verified private copies of the files. The script receives CERTINTEL_HOOK, CERTINTEL_EVENT, CERTINTEL_CERTIFICATE_ID, CERTINTEL_WORKFLOW_ID, CERTINTEL_DOMAINS, CERTINTEL_PRIMARY_DOMAIN, CERTINTEL_THUMBPRINT, CERTINTEL_PREVIOUS_THUMBPRINT, CERTINTEL_SERIAL, CERTINTEL_SUBJECT, CERTINTEL_ISSUER, CERTINTEL_NOT_BEFORE, CERTINTEL_NOT_AFTER and, when an output is described, CERTINTEL_OUTPUT_DIR, CERTINTEL_OUTPUT_NAME, CERTINTEL_OUTPUT_FORMAT, CERTINTEL_KEY_ENCRYPTED, CERTINTEL_FILES_DIR and one CERTINTEL_<ROLE>_FILE per staged file. Outputs script, exitCode and output (the end of the script output; the full output is in journalctl -t certintel-agent-hooks). When the script fails, Agent 1.4.0 and later send the redacted end of its output with the failure report (failed step output). See Post-renewal scripts.
file.copy, file.move Both source, destination, overwrite (default false).
file.delete Both path*, missing_ok (default false).
file.backup Both source, directory, filename, mode (copy by default, or move).
directory.exists, directory.create Both path*.
tcp.check Both host, port.
http.check Both url* (http or https), expected_status (default 200), body_contains.
workflow.wait Both seconds* (0–600, still bounded by the step timeout).
remote.deploy Both Agent 1.5.0+. driver (f5-bigip, fortigate, paloalto-panos, netscaler-adc, sonicwall, or script for workflows created on the machine only), target ({"host", "port"}), tls ({"verify": "system"} by default, "pin" with pin_sha256, "ca" with ca_file; insecure_skip_verify only in workflows created on the machine), credential ({"source": "local" or "platform:<id>", "name", "kind"} - a reference, never the value), options (driver options; script: executable, arguments), certificate. Outputs remote_target, tls_verify, verified, fingerprint_sha256, bound. See Appliance deployment.
windows_service.bind Windows Agent 1.5.0+, elevated. service (one of the Microsoft service ids), thumbprint (${steps.<store install step>.thumbprint}; only the certificate this workflow issued), plus the service's options. Runs the service's fixed bundled PowerShell script with the parameters as data on standard input. Outputs previous_thumbprint, changed, restarted. Supports rollback: a later failed step binds the previous certificate again.

file.backup adds a UTC timestamp to its backup filename unless filename is specified. A custom filename is one filename, not a path; an existing backup is never overwritten. File actions operate on regular files, do not follow symlinks, and copy at most 64 MiB. process.execute launches the executable directly with an argument array; secrets are allowed in environment values, but not in arguments (the remote.deploy script driver instead passes its credential only on standard input, with a minimal environment). Its captured output (the last 16 KiB of each stream in Agent 1.4.0 and later; the first 64 KiB in earlier releases) is used for the step's success check and later steps of the same run, but is saved in job results as [redacted], because arbitrary programs may print secrets. When the step fails, Agent 1.4.0 and later send the end of each stream to CertIntel with the failure report, after replacing every secret the Agent knows of; that redaction is best effort, and report_step_output: false turns it off (see Reporting failed step output). http.check does not follow redirects, reads at most 64 KiB, and requires the expected status and, when supplied, body text to match. On Windows, service.reload stops and starts the named service; on Linux it uses systemctl reload.

Saved job results are bounded. A very large result is replaced by a summary with step outputs dropped and "diagnostics_truncated": true; the workflow is still recorded as completed and is not re-run.

For the current machine's exact field types, supported values, and action versions, inspect the local registry and template catalog:

certintel --json workflows capabilities
certintel --json workflows templates
certintel workflows preflight WORKFLOW-ID
certintel secret set workflow WORKFLOW-ID:SECRET-NAME

Preflight validates a saved workflow and checks what its actions can check without running its installation steps. Set a secret from an elevated local session; the CLI prompts without echoing it, and --stdin is available for protected automation. Execution history appears under Edit workflow… → Application steps, Jobs, and local Activity. Platform outages do not prevent local workflow execution; reports are queued for later delivery.