does a mean to know how many devices are sharing an account exists?
You mean your account? Or from someone else?
For your account, you have the list of linked devices.
For another account, no, except if you’re using JAMS where the admin can see devices per account.
Or maybe how many are alive “now”?
Yeah actually, this can be retrieven by reading the DHT to get how many devices are present per peer. It’s shown in the log (if you send a message/call you will see how many times it’s encrypted), or can be partially seen in the Troubleshoot section where you see to what devices you are currently connected.
is it possible to forbid more than one device to own a given account?
Not really. A user can log in with the correct information where they need to. If they connect correctly, with correct keys, it will create a new device. The “only” scenario possible would be to use JAMS and just return invalid credentials whenever a user try to login a second time if they got a non expired device.
If the list of linked devices is in the account details in jamid, I suppose I can check there if the list has more than one item to answer question 1a.
I will have a look if I can talk to the DHT from my app…
For question 2, I understand I cannot achieve this with jamid but I could implement the behavior in my client if response from question 1 is greater than one…
We plan to use jamid (custom DBus client) within our team with strict rules. For instance we want to restrict access to a single device per account and raise a security alert if a second device is detected for any account!
The encompassed scenario is that maybe the jami credentials were stolen from a device when unattended (or by any other means) to be able to spy on a user… Or an insider leak…
With a custom client we will know creds were shared; someone using the creds from official client will not have the info we have. That’s perfect!
if you want to control account management maybe jams is more interesting than a hacky way.
And enforce rules there.
Else yeah, API is fine. And you will have to do a modified client or build the dbus version and listen for the signal (you can find it via d-feet in Account manager. I’m on mobile and don’t want to check this right now).