Workflow Definitions

The workflowClosed A workflow is a series of steps necessary to complete a process. In Keyfactor Command, it refers to the workflow builder, which allows you to automate event-driven tasks such as when a certificate is requested, revoked or found in a certificate store. builder in Keyfactor Command provides a flexible framework for automating and coordinating certificate-related operations. Workflows are triggered by defined events and guide processing through a series of configurable steps that determine how an action is handled from start to completion.

Workflows can respond to user-initiated actions, automated system activity, or scheduled evaluations. Depending on how a workflow is configured, steps can incorporate approvals, notifications, scripts, integrations, and conditional logic to support end-to-end automation across the environment.

Workflow definitions determine when a workflow runs and how it is scoped, while workflow steps define the actions performed as the workflow executes. Together, these components allow workflows to adapt to a wide range of operational scenarios without requiring custom development.

Tip:  Where to find this in the Management Portal:
Workflow → Definitions

See Certificate Collection Management for more information about creating certificate collections.

Workflow Types

The following types of workflow triggering events are supported:

  • Certificate Entered Collection

    Initiates a workflow instance when a certificate is identified that newly meets the query criteria of a certificate collection. For example, when a certificate discovered on an SSLClosed TLS (Transport Layer Security) and its predecessor SSL (Secure Sockets Layer) are protocols for establishing authenticated and encrypted links between networked computers. scan becomes part of the Weak Keys collection, an email message can be generated notifying the PKIClosed A public key infrastructure (PKI) is a set of roles, policies, and procedures needed to create, manage, distribute, use, store and revoke digital certificates and manage public-key encryption. administrators that a new certificate with a weak key has been discovered.

    The workflow is initiated by two automated tasks that Keyfactor Command runs periodically. The first runs against your collections to identify certificates that newly meet the query criteria of each certificate collection. Certificates are added to a temporary table from which workflows of this type draw. Certificates are added for all collections regardless of whether they have active workflows. The second reads the temporary table and generates workflow instances for any active workflows of this type. The temporary table is cleared each time the first task runs.

    Each of these tasks runs every 10 minutes by default and the schedules for them are not end-user configurable.

    If the task has run to create the temporary table of certificates that newly meet the query criteria of the specified certificate collection but a workflow has not yet run for the given collection—perhaps it is disabled or has not yet been created—there is a window of time (until the temporary table is cleared) during which if a workflow is created or enabled for the certificate collection, the user creating or enabling the workflow will receive a warning message indicating that the workflow will run multiple times and asking the user for confirmation to continue. The user must enter RUN followed by the number of workflow instances that will be initiated to continue.

    Figure 187: Warning on Save for Certificate Entered or Left Collection Workflow

  • Certificate Left Collection

    Initiates a workflow instance when a certificate is identified that no longer meet the query criteria of the specified certificate collection. For example, when a certificate in the Web Server Certificates collection disappears, a REST request can be made to open a support ticket request to investigate the removal of a web server certificate.

    The workflow is initiated by two automated tasks that Keyfactor Command runs periodically. The first runs against your collections to identify certificates that no longer meet the query criteria of each certificate collection. Certificates are added to a temporary table from which workflows of this type draw. Certificates are added for all collections regardless of whether they have active workflows. The second reads the temporary table and generates workflow instances for any active workflows of this type. The temporary table is cleared each time the first task runs.

    Each of these tasks runs every 10 minutes by default and the schedules for them are not end-user configurable.

    If the task has run to create the temporary table of certificates that no longer meet the query criteria of the specified certificate collection but a workflow has not yet run for the given collection—perhaps it is disabled or has not yet been created—there is a window of time (until the temporary table is cleared) during which if a workflow is created or enabled for the certificate collection, the user creating or enabling the workflow will receive a warning message indicating that the workflow will run multiple times and asking the user for confirmation to continue. The user must enter RUN followed by the number of workflow instances that will be initiated to continue.

  • Certificate Entered Store

    Initiates a workflow instance when a certificate has been added to or has entered a certificate store for the specified certificate store type. For example, when a certificate appears in a trusted certificate store, a REST request can be made to check the support ticketing system for a change request, and the workflow can then generate an email message notifying the PKI administrators that a new certificate has appeared in a trusted store if a change request is not found.

    The workflow is initiated by two automated tasks that Keyfactor Command runs periodically. The first runs against your certificate store types to identify certificates that have been added to or have entered a certificate store for the specified certificate store type. Certificates are added to a temporary table from which workflows of this type draw. The second reads the temporary table and generates workflow instances for any active workflows of this type. The temporary table is cleared each time the first task runs. Included in the workflow information are the certificate ID, certificate store ID, and certificate store container ID. If the certificate store is not associated with an application, the value will be -1.

    Each of these tasks runs every 10 minutes by default and the schedules for them are not end-user configurable.

  • Certificate Left Store

    Initiates a workflow instance when a certificate has been removed from or has left a certificate store for the specified certificate store type. For example, when a certificate on your F5 device disappears, a REST request can be made to open a support ticket request to investigate the removal of a certificate from the device.

    The workflow is initiated by two automated tasks that Keyfactor Command runs periodically. The first runs against your certificate store types to identify certificates that have been removed from or have left a certificate store for the specified certificate store type. Certificates are added to a temporary table from which workflows of this type draw. The second reads the temporary table and generates workflow instances for any active workflows of this type. The temporary table is cleared each time the first task runs. Included in the workflow information are the certificate ID, certificate store ID, and certificate store container ID. If the certificate store is not associated with an application, the value will be -1.

    Each of these tasks runs every 10 minutes by default and the schedules for them are not end-user configurable.

  • Enrollment (Including Renewals)

    The workflow is initiated by enrollmentClosed Certificate enrollment refers to the process by which a user requests a digital certificate. The user must submit the request to a certificate authority (CA). for a new or renewed certificate. Steps during the workflow can be used to do things such as require manager approval for the enrollment or manipulate the subject and/or SANs for the certificate request.

    Note:  An enrollment workflow is considered complete when the certificate reaches a state of Active (issued), Failed (denied approval in workflow or error at the CAClosed A certificate authority (CA) is an entity that issues digital certificates. Within Keyfactor Command, a CA may be a Microsoft CA or a Keyfactor gateway to a cloud-based or remote CA. level), Pending, or Waiting for External Validation. The workflow does not wait for external approvals before completing.
  • Expiration

    The workflow is initiated by an expiration alert. Steps during the workflow can be used to do things such as send an email notification regarding expiring certificates, run a PowerShell script to write notifications to the event log, or automate renewal of certificates.

  • Key Rotation

    The workflow is initiated by an SSHClosed The SSH (secure shell) protocol provides for secure connections between computers. It provides several options for authentication, including public key, and protects the communications with strong encryption. key rotation alert. Steps during the workflow can be used to do things such as send an email notification regarding SSH keys that are approaching their stale date or run a PowerShell script to write notifications to the event log.

  • Revocation

    The workflow is initiated by revoking a certificate. Steps during the workflow can be configured to do things such as modify the revocation comment entered when the certificate is revoked, append an additional comment, and store the resulting extended comment in a metadataClosed Metadata provides information about a piece of data. It is used to summarize basic information about data, which can make working with the data easier. In Keyfactor Command, the certificate metadata feature allows you to create custom metadata fields that allow you to tag certificates with tracking information about certificates. field.

  • Revocation Monitoring

    The workflow is initiated by a revocation monitoring alert. Steps during the workflow can be used to do things such as send an email notification regarding CRLs that are expiring or OCSP endpoints that are unreachable or run a PowerShell script to write notifications to the event log.

