Commit Graph

16 Commits

Author SHA1 Message Date
Oliver Gugger
c3227057f4
macaroons: allow external validators to be registered
When external subservers register themselves to be served through the
same gRPC interface as the main lnd RPC, their requests are also
intercepted by the main lnd macaroon interceptor.
If the external subservers want to use their own macaroons that are
independent of lnd's, they need a way to overwrite the default validator
of the macaroon interceptor. We add this mechanism with the concept of
external validators.
2020-09-10 10:24:09 +02:00
Oliver Gugger
d4c4cf01f0
lnd+macaroons: specify location when creating macaroon service
To allow the macaroon service to be used in other projects, we want the
location to be passed in as a parameter instead of being hard coded.
2020-09-10 10:24:08 +02:00
Oliver Gugger
6d201ef4fc
macaroons: add special permission entity for URI specific permissions
To make the permission system even more fine-grained, we want to allow
users to specify exact gRPC URIs in the macaroon permissions instead of
just broad entity/action groups.
For this we add the special entity "uri" which allows an URI specific
permission to be defined as "uri:/lnrpc.Lightning/GetInfo" for example
instead of the more coarse "info:read" which gives access to multiple
URIs.
2020-09-04 09:22:35 +02:00
yyforyongyu
f362f7670b
macaroons: specify root key ID in bakery 2020-08-11 19:17:48 +08:00
Olaoluwa Osuntokun
852b2380a9
macaroons: convert to use new kvdb abstraction 2020-03-18 19:35:04 -07:00
Lars Lehtonen
a22adc4a8e
macaroons: stdlib context 2019-09-28 16:10:57 -07:00
Olaoluwa Osuntokun
1fd3aac925
multi: switch from bolt packge to bbolt package for all imports 2018-11-29 20:33:49 -08:00
Olaoluwa Osuntokun
06d5f2db37
macaroons: update line folding to project style 2018-11-28 20:57:07 -08:00
Wilmer Paulino
856500dc43 macaroons: ensure path for macaroon DB exists
Co-Authored-By: Karl Ranna <karl@karlranna.com>
2018-08-23 18:05:00 -07:00
Wilmer Paulino
fc6505a0ff
macaroons: export db filename 2018-05-31 17:23:59 -07:00
Oliver Gugger
f22b0ccdbc macaroons: fix incorrect comparison in isRegistered, wrap long lines 2018-05-18 10:14:06 +02:00
Olaoluwa Osuntokun
800eea931f
build+multi: switch from bolt to bbolt
In this commit, we switch from boltbd/bolt to coreos/bbolt as the
former is no longer being actively maintained.
2018-03-10 19:01:13 -08: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
Olaoluwa Osuntokun
bb59a6e6e9
macaroons: expand doc strings and comments within package 2017-08-22 00:52:48 -07:00
Alex
662731e719 macaroons: add macaroons package and update glide 2017-08-17 19:20:41 -07:00