Skip to main content

logoCorrectSize.png

Workday Adaptive Planning Knowledge Center

Set up PGP Encryption

Explains how to encrypt and decrypt files with PGP.

 

You can upload and download encrypted files from Adaptive Planning using Pretty Good Privacy(PGP) to a Secure FTP (SFTP) server. This article explains how to create PGP credentials from Design Integrations, how to add PGP encryption to your CCDS and how to encrypt and decrypt files using PGP. 

Before you Begin

  • New to CCDS?  See Concept: CCDS and Workflow for Developing a CCDS
  • Required Permissions: Integration Developer role within Administration > Roles and Permissions
  • Request the partner key to be communicated to you as an .asc  file.

Basic Steps

  1. Create a PGP Encryption credential.
  2. Input the partner key.
  3. Download your public key.
  4. Add the PGP Encryption to your CCDS.
  5. Include PGP encryption or decryption in your script.

How you get There

Compass.png From the nav menu, go to Integration > Design Integrations

Create a PGP Encryption credential

A new PGP encryption includes a 2048 bit key pair. Public key is visible in the form and available as a download in the Actions pane. The private key is hidden and can not be exported.

  1. Create a PGP Encryption credential from Credentials pane in Design Integrations.  
  2. Enter a name for the PGP encryption credential. 

Input the Partner Key

A partner key is required to encrypt files or text for the partner. Your partner key comes from the .asc  file you received. 

  1. Copy all of the text from your .asc file, including -----BEGIN PGP PUBLIC KEY BLOCK----- and -----END PGP PUBLIC KEY BLOCK-----
  2. Paste the key in the Partner key field and save the form. 

Download the Public Key

Select Download public key from the Actions pane. This generates your public key in an .asc  file and downloads it to your local file manager. 

pgp_encryption_01.png

Add PGP Encryption to your CCDS

To create a CCDS, see Workflow for developing a CCDS.

  1. Select your CCDS from Data Sources.
  2. Select the Designer Settings tab for your CCDS.
  3. Drag and drop the PGP Encryption parameter from Additional Settings in the Settings Component pane. The setting name is the handle you will use inside your script. For example:  'myPgp'

Include PGP Encryption or Decryption in your Script

Use the following methods to encrypt text into a PGP message with the partner key or decrypt a PGP message with the private key. To create a client, upload and download encrypted files with PGP encryption and decryption, see ai.sftp

  • ai.util.encrypt(text, pgpEncryptionSettingName)

ai.util.encrypt("Sample text",'myPgp');

Example to encrypt a text string with PGP: 

const encryptedText = ai.util.encrypt('Text to encrypt','myPgp');

  • ai.util.decrypt(message, pgpEncryptionSettingName)

ai.util.decrypt("Sample Message",'myPgp');

Example to decrypt a PGP message:

const decryptedText = ai.util.decrypt(encryptedText,'myPgp');
 

 

  • Was this article helpful?