You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am currently looking at a new integration - this integration requires several items, including a header information, which is a hash check of all the other header information concatenated together.
Also, one of the header ("date") is a dynamic value, generated from the time stamp of the client.
Question: Is this worth embarking on / technically achievable within the browser only, without a thick client. Note that example codes are provided in Python, Java, PHP, C++ and C#.
X-Auth-Hash header calculation:
Take the request path and query string for the request. The request path is the part of the URL after the https://api.cti_provider.com. For example, for the following basic search request:
http://api.cti_provider.com/search/basic?domain=abc.com, the part of the URL to be taken is: /search/basic?domain=abc.com
Concatenate with the value specified in the "Accept-Version" header (defined earlier, fixed value).
Concatenate with the value specified in the "Accept header" (defined earlier, fixed value)
Concatenate with the current time stamp value of the client specified in the "Date" header (defined earlier, the time stamp needs to be dynamically calculated).
Calculate the HMAC-SHA256 digest for the string obtained after following Step 1 to Step 4 above.
Populate the "X-Auth-Hash" header with this value.
The text was updated successfully, but these errors were encountered:
cicakdinding01
changed the title
Hash of Concatenated Header Information Required for API integration
Hash of Concatenated Header Information Required for API Lookup
Mar 14, 2018
I can probably expand the jexl expressions to allow most of this (getting the date, concatenating the values then hashing them, etc), but I'd also have to expand the jexl expressions to work at request time. Which is cool, it shouldn't be a problem.
I just want to make sure I'm not missing anything. Could you throw together some javascript or pseudo code that can perform the steps and show what variables we need to collect from any responses and then use in any requests and how its all thrown together to make the API request? It sounds like other than the date the rest of the values are mostly hard coded except the hash which would be calculated based on the other values which seems straight forward.
Working on some other items right now for a bigger-ish release in the next week or two but I can try and squeeze this in. I can make sure I don't mess it up if you can get some javascript code together that makes the requests (doesn't need to be working example with the domain or anything just demonstrate what needs to be manipulated for the XHR request). Any JS is fine, jquery, pure whatever.
Also throw together an example of the variables with static values, what they concatenate to, and what the hash value ends up being. This will just give me a working example that I can use to make sure the hash is being produced properly and something wonky isn't going on with white space or with the expressions themselves.
Hi,
Am currently looking at a new integration - this integration requires several items, including a header information, which is a hash check of all the other header information concatenated together.
Also, one of the header ("date") is a dynamic value, generated from the time stamp of the client.
Question: Is this worth embarking on / technically achievable within the browser only, without a thick client. Note that example codes are provided in Python, Java, PHP, C++ and C#.
X-Auth-Hash header calculation:
Take the request path and query string for the request. The request path is the part of the URL after the https://api.cti_provider.com. For example, for the following basic search request:
http://api.cti_provider.com/search/basic?domain=abc.com, the part of the URL to be taken is: /search/basic?domain=abc.com
Concatenate with the value specified in the "Accept-Version" header (defined earlier, fixed value).
Concatenate with the value specified in the "Accept header" (defined earlier, fixed value)
Concatenate with the current time stamp value of the client specified in the "Date" header (defined earlier, the time stamp needs to be dynamically calculated).
Calculate the HMAC-SHA256 digest for the string obtained after following Step 1 to Step 4 above.
Populate the "X-Auth-Hash" header with this value.
The text was updated successfully, but these errors were encountered: