Commit Graph

15 Commits

Author SHA1 Message Date
Rusty Russell
3db50f4796 commando: limit total request size.
1MB normally, but 10MB if you have a cached rune.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
36080d6771 commando: discard collated requests upon peer disconnect.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
7b76bf63ea commando: allow sending of overlength requests.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
fc00ad4183 commando: allow stupidly-long commands.
This is backwards compatible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
5b2dd9a3f6 commando: actually do RPC dispatch async.
We use multiprocessing for this, because the pyln-client RPC
command api doesn't support async.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-03-17 15:52:13 +10:30
Rusty Russell
efaf634f1b commando: make custommsg hook async.
Otherwise it blocks everything while it's working, which can be a
while for a slow command.

Fixes: #347
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-03-17 15:52:13 +10:30
Rusty Russell
d059290f8b commando: minor cleanups to keep flake8/mypy happy.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30
Rusty Russell
692e117959 commando: add unique id as we hand our runes.
This allows us to blacklist them in future.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30
Rusty Russell
ed836894eb commando: update now datastore uses arrays for keys
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30
Rusty Russell
a903208121 commando: don't let readonly default read the datastore.
That... would be dumb, since it holds the master secret!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30
Rusty Russell
05160d4724 commando: remove gratuitous logging.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30
Rusty Russell
b1dace0cd4 commando: don't deadlock if the make us call into ourselves.
For now we only support calling into commando-rune, not chaining commando
commands!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30
Rusty Russell
ad27d4f624 commando: optionally use runes for authorization.
Now it requires the datastore (or datastore.py plugin), if you want
to use runes.  The simple reader/writer control lists don't require
that, but for simplicity we always require the runes Python module.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30
Rusty Russell
c05c8bf300 Feedback from GH Review.
1. Fix README.md dynamic plugin example (needs keywords, abspath!)
   (pointed out by @carnhofdaki).
2. Define magic number we use (suggested by @FreePietje)
2021-09-08 10:11:58 +09:30
Rusty Russell
5d062830ba commando: reckless? Try going commando!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-08 10:11:58 +09:30