-
Notifications
You must be signed in to change notification settings - Fork 516
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
Allow use of SEED when creating local wallet DID Issue-1682 #1705
Conversation
Signed-off-by: DaevMithran <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1705 +/- ##
==========================================
- Coverage 95.29% 95.29% -0.01%
==========================================
Files 528 528
Lines 32933 32939 +6
==========================================
+ Hits 31385 31389 +4
- Misses 1548 1550 +2 |
This looks good!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being too late with my review, but added some nits.
if context.settings.get("wallet.allow_insecure_seed"): | ||
seed = body.get("seed") or None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to throw an error if a seed is provided and wallet.allow_insecure_seed
is not enable to make it more clear to the end user the seed is not used. This can give the false sense the seed is being used to create the did.
@@ -355,13 +355,20 @@ async def wallet_create_did(request: web.BaseRequest): | |||
f" support key type {key_type.key_type}" | |||
) | |||
) | |||
seed = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The seed property is not added to the DIDCreateSchema
making it harder to discover from the swagger ui and it won't be included when generating clients from the swagger file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should advertise the seed
parameter unless the startup parameter is set.
So we need to either make the seed
optional based on the parameter (i.e. doesn't show in swagger if not set), or else we need to break out a separate endpoint that is enabled with --wallet-allow-insecure-seed
Some questions around