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).
This commit is contained in:
Alex authored and Olaoluwa Osuntokun committed 2018-01-31 17:14:49 -08:00
1 parent 20098e8cb3
commit 21c29c33d7
11 files changed
+427 -514

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ import (
"path/filepath"
"strings"
"gopkg.in/macaroon.v1"
macaroon "gopkg.in/macaroon.v2"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/macaroons"