mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
lnd+rpcserver: allow external subservers to specify macaroon validator
Give the external subservers the possibility to also use their own validator to check any macaroons attached to calls to their registered gRPC URIs. This allows them to have their own root key ID database and permission entities.
This commit is contained in:
6
lnd.go
6
lnd.go
@@ -145,6 +145,12 @@ type RPCSubserverConfig struct {
|
||||
// per URI, they are all required. See rpcserver.go for a list of valid
|
||||
// action and entity values.
|
||||
Permissions map[string][]bakery.Op
|
||||
|
||||
// MacaroonValidator is a custom macaroon validator that should be used
|
||||
// instead of the default lnd validator. If specified, the custom
|
||||
// validator is used for all URIs specified in the above Permissions
|
||||
// map.
|
||||
MacaroonValidator macaroons.MacaroonValidator
|
||||
}
|
||||
|
||||
// ListenerWithSignal is a net.Listener that has an additional Ready channel that
|
||||
|
Reference in New Issue
Block a user