Core
Write Plugins v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

secrets #

Available since 1.8.0

Secrets contained in the Vault and loaded at Kuzzle startup.

They have the same format as in the JSON file:

Copied to clipboard!
/* config/secrets.enc.json */
{
  "aws": {
    "keyId": "a47de7426fbcb8904290e376f147bc73.8e4b35be62ecbc53"
  }
}
Copied to clipboard!
init (config, context) {
  console.log(context.secrets);
  // {
  //   aws: {
  //     keyId: 'decrypted aws key id'
  //   }
  // }
}