Open etlweather opened 2 years ago
You are right, that flag isn't exposed yet. But instead you could list all identities via the GET request, iterate over them and you use the trust
endpoint (with the trust_all_known_keys
flag set to true
) to trust all identities. Would that work for your use case or is there a specific reason you would prefer the --trust-new-identities
flag over the identities
endpoint?
We are doing this for right now, but it is not optimum for us because it means the first message sent in with a new key does not decrypt. We then have to tell the sender to send their message again (after we trusted the new key). It make sense security wise but in reality, all the users do is trust the new key regardless.
I see. I'll have a look (but it probably takes a bit)
I think I should be able to have a first version ready in the next few days. Unfortunately this feature is a bit of a pain to test. Do you have a setup where you can easily test this & could you help with testing?
That's great. I can definitely help testing.
There's now a docker image available for testing: bbernhard/signal-cli-rest-api:0.107-dev
The sourcecode can be found in the trust_mode git branch.
The trust mode can be set with the [post] /v1/configuration/<signal number>/settings
endpoint. (you only need to set it once per registered signal number; the settings will be persistently stored on the filesystem). Once it is configured, the trust mode will be appended to every signal-cli
invocation.
Awesome. We're going to give it a go. Will let you know.
@bbernhard I am helping @etlweather with this and ran this through the scenarios that were previously causing trouble and this seems to be resolved with this update. Thank you very much.
Cool! Many thanks for testing! I'll merge the changes then into the master branch - so it will be included in the next productive release.
I realise that this is an old ticket but I recently had to solve exactly this problem and while I haven't actually tested it yet I was able to edit the mode as described. If this was incorporated into the code then maybe this ticket can be closed? Or are you waiting on something?
Feature Request
Per the
signal-cli
documentation, one can run it with--trust-new-identities TRUST-MODE
. I would like to be able to pass this parameter such thatsignal-cli-rest-api
callssignal-cli
with it set.I can't find how to do that. I looked at the code and I am pretty sure it can't be done as it is right now.