-
Notifications
You must be signed in to change notification settings - Fork 96
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
subserver_perms: add Lnd's registered subserver perms #413
Conversation
a574294
to
f31e7cc
Compare
f31e7cc
to
4007c79
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 LGTM 👌
Thanks for the quick fix.
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.
The code looks like it would work. But to be honest, this adds a lot of new run time timing dependencies which are very hard to follow. See my other comment for a suggestion.
5f74bbc
to
37a657f
Compare
Thank you for the quick review on this @jamaljsr & @guggero 🙏 @guggero: You are completely right - it was definitely getting a bit hard to follow the code. I have taken your suggestion and added a Did it slightly different to how you suggested so let me know if you think this way is fine. |
37a657f
to
9e981e6
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.
Almost there! Looks way better with the permission manager 🎉
In this commit, a new PermissionsManager is added. It handles all the active permissions that Lit has access to. This moves us away from using global variables for permission lists. This change might seem overkill on its own but hugely simplifies the permission management once we add lnd subserver permissions.
9e981e6
to
78812ca
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.
Sorry, found a few other things while adding an itest (sending you my diff out of band)...
78812ca
to
4463324
Compare
In this commit, we let the PermissionsManager manage LND's subserver permissions. Once Litd is connected to LND, it can get LND's build tags and pass them to the PermissionsManager which will then adjust its list of permissions accordingly.
4463324
to
b3ad811
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 🎉
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.
Tested the latest changes. All of the sub-servers are now working in the LNC example app. Thanks so much for working on this so quickly. LGTM 🔥
In this commit, we include all LND's rpc subserver permissions in the permission list used to create the macaroons used in Litd (for sessions etc). The way this is done is a temporary solution while we wait for an LND change that exports the permissions required by each subserver.
Fixes lightninglabs/lnc-web#60
Run alongside lightninglabs/lightning-node-connect#55 to test