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
rpcproxy: pass the bake-mac call directly to LND if in stateless mode
In this commit, we force the permissions manager to see the
BakeSuperMacaroon call of LiT as whitelisted. This means that when the
initial call comes in, the `LightningTerminal.ValidateMacaroon` method
will return early and not validate the call (which would fail in
stateless init mode since LiT does not have a macaroon service in that
case). So the call ends up going through to the rpcProxy's
BakeSuperMacaroon method. Here we now have the following flow:
- if the request does not have stateless_init set, then we keep the flow
as it was:
1) Use the lit mac validator to check that the call is allowed
given the required permissions of `BakeSuperMacaroon`.
2) if it is, then use the existing connection to LND that Lit
has to do the macaroon baking call.
- if stateless_init mode is set, then we do the following:
1) we extract the macaroon from the call (this should be an LND
macaroon)
2) we create a new connection to LND using this provided
macaroon.
3) use this connection to LND to bake the macaroon.
0 commit comments