Closed chronark closed 1 month ago
Is this discussed and ready to work? I would like to take this one if its not core team.
no, it's not ready yet, I will remove the needs approval
badge once it is
/assign
Assigned to @syedbarimanjan! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀
Hey @syedbarimanjan I had already solved 20-25% of this issue but was waiting as it had Need approval
tag. Just incase if you decide to drop this issue let me know. I would love to restart working on this. Also if you have any issues I can help with let me know 😊. Good luck!
Hey @syedbarimanjan I had already solved 20-25% of this issue but was waiting as it had
Need approval
tag. Just incase if you decide to drop this issue let me know. I would love to restart working on this. Also if you have any issues I can help with let me know 😊. Good luck!
Hey you can keep working on it i have removed my assignment.
Preliminary Checks
[X] I have reviewed https://unkey.com/docs for existing features that would solve my problem
[X] I have searched for existing feature requests: https://github.com/unkeyed/unkey/issues
[X] This issue is not a question, general help request, or anything other than a feature request directly related to Unkey. Please ask questions in our Discord community: https://unkey.com/discord.
Is your feature request related to a problem? Please describe.
Sometimes you need to know the current config and limits of a key, but using the /v1/keys.getKey endpoint requires a
keyId
, which you don't always have available.Describe the solution
Create a new
POST /v1/keys.whoami
endpoint in /apps/api/src/routes as well as a testcase for it. Then register the handler in /apps/api/src/worker.ts.I suggest copying another handler file and modifying, so you can reuse the basic structure of the openapi validation.
The endpoint must receive the following payload in a
POST
request:and be authenticated via a
rootKey
in theAuthorization
header. The root key must have theapi.${apiId}.read_key
orapi.*.read_key
permissions.It must return the following json payload:
General flow of the handler:
sha256
, there's an internal library for itDescribe alternatives you have considered (if any)
No response
Additional context
No response