Note that there are some explanatory texts on larger screens.

plurals
  1. POAPI authentication design and hackability
    primarykey
    data
    text
    <p>Question: Is this API authentication technique easily hackable?</p> <pre><code>apiKey = "123456789" apiCallId = "1256341451" apiSecret = "67d48e91ab2b7471d4be2a8c2e007d13" sig = md5(apiKey + apiCallId + apiSecret) = 09c297a354219f173bfc49c2e203ce03 </code></pre> <p>where</p> <ul> <li><code>apiKey</code>: some unique identifier for the user</li> <li><code>apiCallId</code>: a unique integer that must be increasing in value (e.g. UNIX time stamp)</li> <li><code>apiSecret</code>: string known only to the user, and us - not passed in URL</li> <li><code>sig</code>: "unhackable" signature of this API call - MD5 hash</li> </ul> <p>Example API call:</p> <pre><code>http://api.domain.com/?apiKey=123456789&amp;apiCallId=1256341451&amp;sig=09c297a354219f173bfc49c2e203ce03&amp;param1=x&amp;param2=y </code></pre> <p>This API does not require a session, and is not designed for a 3rd party to use on behalf of a user. Instead, it is to be used by the user themselves.</p> <p>I really like the simplicity of this. The requirement of <code>apiCallId</code> being unique, and always increasing means reusing a <code>sig</code> is not possible, so I feel like it is secure (protected against replay attacks), but I am not an expert.</p> <p>Other APIs use all of the GET parameters sorted alphabetically when calculating the <code>sig</code>, but I do not see why this is necessary when including <code>apiCallId</code>.</p> <p>Please try and hack this now before it is implemented and released.</p> <p>I welcome any feedback, suggestions and security education.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload