diff --git a/README.md b/README.md
index 0467739..f1a7d46 100644
--- a/README.md
+++ b/README.md
@@ -61,14 +61,25 @@ As part of this set up, you'll receive credentials for your app:
#### One-Click Import
To import two ready to be used "sandbox" and "production" environments:
-1. Click [![](https://img.shields.io/badge/insomnia-install%20workspace-purple.svg?color=6a57d5)](https://insomnia.rest/run/?label=Import%20Mastercard%20Workspace&uri=https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-insomnia-workspace.json)
+1. Depending on your use case, click either of these:
+ - No encryption:
+ [![](https://img.shields.io/badge/insomnia-install%20workspace-purple.svg?color=6a57d5)](https://insomnia.rest/run/?label=Import%20Mastercard%20Workspace&uri=https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-insomnia-workspace.json)
+
+ - Mastercard Encryption:
+ [![](https://img.shields.io/badge/insomnia-install%20workspace-purple.svg?color=6a57d5)](https://insomnia.rest/run/?label=Import%20Mastercard%20Workspace&uri=https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-with-mastercard-encryption-insomnia-workspace.json)
+
+ - JWE Encryption:
+ [![](https://img.shields.io/badge/insomnia-install%20workspace-purple.svg?color=6a57d5)](https://insomnia.rest/run/?label=Import%20Mastercard%20Workspace&uri=https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-with-jwe-encryption-insomnia-workspace.json)
2. Click "Run Import Mastercard Workspace"
Alternatively, you can:
1. Go to Application > Preferences > Data
2. Click "Import Data"
3. Click "From URL"
-4. Type: https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-insomnia-workspace.json
+4. Input either of these depending on your use case:
+ - No encryption: https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-insomnia-workspace.json
+ - Mastercard encryption: https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-with-mastercard-encryption-insomnia-workspace.json
+ - JWE encryption: https://raw.githubusercontent.com/Mastercard/insomnia-plugin-mastercard/master/workspace/mastercard-apis-with-jwe-encryption-insomnia-workspace.json
5. Click "Fetch and Import"
![](https://user-images.githubusercontent.com/3964455/68041294-2d966300-fcc8-11e9-887a-cfadf183c4c1.gif)
@@ -116,7 +127,9 @@ From now on, an `Authorization` header will be automatically added to every requ
### Encryption
This plugin can take care of encrypting requests and/or decrypting response payloads. To enable encryption support,
-you need to configure in the environment the `encryptionConfig` property:
+you need to configure in the environment the `encryptionConfig` property.
+
+Here's a quick example for Mastercard Encryption:
```jsonc
{
@@ -176,7 +189,14 @@ As an alternative to providing the `privateKey` in the `encryptionConfig`, you c
}
}
```
-For further details on the configuration object and predefined service configurations, please checkout this [page](https://github.com/Mastercard/client-encryption-nodejs/wiki).
+
+[See more examples here](docs/encryption-examples.md).
+
+Both Mastercard encryption and JWE encryption are supported.
+For more details on the encryption configurations, checkout these links:
+ - [Mastercard Encryption](https://github.com/Mastercard/client-encryption-nodejs/blob/main/README.md#configuring-the-field-level-encryption)
+ - [JWE Encryption](https://github.com/Mastercard/client-encryption-nodejs/blob/main/README.md#configuring-the-jwe-encryption)
+
## Further Reading
diff --git a/docs/configuration-examples.md b/docs/configuration-examples.md
new file mode 100644
index 0000000..bee5c02
--- /dev/null
+++ b/docs/configuration-examples.md
@@ -0,0 +1,266 @@
+# Example Configurations
+
+Example configurations for Insomnia. Make sure to remove the comments before using.
+
+- [Authentication](#authentication)
+- [Mastercard Encryption](#mastercard-encryption)
+ * [Real world example](#mastercard-encryption-real-world-example)
+- [JWE Encryption](#jwe-encryption)
+ * [Real world example](#jwe-encryption-real-world-example)
+- [Notes](#notes)
+
+## Authentication
+
+```json
+{
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/auth-keystore.p12",
+ "keystorePassword": "keystorepassword",
+
+ // domains to which this config should be applied to.
+ // defaults to ["mastercard.com","api.ethocaweb.com"]
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ]
+ }
+}
+```
+
+## Mastercard Encryption
+```json
+{
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/auth-keystore.p12",
+ "keystorePassword": "keystorepassword",
+
+ // domains to which this config should be applied to.
+ // defaults to ["mastercard.com","api.ethocaweb.com"]
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ],
+
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "/*",
+ "toEncrypt": [
+ {
+ // path to the element to be encrypted in request JSON.
+ // use "$" for encrypting the whole request.
+ "element": "path.to.element.to.be.encrypted",
+ // path to object where encryption fields are to be stored in request JSON.
+ // use "$" for the root of the JSON object.
+ "obj": "path.to.encrypted.output.element"
+ }
+ ],
+ "toDecrypt": [
+ {
+ // path to object with encryption fields in response JSON.
+ // use "$" for the root of the JSON.
+ "element": "path.to.element.to.be.decrypted",
+
+ // path to element where decrypted fields are to be stored in the response JSON.
+ // use "$" for the root of the JSON object.
+ "obj": "path.to.decryption.output"
+ }
+ ]
+ }
+ ],
+ "oaepPaddingDigestAlgorithm": "SHA-256",
+ "dataEncoding": "hex", // "hex" or "base64"
+ "ivFieldName": "iv",
+ "encryptedKeyFieldName": "encryptedKey",
+ "encryptedValueFieldName": "encryptedValue",
+ "oaepHashingAlgorithmFieldName": "oaepHashingAlgorithm",
+ "publicKeyFingerprintFieldName": "publicKeyFingerprint",
+ "publicKeyFingerprintType": "certificate", // "certificate" or "publicKey"
+ "publicKeyFingerprint": "0000000000000000000000000000000000000000000000000000000000000000",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+}
+```
+### Mastercard Encryption Real world example
+
+This is a real world configuration for the [Donations API](https://developer.mastercard.com/donations/documentation/service_config/), which uses Mastercard Encryption.
+See the [API documentation](https://developer.mastercard.com/donations/documentation/service_config/) for details.
+
+```json
+{
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/auth-keystore.p12",
+ "keystorePassword": "keystorepassword",
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "$",
+ "toEncrypt": [
+ {
+ "element": "$",
+ "obj": "$"
+ }
+ ],
+ "toDecrypt": [
+ {
+ "element": "$",
+ "obj": "$"
+ }
+ ]
+ }
+ ],
+ "oaepPaddingDigestAlgorithm": "SHA-256",
+ "dataEncoding": "base64",
+ "ivFieldName": "iv",
+ "encryptedKeyFieldName": "encryptedKey",
+ "encryptedValueFieldName": "encryptedValue",
+ "oaepHashingAlgorithmFieldName": "oaepPaddingDigestAlgorithm",
+ "publicKeyFingerprintFieldName": "publicKeyFingerprint",
+ "publicKeyFingerprintType": "certificate",
+ "publicKeyFingerprint": "0000000000000000000000000000000000000000000000000000000000000000",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+}
+```
+
+## JWE Encryption
+```json
+{
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/auth-keystore.p12",
+ "keystorePassword": "keystorepassword",
+
+ // domains to which this config should be applied to.
+ // defaults to ["mastercard.com","api.ethocaweb.com"]
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ],
+
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "/*",
+ "toEncrypt": [
+ {
+ // path to the element to be encrypted in request JSON.
+ // use "$" for encrypting the whole request.
+ "element": "path.to.element.to.be.encrypted",
+ // path to object where encryption fields are to be stored in request JSON.
+ // use "$ for the root of the JSON object.
+ "obj": "path.to.encrypted.output.element"
+ }
+ ],
+ "toDecrypt": [
+ {
+ // path to object with encryption fields in response JSON.
+ // use "$ for the root of the JSON.
+ "element": "path.to.element.to.be.decrypted",
+
+ // path to element where decrypted fields are to be stored in the response JSON.
+ // use "$" for the root of the JSON object.
+ "obj": "path.to.decryption.output"
+ }
+ ]
+ }
+ ],
+ "mode": "JWE",
+ "encryptedValueFieldName": "encryptedData",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+}
+```
+
+### JWE Encryption Real World Example
+This is a real world configuration for the [Mastercard Installments API](https://developer.mastercard.com/unified-installments/documentation/api-basics/#group-1), which uses JWE Encryption.
+See the [API documentation](https://developer.mastercard.com/unified-installments/documentation/api-basics/#group-1) for details.
+```json
+{
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/auth-keystore.p12",
+ "keystorePassword": "keystorepassword",
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ],
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "/*",
+ "toEncrypt": [
+ {
+ "element": "sensitiveData",
+ "obj": "encryptedValue"
+ }
+ ],
+ "toDecrypt": [
+ {
+ "element": "encryptedValue",
+ "obj": "sensitiveData"
+ }
+ ]
+ }
+ ],
+ "mode": "JWE",
+ "encryptedValueFieldName": "encryptedValue",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "keyalias",
+ "keyStorePassword": "keystorepassword"
+ }
+ }
+}
+```
+
+## Notes
+Instead of providing the `keyStore`, `keyStoreAlias` and `keyStorePassword`,
+```json
+{
+ "mastercard": {
+ // ... //
+ "encryptionConfig": {
+ // ... //
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+}
+```
+you can also directly provide the `privateKey` from the decryption key store:
+```json
+{
+ "mastercard": {
+ // ... //
+ "encryptionConfig": {
+ // ... //
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "privateKey": "/path/to/private/key"
+ }
+ }
+}
+```
+
diff --git a/workspace/mastercard-apis-with-jwe-encryption-insomnia-workspace.json b/workspace/mastercard-apis-with-jwe-encryption-insomnia-workspace.json
new file mode 100644
index 0000000..9c0766a
--- /dev/null
+++ b/workspace/mastercard-apis-with-jwe-encryption-insomnia-workspace.json
@@ -0,0 +1,239 @@
+{
+ "_type": "export",
+ "__export_format": 4,
+ "__export_date": "2024-11-08T16:36:55.973Z",
+ "__export_source": "insomnia.desktop.app:v10.0.0",
+ "resources": [
+ {
+ "_id": "req_ef8350a9a0df4ca1a07c2af2202320b5",
+ "parentId": "wrk_c42f7dbb091f4d1fae4c91718ca39fc0",
+ "modified": 1572606757333,
+ "created": 1572009619195,
+ "url": "{{ host }}/atms/v1/atm?PageOffset=0&PageLength=5&PostalCode=11101&Format=JSON",
+ "name": "Mastercard ATM Location (update me!)",
+ "description": "",
+ "method": "GET",
+ "body": {},
+ "parameters": [],
+ "headers": [
+ {
+ "id": "pair_6ee06233d94744bb82fec669f98d45f1",
+ "name": "content-type",
+ "value": "application/json"
+ }
+ ],
+ "authentication": {},
+ "metaSortKey": -1572009619195,
+ "isPrivate": false,
+ "settingStoreCookies": true,
+ "settingSendCookies": true,
+ "settingDisableRenderRequestBody": false,
+ "settingEncodeUrl": true,
+ "settingRebuildPath": true,
+ "settingFollowRedirects": "global",
+ "_type": "request"
+ },
+ {
+ "_id": "wrk_c42f7dbb091f4d1fae4c91718ca39fc0",
+ "parentId": null,
+ "modified": 1731083688338,
+ "created": 1731083688338,
+ "name": "Mastercard APIs",
+ "description": "",
+ "scope": "collection",
+ "_type": "workspace"
+ },
+ {
+ "_id": "env_3080ad29390943d6821392b69a1a6883",
+ "parentId": "wrk_c42f7dbb091f4d1fae4c91718ca39fc0",
+ "modified": 1572009219908,
+ "created": 1551873508962,
+ "name": "New Environment",
+ "data": {},
+ "dataPropertyOrder": {},
+ "color": null,
+ "isPrivate": false,
+ "metaSortKey": 1551873508962,
+ "_type": "environment"
+ },
+ {
+ "_id": "jar_87e742beb2a34f9994674faeb1f56b13",
+ "parentId": "wrk_c42f7dbb091f4d1fae4c91718ca39fc0",
+ "modified": 1731080492448,
+ "created": 1731080492448,
+ "name": "Default Jar",
+ "cookies": [],
+ "_type": "cookie_jar"
+ },
+ {
+ "_id": "env_c26233cb7d8a4ccd99e5241976ca0615",
+ "parentId": "env_3080ad29390943d6821392b69a1a6883",
+ "modified": 1731083756416,
+ "created": 1572009184884,
+ "name": "Production",
+ "data": {
+ "host": "https://api.mastercard.com",
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/production-signing-key.p12",
+ "keystorePassword": "keystorepassword",
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ],
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "/*",
+ "toEncrypt": [
+ {
+ "element": "path.to.element.to.be.encrypted",
+ "obj": "path.to.encrypted.output.element"
+ }
+ ],
+ "toDecrypt": [
+ {
+ "element": "path.to.element.to.be.decrypted",
+ "obj": "path.to.decryption.output"
+ }
+ ]
+ }
+ ],
+ "mode": "JWE",
+ "encryptedValueFieldName": "encryptedData",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+ },
+ "dataPropertyOrder": {
+ "&": [
+ "host",
+ "mastercard"
+ ],
+ "&~|mastercard": [
+ "consumerKey",
+ "keyAlias",
+ "keystoreP12Path",
+ "keystorePassword",
+ "appliesTo",
+ "encryptionConfig"
+ ],
+ "&~|mastercard~|encryptionConfig": [
+ "paths",
+ "mode",
+ "encryptedValueFieldName",
+ "encryptionCertificate",
+ "keyStore",
+ "keyStoreAlias",
+ "keyStorePassword"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0": [
+ "path",
+ "toEncrypt",
+ "toDecrypt"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toEncrypt~|0": [
+ "element",
+ "obj"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toDecrypt~|0": [
+ "element",
+ "obj"
+ ]
+ },
+ "color": "#00ff00",
+ "isPrivate": false,
+ "metaSortKey": 1572009184884,
+ "_type": "environment"
+ },
+ {
+ "_id": "env_66828b4d025b49dea8ff095effefa8fe",
+ "parentId": "env_3080ad29390943d6821392b69a1a6883",
+ "modified": 1731083769084,
+ "created": 1572542085385,
+ "name": "Sandbox",
+ "data": {
+ "host": "https://sandbox.api.mastercard.com",
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/sandbox-signing-key.p12",
+ "keystorePassword": "keystorepassword",
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ],
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "/*",
+ "toEncrypt": [
+ {
+ "element": "path.to.element.to.be.encrypted",
+ "obj": "path.to.encrypted.output.element"
+ }
+ ],
+ "toDecrypt": [
+ {
+ "element": "path.to.element.to.be.decrypted",
+ "obj": "path.to.decryption.output"
+ }
+ ]
+ }
+ ],
+ "mode": "JWE",
+ "encryptedValueFieldName": "encryptedData",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+ },
+ "dataPropertyOrder": {
+ "&": [
+ "host",
+ "mastercard"
+ ],
+ "&~|mastercard": [
+ "consumerKey",
+ "keyAlias",
+ "keystoreP12Path",
+ "keystorePassword",
+ "appliesTo",
+ "encryptionConfig"
+ ],
+ "&~|mastercard~|encryptionConfig": [
+ "paths",
+ "mode",
+ "encryptedValueFieldName",
+ "encryptionCertificate",
+ "keyStore",
+ "keyStoreAlias",
+ "keyStorePassword"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0": [
+ "path",
+ "toEncrypt",
+ "toDecrypt"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toEncrypt~|0": [
+ "element",
+ "obj"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toDecrypt~|0": [
+ "element",
+ "obj"
+ ]
+ },
+ "color": "#ff8040",
+ "isPrivate": false,
+ "metaSortKey": 1572542085385,
+ "_type": "environment"
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/workspace/mastercard-apis-with-mastercard-encryption-insomnia-workspace.json b/workspace/mastercard-apis-with-mastercard-encryption-insomnia-workspace.json
new file mode 100644
index 0000000..e0ef2f6
--- /dev/null
+++ b/workspace/mastercard-apis-with-mastercard-encryption-insomnia-workspace.json
@@ -0,0 +1,267 @@
+{
+ "_type": "export",
+ "__export_format": 4,
+ "__export_date": "2024-11-08T16:10:30.214Z",
+ "__export_source": "insomnia.desktop.app:v10.0.0",
+ "resources": [
+ {
+ "_id": "req_de97c7eb1e5947b19609c24f11c9a596",
+ "parentId": "wrk_09568c610fe746488e6d802ea289670c",
+ "modified": 1572606757333,
+ "created": 1572009619195,
+ "url": "{{ host }}/atms/v1/atm?PageOffset=0&PageLength=5&PostalCode=11101&Format=JSON",
+ "name": "Mastercard ATM Location (update me!)",
+ "description": "",
+ "method": "GET",
+ "body": {},
+ "parameters": [],
+ "headers": [
+ {
+ "id": "pair_6ee06233d94744bb82fec669f98d45f1",
+ "name": "content-type",
+ "value": "application/json"
+ }
+ ],
+ "authentication": {},
+ "metaSortKey": -1572009619195,
+ "isPrivate": false,
+ "settingStoreCookies": true,
+ "settingSendCookies": true,
+ "settingDisableRenderRequestBody": false,
+ "settingEncodeUrl": true,
+ "settingRebuildPath": true,
+ "settingFollowRedirects": "global",
+ "_type": "request"
+ },
+ {
+ "_id": "wrk_09568c610fe746488e6d802ea289670c",
+ "parentId": null,
+ "modified": 1731080481557,
+ "created": 1731080481557,
+ "name": "Mastercard APIs",
+ "description": "",
+ "scope": "collection",
+ "_type": "workspace"
+ },
+ {
+ "_id": "env_0dd15fd7a95f46ce829f10bf7c4a2609",
+ "parentId": "wrk_09568c610fe746488e6d802ea289670c",
+ "modified": 1572009219908,
+ "created": 1551873508962,
+ "name": "New Environment",
+ "data": {},
+ "dataPropertyOrder": {},
+ "color": null,
+ "isPrivate": false,
+ "metaSortKey": 1551873508962,
+ "_type": "environment"
+ },
+ {
+ "_id": "jar_471fb3870e93e26349767c2fcabe61cce2245fdd",
+ "parentId": "wrk_09568c610fe746488e6d802ea289670c",
+ "modified": 1731080492448,
+ "created": 1731080492448,
+ "name": "Default Jar",
+ "cookies": [],
+ "_type": "cookie_jar"
+ },
+ {
+ "_id": "env_d9cd8b0a03a442e9879f851ed4f4b182",
+ "parentId": "env_0dd15fd7a95f46ce829f10bf7c4a2609",
+ "modified": 1731082137959,
+ "created": 1572009184884,
+ "name": "Production",
+ "data": {
+ "host": "https://api.mastercard.com",
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/production-signing-key.p12",
+ "keystorePassword": "keystorepassword",
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ],
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "$",
+ "toEncrypt": [
+ {
+ "element": "$",
+ "obj": "$"
+ }
+ ],
+ "toDecrypt": [
+ {
+ "element": "$",
+ "obj": "$"
+ }
+ ]
+ }
+ ],
+ "oaepPaddingDigestAlgorithm": "SHA-256",
+ "dataEncoding": "hex",
+ "ivFieldName": "iv",
+ "encryptedKeyFieldName": "encryptedKey",
+ "encryptedValueFieldName": "encryptedValue",
+ "oaepHashingAlgorithmFieldName": "oaepHashingAlgorithm",
+ "publicKeyFingerprintFieldName": "publicKeyFingerprint",
+ "publicKeyFingerprintType": "certificate",
+ "publicKeyFingerprint": "1bc1f515b1556df0066c91e24640b42e5cd16452f47f6812f6ef17c082841bcf",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+ },
+ "dataPropertyOrder": {
+ "&": [
+ "host",
+ "mastercard"
+ ],
+ "&~|mastercard": [
+ "consumerKey",
+ "keyAlias",
+ "keystoreP12Path",
+ "keystorePassword",
+ "appliesTo",
+ "encryptionConfig"
+ ],
+ "&~|mastercard~|encryptionConfig": [
+ "paths",
+ "oaepPaddingDigestAlgorithm",
+ "dataEncoding",
+ "ivFieldName",
+ "encryptedKeyFieldName",
+ "encryptedValueFieldName",
+ "oaepHashingAlgorithmFieldName",
+ "publicKeyFingerprintFieldName",
+ "publicKeyFingerprintType",
+ "publicKeyFingerprint",
+ "encryptionCertificate",
+ "keyStore",
+ "keyStoreAlias",
+ "keyStorePassword"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0": [
+ "path",
+ "toEncrypt",
+ "toDecrypt"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toEncrypt~|0": [
+ "element",
+ "obj"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toDecrypt~|0": [
+ "element",
+ "obj"
+ ]
+ },
+ "color": "#00ff00",
+ "isPrivate": false,
+ "metaSortKey": 1572009184884,
+ "_type": "environment"
+ },
+ {
+ "_id": "env_12622daf3ab14663b272458a23564d09",
+ "parentId": "env_0dd15fd7a95f46ce829f10bf7c4a2609",
+ "modified": 1731082170793,
+ "created": 1572542085385,
+ "name": "Sandbox",
+ "data": {
+ "host": "https://sandbox.api.mastercard.com",
+ "mastercard": {
+ "consumerKey": "000000000000000000000000000000000000000000000000!000000000000000000000000000000000000000000000000",
+ "keyAlias": "keyalias",
+ "keystoreP12Path": "/path/to/sandbox-signing-key.p12",
+ "keystorePassword": "keystorepassword",
+ "appliesTo": [
+ "mastercard.com",
+ "api.ethocaweb.com"
+ ],
+ "encryptionConfig": {
+ "paths": [
+ {
+ "path": "$",
+ "toEncrypt": [
+ {
+ "element": "$",
+ "obj": "$"
+ }
+ ],
+ "toDecrypt": [
+ {
+ "element": "$",
+ "obj": "$"
+ }
+ ]
+ }
+ ],
+ "oaepPaddingDigestAlgorithm": "SHA-256",
+ "dataEncoding": "hex",
+ "ivFieldName": "iv",
+ "encryptedKeyFieldName": "encryptedKey",
+ "encryptedValueFieldName": "encryptedValue",
+ "oaepHashingAlgorithmFieldName": "oaepHashingAlgorithm",
+ "publicKeyFingerprintFieldName": "publicKeyFingerprint",
+ "publicKeyFingerprintType": "certificate",
+ "publicKeyFingerprint": "1bc1f515b1556df0066c91e24640b42e5cd16452f47f6812f6ef17c082841bcf",
+ "encryptionCertificate": "/path/to/encryption-certificate.pem",
+ "keyStore": "/path/to/decryption-keystore.p12",
+ "keyStoreAlias": "decryption-keyalias",
+ "keyStorePassword": "decryption-keystorepassword"
+ }
+ }
+ },
+ "dataPropertyOrder": {
+ "&": [
+ "host",
+ "mastercard"
+ ],
+ "&~|mastercard": [
+ "consumerKey",
+ "keyAlias",
+ "keystoreP12Path",
+ "keystorePassword",
+ "appliesTo",
+ "encryptionConfig"
+ ],
+ "&~|mastercard~|encryptionConfig": [
+ "paths",
+ "oaepPaddingDigestAlgorithm",
+ "dataEncoding",
+ "ivFieldName",
+ "encryptedKeyFieldName",
+ "encryptedValueFieldName",
+ "oaepHashingAlgorithmFieldName",
+ "publicKeyFingerprintFieldName",
+ "publicKeyFingerprintType",
+ "publicKeyFingerprint",
+ "encryptionCertificate",
+ "keyStore",
+ "keyStoreAlias",
+ "keyStorePassword"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0": [
+ "path",
+ "toEncrypt",
+ "toDecrypt"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toEncrypt~|0": [
+ "element",
+ "obj"
+ ],
+ "&~|mastercard~|encryptionConfig~|paths~|0~|toDecrypt~|0": [
+ "element",
+ "obj"
+ ]
+ },
+ "color": "#ff8040",
+ "isPrivate": false,
+ "metaSortKey": 1572542085385,
+ "_type": "environment"
+ }
+ ]
+ }
\ No newline at end of file