Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
On this Page

In this article

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Transform

Description:

Overview

Pretty Good Privacy (PGP) is a decryption program that provides cryptographic privacy and authentication for data communication. PGP is popularly used to digitally sign, encrypt or decrypt email messages or files being transferred over the Internet.

note

The default security in the JRE limits the key length for encryption keys. For stronger encryption keys, you would need to manually install the Java Cryptographic Extension JARs on your JCC nodes.

This Snap decrypts PGP-encrypted data provided as an input stream using the private key and passphrase.  This Snap should be attached to the input binary data stream to be decrypted in the pipeline. 

  • Expected upstream Snaps: Any Snap, such as PGP Encrypt, that produces PGP encrypted data in the output view.
  • Expected downstream Snaps: Any Snap, such as File Writer or JSON Parser, that accepts decrypted data in the input view.
  • Expected input: Stream of PGP encrypted data.
  • Expected output: Stream of PGP decrypted data.


Note
The default security in the JRE limits the key length for encryption keys. For stronger encryption keys, you would need to manually install the Java Cryptographic Extension JARs on your JCC nodes.

Snap Type

PGP Decrypt Snap is a TRANSFORM-type Snap that transforms binary documents.

Prerequisites

:

[

None

]

.

Limitations and Known Issues

The Snap might fail while processing very large signed files. 

Support

and limitations:

for Ultra Pipelines

Works in Ultra Pipelines.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager called PGP Private Key Account that stores the private key and passphrase used for decryption. See Configuring Binary Accounts for information on setting up this type of account. 

When setting up the account, enter your private PGP key and your PGP passphrase. The credentials setup will automatically decrypt the PGP-encrypted message.

Views:
Input

This Snap has exactly one binary input view. The data that has to be decrypted is passed through this view.
Note: The decryption action is taken on files that end with a "pgp" the file extension. The input files to be decrypted must be presented as .pgp files.

OutputThis Snap has exactly one binary output view.  The decrypted data is passed through this view as output.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.  If you supply the proper PGP private key and passphrase/password, then you will be able to read the decrypted message, otherwise, you will see an error message indicating unable to decrypt the message.

Settings

Label

Required. The name for the Snap. You can modify this to be more specific

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Input 

Document

Binary

Binary or Document


  • Min:1

  • Max:1

Any Snap that produces binary data in the output view such as File Reader or Compress.

Output

Document

Binary

Binary or Document


  • Min:1

  • Max:1

Any Snap that accepts binary data in the input view such as File Writer or Decompress.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings


Field Name

Field Type

Description

Label*


Default Value: PGP Decrypt
Example
PGP Decrypt

String

Specify the name for the Snap. You can use a more specific label, especially if you have more than one of the same Snap in your

pipeline

Pipeline.

Is signed file?



Signed File

Default Value: Deselected

CheckboxSpecify if the selected file is a signed file.

Skip Verification

Default Value: Deselected

CheckboxSelect this
option
checkbox to
specify if the selected file is a signed file.

Multiexcerpt include macro
nameSnap Execution
pageAnaplan Read

Multiexcerpt include macronameSnap_Execution_IntroducedpageAnaplan Read
skip the verification if there is an issue with the signature in the encrypted file.

Snap Execution


Default Value:
 Execute only
Example: 
Validate & Execute

Dropdown list

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.


Examples


The following example includes Sample input data which is successfully encrypted using the PGP Encrypt Snap and then decrypted using the PGP Decrypt Snap.

Encrypting Data Using the PGP Encrypt Snap 

We will start with a JSON Generator Snap which has a sample message "Hello World", which is formatted and written as JSON binary data for the PGP Encrypt Snap to ingest.

We can see that the Message is Encrypted as the output of the PGP Encrypt Snap.

Decrypting Data Using the PGP Decrypt Snap

We will write the file out as File_encrypt.pgp to the SnapLogic DB. Then we proceed to decrypt the encrypted file and write it to the SnapLogic DB as File_decrypt.txt.
We can see that the output from the Decrypt Snap matches our original raw unencrypted data: 

We have successfully decrypted the message.

Download the sample pipeline.

Downloads

Info

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.

Attachments

Attachments
oldfalse
patterns*.slp,



Insert excerpt
Binary Snap Pack
Binary Snap Pack
nopaneltrue