You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtl: RTL gets lnd's admin macaroon and an unrestricted clightning rune instead of scoped credentials #261
Follow-up to #151. #258 stops RTL from sending its credentials to another server on a backend's port. RTL itself still gets full admin access to both backends.
What it gets now
lnd: rtl-copy-macaroon copies lnd's admin.macaroon for RTL (modules/rtl.nix:289 on master f91deeaf).
clightning: rtl-create-clnrest-rune-file copies clnrest's admin-rune, which has no restrictions (modules/rtl.nix:299).
BTCPay Server and charge-lnd get their own macaroon from services.lnd.macaroons, with only the permissions they use. RTL doesn't.
Why it matters
Whoever controls the RTL process has full control of its backends. So does anyone who exploits a bug in RTL or Node before login, like #121. The admin macaroon also lets its holder bake new macaroons with any permission.
Fix
Add RTL to services.lnd.macaroons with the permissions RTL's features use, and point macaroonPath at that macaroon.
Create a rune for RTL with restrictions that match the clightning methods it calls.
RTL opens and closes channels and sends payments and on-chain funds, so it needs write access. The work is to find which lnd and clightning endpoints RTL calls (backend/controllers/lnd and backend/controllers/cln in RTL's source) and drop the rest, for example macaroon management.
Activity
rtl: pin the TLS certificates of lnd and clnrest (#258)
rtl: give RTL its own lnd macaroon and clightning rune
rtl: give RTL its own lnd macaroon and clightning rune
rtl: give RTL its own lnd macaroon and clightning rune
rtl: give RTL its own lnd macaroon and clightning rune
rtl: give RTL its own lnd macaroon and clightning rune