Skip to content

Commit

Permalink
Merge pull request #858 from ellemouton/bakeSuperMacInStatelessV2
Browse files Browse the repository at this point in the history
multi: bake super macaroon during stateless init mode (V2)
  • Loading branch information
ellemouton authored Oct 18, 2024
2 parents 7140714 + a38837d commit 9eb11e2
Show file tree
Hide file tree
Showing 29 changed files with 664 additions and 298 deletions.
4 changes: 4 additions & 0 deletions app/src/types/generated/proxy_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion app/src/types/generated/proxy_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cmd/litcli/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ var litCommands = []cli.Command{
"specified as a hex string using a " +
"maximum of 8 characters.",
},
cli.BoolFlag{
Name: "read_only",
Usage: "Whether the macaroon should " +
"only contain read permissions.",
},
cli.StringFlag{
Name: "save_to",
Usage: "Save returned admin macaroon to " +
Expand Down Expand Up @@ -125,6 +130,7 @@ func bakeSuperMacaroon(ctx *cli.Context) error {
resp, err := client.BakeSuperMacaroon(
ctxb, &litrpc.BakeSuperMacaroonRequest{
RootKeyIdSuffix: suffix,
ReadOnly: ctx.Bool("read_only"),
},
)
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ type Config struct {
poolRemote bool
tapRemote bool

// statelessInitMode is true if LND and LiT are running in stateless
// init mode, meaning that no macaroon files are persisted to disk.
statelessInitMode bool

// lndAdminMacaroon is the admin macaroon that is given to us by lnd
// over an in-memory connection on startup. This is only set in
// integrated lnd mode.
Expand Down
14 changes: 11 additions & 3 deletions docs/release-notes/release-notes-0.13.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@

### Lightning Terminal

- [Fixed a bug due to google-protobuf where a channel with SCID aliases on would cause terminal frontend
to be unable to call the `ListChannels` RPC](https://github.com/lightninglabs/lightning-terminal/pull/850).
* [Fixed a bug](https://github.com/lightninglabs/lightning-terminal/pull/850)
due to google-protobuf where a channel with SCID aliases on would cause
terminal frontend to be unable to call the `ListChannels` RPC].

* Add a new [`litcli bakesupermacaroon`](https://github.com/lightninglabs/lightning-terminal/pull/858)
helper command. This new command can be used either with a LiT macaroon which
has the appropriate permissions or with an LND macaroon which has the
permissions required to call the LND `BakeMacaroon` call. This later case is
especially useful in stateless-init mode where users will not have access to
a LiT macaroon to perform this call with.

- [Convert litrpc package into a module](https://github.com/lightninglabs/lightning-terminal/pull/823).

Expand All @@ -24,5 +32,5 @@
# Contributors (Alphabetical Order)

* Andras Banki-Horvath

* Elle Mouton
* Kevin Cai
Loading

0 comments on commit 9eb11e2

Please sign in to comment.