Commit Graph

11 Commits

Author SHA1 Message Date
Oliver Gugger
cd8a21c4b8 walletunlocker: pass unlocked wallet back to lnd to avoid double unlock 2018-06-12 19:27:57 -07:00
Wilmer Paulino
58a3419283
lnd+walletunlocker: implement ChangePassword RPC 2018-05-31 17:24:00 -07:00
Wilmer Paulino
b32e0ced45
lnd+walletunlocker: remove macaroon dependency from UnlockerService 2018-05-31 17:23:57 -07:00
yohei okada
a15c6e5b04 walletunlocker: use KeyDerivationVersion for generating cipher seed
Replace hard coded internal version with KeyDerivationVersion specified
in keychain package.
2018-05-22 17:39:14 +09:00
Conner Fromknecht
f8c0357770
walletunlocker: accept recovery window from InitWallet 2018-04-26 16:03:09 -07:00
Olaoluwa Osuntokun
428693cb6e
walletunlocker: modify service to implement new 2-step wallet creation
In this commit, we extend the UnlockerService to account for the new
changes in the lnrpc definition. Setting up the daemon for the first
time is now two step process: first the user will generate a new seed
via the GenSeed method, then the user will present this new seed (and
optional pass) to the InitWallet method which then will finalize the
wallet creation.

This two step process ensures that we don't commit the wallet changes
in the case that the user doesn't actually "ACK" the new seed.

In the case that the user already has an existing seed, they can
re-enter it and skip straight to the InitWallet step.

We also update the tests to account for the new API changes.
2018-03-05 11:07:06 -05:00
Alex
de6efbd1a1 multi: macaroon root key encryption 2018-02-05 21:44:06 -08:00
Alex
21c29c33d7 multi: upgrade macaroons to v2, replace per-method auth with interceptors
This commit reworks the macaroon authentication framework to use the
v2 macaroon format and bakery API. It also replaces the code in each
RPC method which calls the macaroon verifier with interceptors which
call the macaroon verifier instead. In addition, the operation
permissions are reworked to fit the new format of "allow" commands
(specifically, entity/operation permissions instead of method
permissions).
2018-01-31 17:14:49 -08:00
johan
92f4f4fbda
walletunlocker: check that password is at least 8 characters 2017-11-29 17:30:56 +01:00
Olaoluwa Osuntokun
08940b43d5
walletunlocker: don't utilize the macaroon authentication service
In this commit we remove all instances of the macaroon authentication
service from the UnlockerService struct. We do this, as in the future,
the macaroons themselves will be encrypted using the user’s passphrase,
therefore we wouldn’t be able to _verify_ the macaroon unless the
wallet itself was encrypted.
2017-10-19 19:46:48 -07:00
Johan T. Halseth
b7ba2697c8 walletunlocker: add package walletunlocker
The walletunlocker package contains the UnlockerService, which
implements the lnrpc.WalletUnlocker interface. This service is
used for receiving a password from the user over RPC, and doing
simple validity checks like making sure the user is not trying
to create a new wallet if one already exists, and that in case
the wallet exists, the provided password is correct.

The service will the pass the passwords over the CreatePasswords
or UnlockPasswords channels, for use within lnd.go.
2017-10-19 19:17:35 -07:00