-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPC locking #3303
Comments
That seems like a good first locking plugin. You'd probably just need to have a single boolean flag It is a bit coarse grained since there is no real concept of identity of a caller, and you'd either unlock all RPC callers or none. I'm assuming here that you're not planning on having something like a cookie that'd re-authenticate callers as the one that unlocked it previously. Is that correct? With a more fine-grained control using username/password authentication, cookies, or even more flexible schemes like macaroons you could control permissions per user, allow delegation and other things, but for a first PoC I think the binary locked/unlocked plugin is a great start. |
Thanks for your feedback.
You do. About the fine grained auth and the bakery, I think it would be better for a higher level API, as I assume it would be useful for an exposed one ? |
Thinking more about this, we currently don't have any authentication mechanism for plugins themselves. One could impersonate a plugin by just writing on its Is an authentication challenge for some plugins something we would ? EDIT: It's straightforward to authenticate |
Yes, plugins are pretty much trusted at this point. If a plugin is compromised it can move freely. I was playing with the idea of having a If we really wanted a bullet-proof solution I think running the plugins in a seccomp context and restricting their interactions with the rest of the system to just the its stdin and stdout might be nice, but that's a whole load of new things we'd need to plumb through, unless we create the runner |
The best I could come up with would be a basic ECDH between the proxy and That would be useful for RPC locking, but I wonder if it's not overkill ? |
That seems like overkill. I was talking about the plugin itself being compromised, so any kind of authentication that could be done by a plugin can also be done by an attacker. And I can't see how that could be changed. Anyway, I think at this point what we'd really want to do is have an authenticating proxy that relays incoming requests to a socket only it can access, rather than intercepting the JSON-RPC commands after they went through the plugin dispatch. Much easier and you can enforce arbitrary policies based on the origin of the request.
|
Ok
Fwiw I was thinking that could rely that the auth would be done only once (static plugin), at startup. The auth could not be replaced after startup since |
With #3129 and #2925 merged I'm thinking about finally implementing wallet locking, but I want to reach an agreement upon the design before implementing it.
In Berlin @cdecker and @rustyrussell (iirc) were in favor of the addition of an authentication field to the jsonrpc requests.
I'm still thinking that it should just be a local-only
lock
andunlock
mecanism "ala" bitcoin-core (though of course it's not the same security model at all..).What do you think ? Is there something I missed which makes the
lock
andunlock
way not a good idea ?The text was updated successfully, but these errors were encountered: