Zum Hauptinhalt wechseln
Adaptive Planning
Set up PGP Encryption

Set up PGP Encryption

You can upload and download encrypted files from
Adaptive Planning
using Pretty Good Privacy (PGP) to a secure 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.
With PGP you can share your Public key with partners and retrieve partner keys.

Before you Begin

  • Required Permissions:
    Integration Developer
    within
    Administration > Permission Set
  • 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

  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. Example: 'myPgp'

Example to
Encrypt/ Decrypt text string with PGP.

Example to encrypt text into a PGP message
function testConnection(context) { var text = "Text to encrypt"; var encrypedPgpMessage = ai.util.encrypt(text,'myPgp'); ai.log.logInfo("encrypted message", encrypedPgpMessage ); return true; }
Example to decrypt a PGP message
function testConnection(context) { var message = "-----BEGIN PGP MESSAGE-----" +"Version: GnuPG v2.0.14 (GNU/Linux)" +"Your Message" +"-----END PGP MESSAGE-----"; var text = ai.util.decrypt(message,'myPgp'); ai.log.logInfo("text message", text); return true; }