Closed ellemouton closed 1 year ago
cc @gkrizek
happy to add any other helpers in this area that would be useful :) ideas welcome!
i could maybe add a bakesupermac
endpoint?
i could maybe add a
bakesupermac
endpoint?
That would be quite helpful. It was quite complicated and error prone trying to bake the super macaroon with the normal BakeMacaroon API as described here: https://github.com/lightninglabs/lightning-api-ng/issues/19. I think it would also help clarify that there is a difference between the two, which I was unaware of before running into that issue.
@ellemouton, remember to re-request review from reviewers when ready
Ah, just one request: Can we please add the new RPC to one of the itests? Just to make sure authentication and everything works as expected.
Can we please add the new RPC to one of the itests? Just to make sure authentication and everything works as expected.
is this not covered by the existing test for litrpc.Proxy.GetInfo
? since they are both for the same rpc service.
or do you mean that we should use the new endpoint to bake a macaroon in the itests & then test that that macaroon works for other endpoints?
is this not covered by the existing test for litrpc.Proxy.GetInfo? since they are both for the same rpc service.
Ah yes, you're right. So all the security restrictions should apply to the new call as well. SGTM.
This PR adds a few super macaroon related commands:
litcli helper supermacrootkey
command is added which lets a user generate a random root key ID for a super macaroonlitcli helper issupermacaroon
command allows a users to easily confirm if a macaroon is considered a super macaroon or not.litcli helper bakesupermacaroon
can be used to bake a super macaroon.The
supermacrootkey
andissupermacaroon
commands dont require a connection to LiTd.