Creating new data fields for Adaptable Flow

The Adaptable Flow configuration provides a common set of variables you would need for Flows.. However, if you need to pass unique or additional data to your script or third-party applicationPowerShell script, you can define up to twelve additional text fields. You do this by simply modifying the Begin Field Definitions section of the Adaptable Flow PowerShell script.

Field definitions in the PowerShell script header are reflected on the Adaptable Flow application device pages in Trust Protection Platform

For Adaptable SSH Key Discovery in 22.4, these script field definitions were left out, so this whole topic is unnecessary. However, since I already did the work to customize the conditions, I'm leaving it in case they add this feature later.-Paul,Dec2022.

NOTE  About macros:  It's important to note that the Service Address field does not accept macros. You must use a custom field instead. Please be aware that certain macros are designed to function exclusively within workflows. Use the Macro Evaluator along with sample data to help you understand how macros will be processed for your use case.

Each field definition has three parts:

Field Name|Field Label|Flags

  1. Field Name: Must be Text1 through Text12. Do not modify these values.
  2. Field Label: Type the name that you want to appear on the Adaptable Flow application object settings page.
  3. Flags: Using the numeric values of 0 (to mean false) or 1 (to mean true) for each of the following options (in order):
    • Enabled: Use to enable or disable a field.
    • Mandatory: Use to indicate whether the field must be completed, or is optional. When set to true, this option adds an asterisk (*) next to the field label to let the user know that it is a required field.

EXAMPLE  Suppose you have custom folders with an organizational unit on the device, and you want to pass the organizational unit without hard-coding it into your PowerShell script, and you want this field to be required. Using a text (or PowerShell script) editor, you would open your PowerShell script file (which must be in the drive:\Program Files\Venafi\Scripts\AdaptableSSHManagement\ folder). You would then edit the field definitions in the header section to include a new field labeled <field name> and set values for the available flags:

----------BEGIN FIELD DEFINITIONS--------

 

Text1|Organizational Unit|11

Text2|Text2|00

Text3|Text3|00

Text4|Text4|00

Text5|Text5|00

Text6|Text6|00

Text7|Text7|00

Text8|Text8|00

Text9|Text9|00

Text10|Text10|00

Text11|Text11|00

Text12|Text12|00

When you are finished, you save your changes to the PowerShell script. When you open Policy Tree, your new fields appear on the Adaptable Flow objects.

IMPORTANT  The header is required! The Powershell script will not work if the following header information is removed:

---- BEGIN FIELD DEFINITIONS ----

EXAMPLE  Suppose you have custom folders with an organizational unit on the device, and you want to pass the organizational unit without hard-coding it into your PowerShell script, and you want this field to be required. Using a text (or PowerShell script) editor, you would open your PowerShell script file (which must be in the drive:\Program Files\Venafi\Scripts\AdaptableSSHManagement\ folder). You would then edit the field definitions in the header section to include a new field labeled <field name> and set values for the available flags:

----------BEGIN FIELD DEFINITIONS--------

 

Text1|Organizational Unit|11

Text2|Text2|00

Text3|Text3|00

Text4|Text4|00

Text5|Text5|00

Text6|Text6|00

Text7|Text7|00

Text8|Text8|00

Text9|Text9|00

Text10|Text10|00

Text11|Text11|00

Text12|Text12|00

When you are finished, you save your changes to the PowerShell script. When you open Policy Tree, your new fields appear on the Adaptable Flow objects.

To create (or edit) Adaptable Flow data fields

  1. Open your Adaptable Flow  PowerShell file using a text (or PowerShell script) editor.

    Adaptable Flow  PowerShell script files must be stored in the \Venafi\Scripts\AdaptableSSHCertificateIssuanceFlow\\Venafi\Scripts\AdaptableSSHManagement\ folder.

  2. Locate the Begin Field Definitions section and determine where you want to place your new field.
  3. On the line where you want to define your new field, type the new field label and then set the appropriate flags.

    For example:

    Text1|Minimum Key Size|11

    Text1|Organizational Unit|11

  4. When you are finished, save the file and close it.

Your new field should appear on the Adaptable Flow object page in Policy Tree.

What's Next?

Now that you have configured your PowerShell script, you can create the Adaptable Flow object in Policy Tree. See Creating an Adaptable Flow.