Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Service Configurations for Client Encryption Ruby

Jean-Alexis Aufauvre edited this page Jun 25, 2020 · 5 revisions

Table of Contents

Overview

Predefined service configurations for the Ruby client encryption library.

Configurations

{
  paths: [
    {
      path: "/pushAccount",
      toEncrypt: [
        {
          element: "pushFundingAccount.encryptedPayload.encryptedData",
          obj: "pushFundingAccount.encryptedPayload"
        }],
      toDecrypt: []
    }
  ],
    
  oaepPaddingDigestAlgorithm: 'SHA-512',

  ivFieldName: 'iv',
  encryptedKeyFieldName: 'encryptedKey',
  encryptedValueFieldName: 'encryptedData',
  oaepHashingAlgorithmFieldName: 'oaepHashingAlgorithm',
  publicKeyFingerprintFieldName: 'publicKeyFingerprint',
  publicKeyFingerprintType: "certificate",
    
  dataEncoding: 'hex',
    
  encryptionCertificate: "./path/to/your/encryption.crt"
}
{
  paths: [
    {
      path: "/tokenize",
      toEncrypt: [
        {
          element: "cardInfo.encryptedData",
          obj: "cardInfo"
        },
        {
          element: "fundingAccountInfo.encryptedPayload.encryptedData",
          obj: "fundingAccountInfo.encryptedPayload"
        }],
      toDecrypt: [
        {
          element: "tokenDetail",
          obj: "tokenDetail.encryptedData"
        }
      ]
    },
    {
      path: "/searchTokens",
      toEncrypt: [
        {
          element: "cardInfo.encryptedData",
          obj: "cardInfo"
        },
        {
          element: "fundingAccountInfo.encryptedPayload.encryptedData",
          obj: "fundingAccountInfo.encryptedPayload"
        }],
      toDecrypt: []
    },
    {
      path: "/getToken",
      toEncrypt: [],
      toDecrypt: [
        {
          element: "tokenDetail",
          obj: "tokenDetail.encryptedData"
        }]
    },
    {
      path: "/transact",
      toEncrypt: [],
      toDecrypt: [
        {
          element: "encryptedPayload",
          obj: "encryptedPayload.encryptedData"
        }]
    },
    {
      path: "/notifyTokenUpdated",
      toEncrypt: [
        {
          element: "encryptedPayload.encryptedData",
          obj: "encryptedPayload"
        }],
      toDecrypt: []
    }
  ],


  oaepPaddingDigestAlgorithm: 'SHA-512',

  ivFieldName: 'iv',
  encryptedKeyFieldName: 'encryptedKey',
  encryptedValueFieldName: 'encryptedData',
  oaepHashingAlgorithmFieldName: 'oaepHashingAlgorithm',
  publicKeyFingerprintFieldName: 'publicKeyFingerprint',
  publicKeyFingerprintType: "certificate",

  dataEncoding: 'hex',

  encryptionCertificate: "./path/to/your/encryption.crt",
  privateKey: "./path/to/your/private.key"

}

Installment APIs for Financial and Non-Financial Institutions

