Cannot resolve key from Developer Search results in Management APi

This issue only happens when i’ve set the key type to murmur64 in the config files (tyk.conf and tyk_analytics.conf) - "hash_key_function": "murmur64", - if using the default hash, I do not see this issue:

Using the Tyk Management API, to search for a given developer like so:

GET http://tyk-dashboard:3000/api/portal/developers/[email protected]

  "developers": [
      "id": "5b844bb38895a00001be779c",
      "email": "[email protected]",
      "date_created": "2018-08-27T19:06:27.669Z",
      "inactive": false,
      "org_id": "5b843fc18895a0000165470e",
      "api_keys": {
        "18d12df403d644c1705ffdb95cb1ab9f": "",
        "695bbb18253843b57e3bc8af633d5759": "",
        "81f9773ed2d447cd723b65a466e7a86d": "",
        "84208ccf1108492e43504c3e8510e320": "",
        "a4e445aaecc34aa845a636c30b66f2f7": "",
        "ddedf2cae6d9463f537b3a007945dfd3": ""
      "subscriptions": { "5b8440198895a00001be7787": "62e3f6c6" },
      "fields": { "key_name": "new11" },
      "nonce": "",
      "sso_key": ""

If I then take the subscription and key above and attempt to retrieve the key with a hash like so:

GET http://tyk-dashboard:3000/api/apis/5b8440198895a00001be7787/keys/62e3f6c6?hashed=true
404 Not Found

tyk-dashboard_1  | time="Aug 27 19:32:31" level=error msg="API Request failed: {\"status\":\"error\",\"message\":\"Key not found\"}\n" 
tyk-dashboard_1  | time="Aug 27 19:32:31" level=error msg="Key detail request failed" 
tyk-dashboard_1  | time="Aug 27 19:32:31" level=warning msg="Key retrieval failed" 
tyk-dashboard_1  | time="Aug 27 19:32:31" level=error msg="Could not retrieve key detail" error="Key retrieval failed" 

I can’t find them - same if I attempt to find the key in the dashboard as well. How should I get the key hash to retrieve the key? Is there another way to resolve the key hash?

I found the key hash in the Key Analytics and it’s 675d49de031c9895 - should

"subscriptions": { "5b8440198895a00001be7787": "62e3f6c6" },


"subscriptions": { "5b8440198895a00001be7787": "675d49de031c9895" },


I’ll check this and let you know if there is something up.

You are indeed correct - on the dashboard side the key is added to the developer using the wrong hashing algorithm. I’ll get a bug report in and fix it.

In the meantime i don’t know if you have the ability to do this in your env - but i pulled the correct key hash out of redis using the cli and editing the developer object in mongo to get things working properly.

In any case i’ll add a reply here when the patch with the fix is out.


Got it - makes sense. Thanks! Anxiously awaiting your fix! :smiley: