unkeyed / unkey

Open source API management platform
https://go.unkey.com
Other
2.87k stars 285 forks source link

Allow setting `recoverable: true` when creating keys in the dashboard #2097

Open chronark opened 4 days ago

chronark commented 4 days ago

Preliminary Checks

Is your feature request related to a problem? Please describe.

if you guys end up implementing the ability to create recoverable keys from dashboard that'd be awesome tho. rn we're iterating quickly and auth is evolving a lot so much faster to work with dashboard to generate test keys than have a million different server functions for generating keys.

also same thing for ownerId vs externalId. rn if I create a key in the dashboard it doesn't add an externalId and ownerId is marked as deprecated all over api docs. so if I try to query based on only externalId any dashboard created keys won't show up bc they're using ownerId

would be great to switch dashboard over to externalId if thats the way forward or at least provide the option to add/modify externalId so api and dashboard work seamlessly together.

Describe the solution

Add a toggle to mark a key as recoverable in the createKey UI CleanShot 2024-09-17 at 09 14 44@2x

The trpc handler needs to be updated as well, the logic can be copied from https://github.com/unkeyed/unkey/blob/36d43366d2c4fad74264c5e9234fceeed1e4afa4/apps/api/src/routes/v1_keys_createKey.ts#L367

Describe alternatives you have considered (if any)

No response

Additional context

No response

linear[bot] commented 4 days ago

ENG-1329 Allow setting `recoverable: true` when creating keys in the dashboard

chronark commented 4 days ago

petrykiw on discord requested this, let them know when it's shipped

harshsbhat commented 4 days ago

Is this a core-team? or can anyone work on this?

chronark commented 4 days ago

go for it

harshsbhat commented 4 days ago

I think this issue will also require the logic to create and integrate an internal package named @unkey/vault. As we will need to this to encrypt keys when they are being created