Macaroons
3 min
macaroons are lnd native credentials for direct node access they are separate from voltage team permissions, payments api keys, and infrastructure api keys why they matter anyone with a node endpoint and a usable macaroon can access the node according to that macaroon's permissions access is enforced by lnd and is separate from payments api permissions treat exported macaroons as secrets possession of a usable macaroon can authorize node actions without a payments api key common macaroon types privileged macaroon broad access can perform sensitive actions, including spending funds, according to its permissions read only can view node data but should not spend invoice can create or manage invoice related flows without general spend authority custom baked macaroons permissions depend on what was baked into the macaroon a custom macaroon may be narrow, or it may include permissions that allow funds movement interface authentication for rest, encode the macaroon as hex and send it in the grpc metadata macaroon header for grpc, encode the macaroon as hex and attach it as macaroon metadata store every macaroon as a secret according to its permissions best practices give each integration the narrowest macaroon it needs avoid using admin macaroons in application code keep read only monitoring credentials separate from payment, wallet, channel, and administrative credentials store macaroons in protected server side secret storage do not place them in client applications, source control, logs, screenshots, tickets, or shared notes stop using any macaroon that is no longer needed or may have been exposed, then follow the current replacement and incident response process for detailed lnd commands and permission syntax, use the official lnd macaroon documentation https //docs lightning engineering/lightning network tools/lnd/macaroons