Workflow Steps

The following built-in workflow steps are available within the workflows:

In addition to these customizable types of built-in steps, there are built-in step that you won't see unless you're using the Keyfactor API to view or edit the workflows (see Workflow Definitions). These NOOP steps indicate the start and end of the workflow for housekeeping purposes.

Workflow also supports the addition of fully custom steps that can be created if the built-in steps do not meet your needs. For more information, check with your Keyfactor Customer Success Manager or visit the Keyfactor Support Portal(opens page in a new tab) to open a support ticket. To register a custom workflow step, see Keyfactor Command Custom Workflow Steps.

There are two types of workflow definition:

  • Global

    The global workflow definitions are built into the product and cannot be deleted, though they can be modified to add workflow steps, if desired. Global workflow definitions do not have a specific associated key and apply to all requests of the workflow's type (e.g., enrollment) that are not otherwise handled by a custom workflow specifying a key.

  • Custom

    Custom workflow definitions are any additional workflow definitions you define beyond the built-in ones. Custom workflows are associated with a specific key and each workflow only applies to requests made using that key. The key varies depending on the type of workflow. For example:

    • Enrollment workflows use the certificate template as the key with an optional second level key of the enrollment pattern.
    • Certificate entered and left collection workflows use the certificate collection as the key.
    • Certificate entered or left certificate store workflows use the certificate store type as the first level key with an optional second level key of the certificate store container.
Note:  All certificate enrollment, renewal, and revocation requests go through workflow even if you haven't created any workflow steps or added any custom workflow definitions. In the absence of customization, the global workflow definitions are used. The addition and removal of certificates from certificate stores and collections and alerts only go through workflow if you create custom workflows for them.

Figure 188: Workflow Definitions

When requiring approval for enrollment using workflow definitions in Keyfactor Command, templates should not be configured to require manager approval at the CA level in the certificate template. This is because the approval handling is fully controlled within Keyfactor Command. Configuring templates to require CA manager approval at the CA level when using a Keyfactor Command workflow require approval step would require approval both at the Keyfactor Command level and at the CA level, which can lead to unexpected behavior.

Tip:  Click the help icon () next to the Workflow Definitions page title to open the Keyfactor Software & Documentation Portal to this section. You will receive a prompt indicating:

You are being redirected to an external website ‘software.keyfactor.com'. Would you like to proceed?

You can also find Help in the NavigatorClosed The Navigator is the Keyfactor Command left-hand (newer versions) or top (older versions) navigation menu. Certificate collections and reports can be configured to be added to the menu using user-defined Show in Navigator settings.. From here you can choose to open either the Keyfactor Software & Documentation Portal at the home page or the Keyfactor API Endpoint Utility.

Keyfactor provides two sets of documentation: the On-Premises Documentation Suite and the Managed Services Documentation Suite. Which documentation set is accessed is determined by the Application Settings: On-Prem Documentation setting (see Application Settings: Console Tab).