lightning
lightning copied to clipboard
Enhance `createrune` to support restrictions for the RPC's `readonly` category as well
When creating a rune, restrictions will be applied based on the category of the RPC method it grants access to.
For example:
-
If an RPC method belongs to the "readonly" category, a rune with category restrictions will be permitted to access it.
-
However, if an RPC method does not fall under the "readonly" category, a rune with such restrictions will not be allowed to access it.
This involves:
- Getting access to category info
- Plugins have this I think? May need to expose it.
- Builtins have this in documentation, we can extract this for rune enforcement?
- Figuring out how to specify this in runes! "category=?" I guess
- Figuring out a backwards compat story: do we try to map the old "readonly" attribute onto this, or only for new runes?