Key on Demand (Just-in-Time)
Also known as KOD or JIT, it is the mechanism used for connecting an external asset storage to VaultN for asset retrieval on the fly. It enables integration of 3rd party asset management platforms to the VaultN transaction flow.
Key on Demand is an automatic key retrieval mechanism that allows stocks to be stored outside of VaultN for products. The integration is achieved with the use of webhooks. It enables VaultN to request a key from your API automatically if a product is out of stock in your vault.
You need to create API endpoints on your API structure to support the webhook mechanism. To create these endpoints, you need to be able to send and receive payloads. You can find more details about the payloads here.
VaultN uses JWT token-based authorization for the webhook mechanism to call your endpoints. When your API receives any request from VaultN you need to validate the token with a JWT secret key which is provided by VaultN. You can get this JWT Secret from KOD Configuration screens which are shown below.
-
Log in to your vault.
-
Go to Settings, top right, listed under your vault menu.
-
Go to Settings -> JIT Endpoints.
-
Provide the endpoint information and select the default rights for any products inserted via KOD and save.
-
Click Generate JWT button and note the JWT secret. It is used to generate a token by VaultN and in turn used by your API to validate the token.
Updated 9 months ago