{
  paths: [
    {
      path: "/installmentConfigData",
      toEncrypt: [
        {
          element: "configReqData.primaryAccountNumber",
          obj: "configReqData"
        }],
      toDecrypt: []
    },
    {
      path: "/receiveApproval",
      toEncrypt: [
        {
          element: "receiveIssuerApprReqData.primaryAccountNumber",
          obj: "receiveIssuerApprReqData"
        }],
      toDecrypt: []
    }
  ],

  oaepPaddingDigestAlgorithm: 'SHA-256',

  ivFieldName: 'iv',
  encryptedKeyFieldName: 'wrappedKey',
  encryptedValueFieldName: 'primaryAccountNumber',

  dataEncoding: 'base64',

  encryptionCertificate: "./path/to/your/encryption.crt"
}
{
  paths: [
    {
      path: "/addAccount",
      toEncrypt: [
        {
          element: "encryptedPayload.encryptedData",
          obj: "encryptedPayload"
        }
      ],
      toDecrypt: []
    },
    {
      path: "/closeAccount",
      toEncrypt: [
        {
          element: "encryptedPayload.encryptedData",
          obj: "encryptedPayload"
        }
      ],
      toDecrypt: []
    },
    {
      path: "/getPaymentAccountReference",
      toEncrypt: [
        {
          element: "encryptedPayload.encryptedData",
          obj: "encryptedPayload"
        }
      ],
      toDecrypt: [
        {
          element: "encryptedPayload",
          obj: "encryptedPayload.encryptedData"
        }
      ]
    },
    {
      path: "/updateAccount",
      toEncrypt: [
        {
          element: "encryptedPayload.encryptedData",
          obj: "encryptedPayload"
        }
      ],
      toDecrypt: []
    },
    {
      path: "/overrideForDeleteAccount",
      toEncrypt: [
        {
          element: "encryptedPayload.encryptedData",
          obj: "encryptedPayload"
        }
      ],
      toDecrypt: []
    }
  ],

  oaepPaddingDigestAlgorithm: 'SHA-512',

  ivFieldName: 'iv',
  encryptedKeyFieldName: 'encryptedKey',
  encryptedValueFieldName: 'encryptedData',
  oaepHashingAlgorithmFieldName: 'oaepHashingAlgorithm',
  publicKeyFingerprintFieldName: 'publicKeyFingerprint',
  publicKeyFingerprintType: "publicKey",

  dataEncoding: 'hex',

  encryptionCertificate: "./path/to/your/encryption.crt",
  privateKey: "./path/to/private.key"
}
{
  paths: [
    {
      path: "/getPaymentAccountReference",
      toEncrypt: [
        {
          element: "encryptedPayload.encryptedData",
          obj: "encryptedPayload"
        }],
      toDecrypt: [
        {
          element: "encryptedPayload",
          obj: "encryptedPayload.encryptedData"
        }
      ]
    }
  ],
  oaepPaddingDigestAlgorithm: 'SHA-512',
  ivFieldName: 'iv',
  encryptedKeyFieldName: 'encryptedKey',
  encryptedValueFieldName: 'encryptedData',
  oaepHashingAlgorithmFieldName: 'oaepHashingAlgorithm',
  publicKeyFingerprintFieldName: 'publicKeyFingerprint',
  publicKeyFingerprintType: "certificate",
  dataEncoding: 'hex',
  encryptionCertificate: "./path/to/your/encryption.crt",
  privateKey: "./path/to/private.key"
}
{
  paths: [
    {
      path: "/transactions",
      toEncrypt: [],
      toDecrypt: [
        {
          element: "",
          obj: "items"
        }
      ]
    },
    {
      path: "/serviceProvider",
      toEncrypt: [],
      toDecrypt: [
        {
          element: "",
          obj: "items"
        }
      ]
    }
  ],


  oaepPaddingDigestAlgorithm: 'SHA-512',

  ivFieldName: 'iv',
  encryptedKeyFieldName: 'encryptedKey',
  encryptedValueFieldName: 'items',
  oaepHashingAlgorithmFieldName: 'oaepHashingAlgorithm',
  publicKeyFingerprintFieldName: 'publicKeyFingerprint',
  publicKeyFingerprintType: "certificate",

  dataEncoding: 'base64',

  encryptionCertificate: "./path/to/your/encryption.crt",
  privateKey: "./path/to/private.key"
}
{
  paths: [
    {
      path: "/mappings/*",
      toEncrypt: [
        {
          element: "",
          obj: "encrypted_payload"
        }],
      toDecrypt: [
        {
          element: "encrypted_payload",
          obj: ""
        }
      ]
    }
  ],

  oaepPaddingDigestAlgorithm: 'SHA-256',

  ivHeaderName: 'x-iv',
  encryptedKeyHeaderName: 'x-encrypted-key',
  oaepHashingAlgorithmHeaderName: 'x-oaep-hashing-algorithm',
  publicKeyFingerprintHeaderName: 'x-public-key-fingerprint',

  encryptedValueFieldName: 'data',

  dataEncoding: 'base64',

  publicKeyFingerprintType: "publicKey",
  encryptionCertificate: "./path/to/your/encryption.crt.pem",


  keyStore: "./path/to/your/keystore.p12",
  keyStoreAlias: "<yourkeyalias>",
  keyStorePassword: "<yourkeypassword>"
}
Clone this wiki locally