Dynamic ApiKey for http request

Hi!

I’ve come across a service, which requires a dynamic ApiKey auth. Meaning, auth token has to be generated separately for each request. Haven’t found any relevant information.
Is this ever possible with a standard HTTP app? With a custom app? Below is an abstract from API doc:

API Key: ApiKeyAuth

Request authentication header based on the API key generated in e-Financials

Request authentication header takes the form of “{ApiKey_public_value}:{Request_signature}”, where

  1. {ApiKey_public_value} is the public value of the used API key downloaded from e-Financials
  2. {Request_signature} is the result of BASE64(HMAC-SHA-384(“{ApiKey_id}:{Request_time}:{Request_url}”, {ApiKey_password})), where 1. {ApiKey_id} is the ID of the used API key downloaded from e-Financials 2. {Request_time} is the value of the X-AUTH-QUERYTIME header 3. {Request_url} is path component of the absolute URL used in this request 4. {ApiKey_password} is the password of the used API key downloaded from e-Financials

For example: WksIHNpaW4gdGVnZ…Wxpa3RhZ2kgaHV2aXRhdmFtYXQ=:6JMLK6Gt…KJmbTWrCs/XcCaSV

I don’t think this is possible via Make.

BASE64(HMAC-SHA-384(“{ApiKey_id}:{Request_time}:{Request_url}”, {ApiKey_password}))

Currently, only HA256 or SHA512 is available in Make, and Encryptor Module doesn’t have this either.

For HMAC-SHA-384 you might be able to do it via Custom APP(I am not sure though on this) if you have the IML function enabled in your account. But besides, that maybe you can have some serverless applications like Lambda/Azure/Google Functions, CloudFare Workers, or any hosted code that can be triggered through make or through APIs.

Even, Google Apps Script can be developed for this, that will basically expose an API that you can use to generate the encrypted token.

2 Likes