About hash tables for Adaptable Application

Data is passed to (and returned by) each function using hash table data structures.

A general hash table, which includes a common set of data, is passed to all of the functions. A specific hash table, which includes data that is applicable specifically to the function, is passed to functions that require additional data. All functions must return a single hash table that includes a result along with any other variables that the function is required to return.

Consider the following guidelines and expected behaviors:

  • Functions must not return errors; rather, they must throw exceptions in the same way that actual PowerShell errors do. The Adaptable CredentialAdaptable Application driver Adaptable SSH Key Discovery feature treats exceptions thrown by a PowerShell function as a fatal error and then halts processing.
  • Thrown exceptions are handled as unexpected. If there is an error, we recommended you use Result="Failure" and pass the error description in the Error="" parameter.
  • All functions (except where noted) must be present in the script, but they are optional from a logic standpoint.
  • In the function references that follow, the following two functions are listed as not being required: GetConfigPath, and CleanUP. This means they are optional to implement. However, they should still be present in the script, and should return Result="Success" even with empty result data.
  • The Generate-Keystore, Generate-KeyPair, and Generate-CSR functions should only be implemented if the target platform is to support remote generation of keys and CSR. The absence of any of these three functions will be interpreted by the driver as lack of support.
  • The Generate-Keystore, Generate-KeyPair, Generate-CSR, Update-Binding, Activate-Certificate, Install-Chain, Install-Certificate, and Install-PrivateKey functions can return "ResumeLater" to indicate the stage should be re-processed at a later time.

    ResumeLater might be used when the endpoint to which the certificate is being installed takes longer to process the configuration or installation step then TLS protect allows for execution timeout

Related Topics Link IconRelated Topics