Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
39.3k stars 4.82k forks source link

Cannot fetch HMAC secret code #8097

Closed etoanik closed 1 year ago

etoanik commented 2 years ago

Is there an existing issue for this?

Kong version ($ kong version)

Kong 2.6.0

Current Behavior

My HMAC credential name is get from iPhone's identifierForVendor, e.g. 26DE073B-7835-48AD-917C-8E9F34E6A217

In case I try to get credential, but return {"message":"Not found"}

curl -X GET http://kong:8001/consumers/email}/hmac-auth/26DE073B-7835-48AD-917C-8E9F34E6A217

Expected Behavior

Should return as bellow

{"secret":"xxxxxxxxxxxxxx","username":"26DE073B-7835-48AD-917C-8E9F34E6A217","consumer":{"id":"ac654f30-5a10-43ec-8196-xxxxxxxxxxxxxx"},"id":"e44cfbad-4b34-4c91-9177-xxxxxxxxxxxxxxxx","created_at":1637628953,"tags":null}

Steps To Reproduce

1. Add credential 

$ curl -i -X POST http://localhost:8001/consumers/{email}/hmac-auth \
      -d "username=26DE073B-7835-48AD-917C-8E9F34E6A217" \
      -d "secret=secret"
  1. Get credential
    curl -X GET http://kong:8001/consumers/email}/hmac-auth/26DE073B-7835-48AD-917C-8E9F34E6A217
dndx commented 2 years ago

@bungle @gszr What's your thought on this one? I think you folks encountered issues like this before, what was our solution at the end?

StarlightIbuki commented 1 year ago

Dear contributor, We're closing this issue as there hasn't been any update to it for a long time. If the issue is still relevant in the latest version, please feel free to reopen it. We're more than happy to revisit it again. Your contribution is greatly appreciated! Please have a look at our pledge to the community for more information. Sincerely, Kong Gateway Team