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

Make passphrases optional in most gRPC methods #1880

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

jrick
Copy link
Member

@jrick jrick commented Oct 19, 2020

Since the client is now authenticated using TLS client certificates,
it is safe to allow gRPC methods to be called and use wallet private
keys even if the request itself does not provide the private
passphrase. For backwards compatibility, keep the existing behavior
when a nonzero passphrase is provided, but do nothing to unlock the
wallet or check the passphrase when it has zero length.

In order for this to be useful, a future commit must add the ability
to lock or unlock the wallet from separate methods. This
functionality already exists for individually-encrypted accounts.

Since the client is now authenticated using TLS client certificates,
it is safe to allow gRPC methods to be called and use wallet private
keys even if the request itself does not provide the private
passphrase.  For backwards compatibility, keep the existing behavior
when a nonzero passphrase is provided, but do nothing to unlock the
wallet or check the passphrase when it has zero length.

In order for this to be useful, a future commit must add the ability
to lock or unlock the wallet from separate methods.  This
functionality already exists for individually-encrypted accounts.
Copy link
Member

@vctt94 vctt94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but decrediton still needs changes on its end for properly dealing with theses scenarios, otherwise we can end with stuck funds, for example, like @alexlyp noted when testing decred/decrediton#2664

@jrick jrick merged commit 2ddcd11 into decred:master Oct 19, 2020
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

Successfully merging this pull request may close these issues.

2 participants