PGP Decrypt Stage
The PGP Decrypt stage allows messages to be PGP decrypted.
Stage Overview
The PGP Decrypt stage allows messages to be PGP decrypted.
Stage Definition File Location
All PGP Decrypt stages are defined by creating an appropriately formatted JSON definition file in the following location:
interfaces
{businessUnitCode}
{domainCode}
{integrationName}
pgp
decrypt
{STAGE_NAME}.json
Stage JSON Definition File Format
The JSON definition file for a PGP Decrypt stage is as follows:
{
"name": "stage-name",
"displayName": "Brief Stage Title",
"description": "Brief description of the stage.",
"enabled": "$env:STATUS_<INTEGRATION_NAME>",
"source": "source-event",
"publicKeySecretName": "$env:PGP_PUBLIC_KEY",
"privateKeySecretName": "$env:PGP_PRIVATE_KEY",
"passPhraseSecretName": "$env:PGP_PRIVATE_KEY_PASSPHRASE",
"preLogTransformSchemaFileName": "schemas/path/to/schema/schema-name.liquid",
"preLogTransformSchemaType": "liquid|javascript",
"preLogTransformFormat": "json|xml|csv"
}
| Property | Description |
|---|---|
name | The name of the stage. |
displayName | Optional (but highly recommended). A short (3 or 4 word) "display name" for the stage, used as a "title" of the stage in the Integration Hub Portal service's self-documentation capability. |
description | Optional (but highly recommended). A brief (10 to 15 word) description of the stage, used as a brief description of the stage's purpose in the Integration Hub Portal service's self-documentation capability. For a more detailed explanation (when needed), use the stage markdown feature. |
enabled | Optional boolean flag (true or false). Default is true. Generally set via a DevOps variable. Controls if the stage is deployed enabled or not. |
source | The source event that the stage subscribes to. See Pub/Sub Model. Alternatively, sources may be supplied, and an array of one or more source events can be subscribed to. |
publicKeySecretName | The PGP public key. An $env: token for an Azure DevOps variable, or a $kv: token for a Key Vault secret, that holds the key. See Stage Secrets.Currently, the PGP public key is not used, but is required for future support. Typically, the PGP public key will be the PGP public key of a remote service that is sending "you" messages, allowing the signature of these messages to be validated; this means the PGP public key will not typically match the PGP private key and passphrase below. The PGP public key needs to be Base64 encoded. |
privateKeySecretName | The PGP private key. An $env: token for an Azure DevOps variable, or a $kv: token for a Key Vault secret, that holds the key.The PGP private key (and passphrase below) will be used to decrypt the encrypted payload. Typically, the PGP private key will be "your" PGP private key (and passphrase below), so that encrypted messages sent to "you" by a remote service can use "your" PGP public key to encrypt the messages to "you" before sending them, so that no one other than "you" can decrypt the messages; this means the PGP private key (and passphrase below) will not typically match the PGP public key above. The PGP private key needs to be Base64 encoded. |
passPhraseSecretName | The PGP private key passphrase. An $env: token for an Azure DevOps variable, or a $kv: token for a Key Vault secret, that holds the passphrase.The PGP key passphrase must be the correct passphrase for the PGP private key (above). The PGP private key passphrase needs to be Base64 encoded. |
Pre-Logging Transformation
This stage supports the optional pre-logging transformation feature using the following fields:
preLogTransformSchemaFileNamepreLogTransformSchemaTypepreLogTransformFormat
See the Pre-Logging Transformation for details.
PGP Secret Formats
See the PGP Encrypt Stage for details of how the publicKeySecretName, privateKeySecretName and passPhraseSecretName values should be formatted. RSA PGP keys are too long for an Azure DevOps variable, so use $kv: tokens for them.
Last updated on