hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

Let the server decide of the resource #155

Open Ppjet6 opened 7 years ago

Ppjet6 commented 7 years ago

At the moment it is not possible to configure jackline to connect without a user set resource. It would be nice to be able to let the server set it.

hannesm commented 7 years ago

why? I so far failed to find a reason why you'd want to have the server setting the resource!? if you have a convincing example, I'm willing to reconsider.

hannesm commented 7 years ago

I can see that there are valid use cases for having the server setting the resource (and the server has, according to the spec, always the opportunity to decide on the client resource while connecting anyways). This should be implemented.

cfcs commented 7 years ago

This issue came up in a discussion where a person had copied a jackline config to two separate devices. Not having changed the resource, the two jackline instances would go into a loop of kicking each other (replacing each other's sessions) on the server.

Proposal: We could also just pick a random resource on jackline start (we would want to keep the same resource for a session so that we don't invalidate our OTR sessions when we reconnect after a disconnect). That way we don't have to rely on the server to implement anything (and don't have to spend time on parsing yet more stuff ... and error handling).

Ppjet6 commented 7 years ago

On 2017/04/10, cfcs wrote:

This issue came up in a discussion where a person had copied a jackline config to two separate devices. Not having changed the resource, the two jackline instances would go into a loop of kicking each other (replacing each other's sessions) on the server.

Proposal: We could also just pick a random resource on jackline start (we would want to keep the same resource for a session so that we don't invalidate our OTR sessions when we reconnect after a disconnect). That way we don't have to rely on the server to implement anything.

https://tools.ietf.org/html/rfc6120#section-7.6 From the RFC, the server MUST be able to generate a resourcepart anyway.

-- Maxime Buquet