-
Notifications
You must be signed in to change notification settings - Fork 95
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
Support super macaroon in remote lnd mode #319
Conversation
067b184
to
4769c74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a first pass, will do a better pass tomorrow but leaving some questions in the mean time
4769c74
to
4929f60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK! looking gooooood! left some comments. Most are just questions to better my understanding of everything
4929f60
to
ee26fd2
Compare
Thanks a lot for the review, @ellemouton! I rebased and fixed the things you mentioned. |
ee26fd2
to
705af86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🔥
705af86
to
7a31a57
Compare
To avoid the macaroon parsing to fail in session.IsSuperMacaroon(), we want the dummy macaroon to be formally valid (meaning, it can be parsed) but not actually valid (meaning, it will fail the signature verification since we don't have the root key for it anywhere).
If a daemon is running in remote mode, we need to convert a super macaroon into the daemon specific macaroon before sending it to the remote daemon, since the super macaroon is issued by lnd and can only be validated by lnd's macaroon root key.
7a31a57
to
c3ff7e4
Compare
Part of lightninglabs/lightning-node-connect#17.
Depends on #294 and #292, only the last 9 commits are new.
Can be tested locally by baking a super macaroon with:
And then interact with one of the daemons: