Skip to content

invoice macaroon - missing permissions #2236

@ottosuess

Description

@ottosuess

Background

I want to use the invoice macaroon in an application that only allows to receive payments.
Those are the current permissions for the invoice macaroon:

invoicePermissions = []bakery.Op{
	{
		Entity: "invoices",
		Action: "read",
	},
	{
		Entity: "invoices",
		Action: "write",
	},
	{
		Entity: "address",
		Action: "read",
	},
	{
		Entity: "address",
		Action: "write",
	},
}

It is possible to create new addresses, but to check whether a payment was received we also need permissions for "onchain read":

"/lnrpc.Lightning/SubscribeTransactions": {{
	Entity: "onchain",
	Action: "read",
}},
"/lnrpc.Lightning/GetTransactions": {{
	Entity: "onchain",
	Action: "read",
}},

The "info read" permission could also be useful to check whether or not the node is synced or not.

If this is an actual issue I'm happy to make a PR to fix this. Or should i rather try to make my own custom macaroons to address this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3might get fixed, nice to havebugUnintended code behaviourmacaroonspaymentsRelated to invoices/paymentsrpcRelated to the RPC interface

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions