Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement - Add optional seed parameter to /wallet/did/create #606

Closed
Sarangc1203 opened this issue Jul 14, 2020 · 2 comments
Closed

Enhancement - Add optional seed parameter to /wallet/did/create #606

Sarangc1203 opened this issue Jul 14, 2020 · 2 comments

Comments

@Sarangc1203
Copy link

#50 asked about having an API to generate a DID - from a random seed. #178 added a ledger endpoint for nym registration. So when trying to implement an onboarding system for most of the use cases, it would be logical to give an option to generate DID by using a seed.

Use case:
An organization that did not choose to register its DID when it started the agent, in future, may want to register its DID. Now since we have an option to generate the DID from seed (at the time of firing up the agent), I would expect that I get a similar option through /wallet/did/create afterward too. That organization will generate its public DID by using a specific seed. And then ask the TRUSTEE or STEWARD to register its DID using /ledger/register-nym.

Possible solution:
For the /wallet/did/create, take an optional input for seed (which when not provide will generate random DID). The fix seems simple enough. In routes.py, create_local_did() is called without any parameters. But basic.py supports a 'seed' parameter.

@swcurran
Copy link
Contributor

The devs will likely chime in, but this shouldn't be done because this is the equivalent of sending a private key over an HTTP connection. Reasonable to do on a sandbox test network, but a very bad idea in production.

@sklump
Copy link
Contributor

sklump commented Jul 15, 2020

The admin API purposefully leaves seeds off the wire, exactly as @swcurran writes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants