js-kubo-rpc-client icon indicating copy to clipboard operation
js-kubo-rpc-client copied to clipboard

feat: add ability to export a key

Open SgtPooki opened this issue 10 months ago • 1 comments

Users cannot currently export a key using the kubo-rpc-client API.

There are security risks here with allowing users to export a key, but kubo users can do so via command line. We were asked by a user to allow import+export of a key via UI but there is no way to export a key via the RPC currently.

Note: Depends on changes to Kubo (if this is something we even want to do)

SgtPooki avatar Mar 18 '25 14:03 SgtPooki

The security concern remains, but we have more options now.

We could allow export over HTTP RPC API if (and only if) an API.Authorizations protection exists and applies to both /api/v0/config (so config cant be easily changed) and /api/v0/key/export.

This requires changes to Kubo (afaik key export only works in offline mode where direct filesystem access to the repo is used, and is explicitly blocked over HTTP)

lidel avatar Mar 18 '25 16:03 lidel