lightninglabs / lightninglabs/lightning-api-ng

Bake Macaroon root_key_id can't just be a positive number.

Open
#19 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
6
Forks
7
PR merge metrics
No merged PRs in 30d

Description

When trying to use a Macaroon generated by the BakeMacaroon API, failure can occur if using a root_key_id < 18441921392371827000 ([4]byte starting with {0xFF, 0xEE, 0xDD, 0xCC}).

When using a macaroon with permissions for Loop, Pool, Faraday, and Litd that was baked with a root_key_id matching the above condition, AND calling an rpc from these services, an error is returned: "proxy error with context {rpc service}: invalid macaroon: macaroon service not yet initialised". LND rpc services can still be used with this macaroon.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the BakeMacaroon API and trace how a root_key_id beginning with {0xFF, 0xEE, 0xDD, 0xCC} is handled before RPC authorization. Reproduce the case using permissions for Loop, Pool, Faraday, and Litd, then verify those RPCs accept the macaroon while existing LND RPC behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.