You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rpc_proxy: special case the handling of BakeSuperMacaroon
In this commit, we special case the handling of BakeSuperMacaroon so as
to allow a user to make use of `litcli bakesupermacaroon` while LiT is
running in stateless init mode. The handling is as follows:
- if the call to _LiT's_ BakeSuperMacaroon is made while in stateless
init mode then we can assume that the macaroon provided is either:
1) an LND native macaroon which may or may not have the
necessary permissions for the _LND_
"/lnrpc.Lightning/BakeMacaroon" call.
2) a baked macaroon (possibly a super macaroon) which may or may
not have the permissions to the _LiT_
"/litrpc.Proxy/BakeSuperMacaroon" call.
For case 1: we check that the provided macaroon has the correct perms.
If it does, then we use LiT's existing connection to LND to bake the
super mac.
For case 2: we have a macaroon that doesnt have LND's bakemac call perms
directly but does have LiT's BakeSuperMac perms. So for this, we treat
the call as normal and verify using LiT's macaroon validator as normal.
0 commit comments