Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BakeSuperMacaroon on startup if it does not exist #910

Open
ZZiigguurraatt opened this issue Nov 29, 2024 · 3 comments
Open

BakeSuperMacaroon on startup if it does not exist #910

ZZiigguurraatt opened this issue Nov 29, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ZZiigguurraatt
Copy link

Is your feature request related to a problem? Please describe.
Would like an easier way to bake a super macaroon.

Describe the solution you'd like
Add a config option to litd that will allow a super macaroon to be baked automatically on startup if it does not already exist.

Describe alternatives you've considered
Use the gRPC or CLI (https://lightning.engineering/api-docs/api/lit/proxy/bake-super-macaroon/) to do it manually after first creating the node. This is annoying because the user needs to coordinate a one time task to determine whether the macaroon exists or not and deal with yet another macaroon to control litd to then create the super macaroon.

Additional context
When using taproot assets, you often need to use both lnd and tapd RPC's and having to manage multiple connections to the same litd instance with multiple macaroons is a nuisance.

When creating docker containers for litd, normally the one time tasks of doing container setup are done in the Dockerfile, but litd does not normally start and create the node data until after the docker container is started and appropriate volumes are mounted. With this paradigm in mind, all other macaroons are automatically created on startup if they do not exist, and the super macaroon is an exception that I don't think we should have to deal with.

@ZZiigguurraatt ZZiigguurraatt added the enhancement New feature or request label Nov 29, 2024
@ellemouton ellemouton self-assigned this Nov 30, 2024
@ZZiigguurraatt
Copy link
Author

Related: I noticed that litcli ln now seems to bake it's own super macaroon in some way. Is this right? Does it create a new super macaroon every time the CLI is used? With litcli ln calls I seem to be able to use them without passing the tapd macaroon. I also saw some error in the log file if I pass the wrong macaroon, it says it can't bake a super macaroon. However, I don't see where it is writing a super macaroon to disk anywhere, so maybe it just discards it at the end of the call. Any idea what litcli ln is doing?

@ellemouton
Copy link
Member

cc @guggero for the question regarding what litcli ln does with respect to super macaroon baking

@guggero
Copy link
Member

guggero commented Dec 11, 2024

Yes, we use connectSuperMacClient to create a super macaroon on the fly just for the connection to tapd (it's not stored anywhere). We can do that if we have access to the lit.macaroon which has that capability.
Though with some of the latest changes, you should also be able to create a super macaroon using the admin.macaroon from lnd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants