jdev - 2020-03-07


  1. lovetox

    if i end a stream correctly, does the server send unavailable presences out?

  2. lovetox

    or do i have to do this myself befor i end the stream

  3. Zash

    Server sends unavailable when the session ends, if it's still available at that point.

  4. lovetox

    hm not sure this answers my question

  5. pep.

    "yes, if the server is not down"?

  6. lovetox

    i send </stream> and end my stream

  7. Zash

    lovetox: the answer is yes

  8. lovetox

    ok thanks :)

  9. Zash

    the server will send unavailable if you don't

  10. lovetox

    ok and its not considered bad by the client to not send it themself

  11. Kev

    I'd consider it daft to do so.

  12. lovetox

    Kev, its daft to send presence themself as client?

  13. lovetox

    or not?

  14. Kev

    Yeah. The server's going to do it for you, so I think it's daft for a client to maintain code to duplicate that.

  15. lovetox

    great, i thought so too :)

  16. Zash

    In theory you can set a status message while you're offline, but I don't think the server is required to keep that.

  17. Zash

    Probably made more sense before always-on mobile clients

  18. pep.

    "always-on"

  19. asterix

    Except if you want to set a good bye status message.

  20. lovetox

    hm yeah true we actually have a good bye message feautre

  21. lovetox

    and im pretty sure servers keep that

  22. Zash

    I'm reminded of the disussions around having status messages in PEP instead of presence

  23. lovetox

    i see that all the time if people leave a muc

  24. lovetox

    and going offline

  25. pep.

    Zash: a "bye message" in PEP?

  26. lovetox

    and of course they have to keep it

  27. lovetox

    its a presence i send, the server does not know that im going to go offline in a sec

  28. Zash

    lovetox: no, they just have to broadcast it

  29. lovetox

    i thought thats what keeping it means

  30. lovetox

    or do you send a second unavailable presence after i send mine and end the stream

  31. lovetox

    i think not

  32. Zash

    Prosody does not keep unavailable presence around after broadcasting them

  33. lovetox

    why would i need the server to store the message?

  34. Zash

    and after that there's no point of generating unavailable on disconect

  35. lovetox

    i told everyone that is online that im going offline

  36. Zash

    I'm not sure I follow what you're saying

  37. Sam Whited

    What if I'm offline when you send that message, you go offline, then I come online? I might also want your status message (which is why it should be in PEP in my opinion).

  38. lovetox

    yeah thats not possible

  39. Kev

    Sam Whited: I have a TODO from the Summit to write presence-over-PEP, BTW.

  40. lovetox

    but thats not a reason to not tell the people who are online and are able to receive it, to not tell them

  41. Zash

    I believe there's a hint in one of the RFCs that the server could keep the last unavailable presence of the last resource and send in response to probes later, but I'm pretty sure it's optional and at least Prosody doesn't do this.

  42. Sam Whited

    Kev: oh that's interesting, I was just thinking about specifics like a status messages being a new thing in PEP, not presence in general and all the other information it conveys. I'll be curious to see that

  43. Kev

    Sam Whited: I mean status/show, really.

  44. Kev

    So <presence/> becomes device information, and PEP becomes user information.

  45. Zash

    https://xmpp.org/rfcs/rfc6121.html#presence-probe-inbound

  46. Zash

    point 3 there has the text I was thinking of

  47. Zash

    PEP is better tho

  48. lovetox

    its just much much more traffic for nearly no gain

  49. lovetox

    previously it was 100 presences on coming online, then its doubled because everybody puts status and show in pep

  50. lovetox

    also its probably fine to have a account wide status

  51. lovetox

    but show?

  52. lovetox

    if i come online i get the last pep info, show = online

  53. lovetox

    but no presence means offline

  54. lovetox

    also there is an information loss, if i see a work pc as away, but the smartphone as online

  55. lovetox

    i can assume a person is not at his workplace right now

  56. Sam Whited

    I'd be okay with that; personally I prefer to treat status as an account thing. You can either reply to messages or not and I shouldn't have to think about what clients are busy and online and away.

  57. Sam Whited

    With carbons and MAM it becomes way less important to have each individual device have more granular status than online and offline.

  58. Kev

    lovetox: I don't think you can assume that at all.

  59. Kev

    I frequently have my phone with me when I'm in the office, but have stepped away from my desk.

  60. lovetox

    thats what i meant with not at your workplace

  61. lovetox

    the desk

  62. Sam Whited

    lovetox: but why would it be marked as away? I suspect most people don't change their status every time they step away from their desk for a few minutes, and they still have their phone on them so it's not like they're going to miss your message if you send them one?

  63. lovetox

    Point is, right now we have the possibility to maintain a show value per client, this is a feature, for some people this is useless, others find it veryuseful, it depends on the circumstances

  64. lovetox

    you want to take this away, and i simply ask, what for, what is the gain we have from that?

  65. lovetox

    Sam Whited, auto away is a thing

  66. Sam Whited

    A much simpler system for users.

  67. lovetox

    If you want to make it simple for YOUR users, nobody forces you to display the show value from each device

  68. Sam Whited

    Who finds it very useful? Are people still sending messages to individual clients?

  69. lovetox

    Sam Whited, its about the information, not about sending messages

  70. lovetox

    A device is autoaway for 20 minutes

  71. lovetox

    thats a device status, and a device show

  72. Sam Whited

    lovetox: I don't understand what people are doing with this information then.

  73. lovetox

    this information is useufl

  74. Sam Whited

    It seems like an anti-feature to me.

  75. jonas’

    it becomes useful once you have to deal with device-to-device communication

  76. lovetox

    you dont have to, point is xmpp offers that information

  77. jonas’

    like jingle file transfers and calls

  78. lovetox

    if you dont want to show it to your users, dont

  79. lovetox

    you dont need a show in pep, to reduce to presence shows to one

  80. lovetox

    you dont need a show in pep, to reduce two presence shows to one

  81. jonas’

    having an account-wide show is also a useful thing though

  82. Sam Whited

    lovetox: it's not just about showing it, it's about setting it. I already do only show one to my users

  83. jonas’

    having a user-controlled account-wide show is also a useful thing though

  84. lovetox

    like all other clients

  85. lovetox

    so i dont see any gain for the user here

  86. Sam Whited

    IMO anything that involves individual clients we should be fixing or getting rid of; eg. Jingle too. If someone sends me a file I should pick what device to receive it on, not them.

  87. lovetox

    now its one, afterwards its one

  88. lovetox

    i see XMPP can deal with multiple devices as a feature

  89. lovetox

    yes its tricky sometimes

  90. lovetox

    yes its not easy for devs to make this easy for users

  91. lovetox

    but its nevertheless a big feautre, that other messengers like whatsapp never had for years

  92. lovetox

    and still to this day its not even near XMPP

  93. lovetox

    i think todays users can be trusted to get the gist of a system with multiple devices

  94. lovetox

    we dont have to treat them as super dumb

  95. jonas’

    I’m not sure that’s true

  96. Sam Whited

    I still really don't see the use case, "having more features than WhatsApp" isn't a usecase, and may not even be a good thing.

  97. Kev

    I'm not sure providing features that make sense is about user being stupid.

  98. lovetox

    im now a few years in very near contact with users of Gajim, and never had even one asked what it means that there are 2 devices listed with different show

  99. lovetox

    and status

  100. lovetox

    Kev what is the feature you are talking about

  101. lovetox

    as we already said, all clients show ONE show value already

  102. lovetox

    moving this into pep, and afterwards showing ONE show value

  103. lovetox

    makes 0 difference for any user

  104. Kev

    Allowing a user to set a status message applicable for themselves, rather than a device.

  105. lovetox

    we talk since 10 minutes about show

  106. lovetox

    not status

  107. lovetox

    but yes i agree, account wide status can be useful

  108. Kev

    And to be able to say that they're "Do Not Disturb" and not have that change because a client that had disconnected suddenly gets a connection again.

  109. Sam Whited

    I probably confused that, I always call that status but I meant online/away/busy not the status message

  110. Sam Whited

    And if you're just asking your users who already use XMPP that's a very self-selecting sample set. We're trying to make the network make sense and be easier for everyone, not just existing XMPP users.

  111. lovetox

    you make it easier in one department, and loss stuff in the other

  112. Sam Whited

    What are we losing? I still don't see any use case for per-device show values. The Jingle one makes sense, but we need to fix jingle not keep this weird state where show is per-device.

  113. lovetox

    obviously the show from each device, if you only have one

  114. jonas’

    > If someone sends me a file I should pick what device to receive it on, not them. how are you going to do that if you’re AFK?

  115. Sam Whited

    Again: what is the use case? I understand *technically* what information is being lost, I don't understand why we care about that information.

  116. lovetox

    but lets leave this for now, i see you dont find it useful so it has to go

  117. jonas’

    will the transfer be stuck until you "accept the call" on one device?

  118. lovetox

    what about the PEP spam?

  119. jonas’

    will you configure a default preference?

  120. lovetox

    how much more info you want to put in different PEP nodes?

  121. Sam Whited

    jonas’: I dunno, we can figure that out later. Completely different discussion

  122. jonas’

    Sam Whited, I find this not completely different, but ok

  123. lovetox

    when i come online, how many MB data do i have to download from the server, just so im up to date with everyone

  124. lovetox

    ?

  125. jonas’

    lovetox, good question!

  126. lovetox

    Put it into PEP, is not a scaleable solution

  127. lovetox

    and we/you should think rather sooner about how to solve this

  128. jonas’

    it’d be more scalable if PEP updates from a single contact were aggregated in a single stanza

  129. Sam Whited

    Oh, is the argument changing to scalability now? The goalposts appear to be moving.

  130. lovetox

    Sam Whited, why is a goalpost moving, if i have multiple points why this is bad?

  131. lovetox

    i respect that you dont share my opinion about show per device is useful

  132. Sam Whited

    The points are changing without actual answers to the previous questions. I agree, we should talk about scalability too though, but I'm less concerned about the technical side of things, we can solve that when we write the XEP.

  133. Kev

    lovetox: The proposal isn't that per-device presence payloads become illegal. Just that they're not used if what you're trying to convey is the status of the user rather than a device.

  134. lovetox

    you cant solve pep scalability by writing another UserStatus xep

  135. Sam Whited

    lovetox: do we know that it's not scalable before we write the XEP? How do we know it doesn't save us a lot of stanzas?

  136. Sam Whited

    For example, let's say we have a system like the original we were describing where status messages work even if the user is offline. If we did that in the current presence based system, every time the user is online they have to do a presence probe for all of their offline contacts. In PEP they just get that pushed down only for contacts that have actually pushed a presence. That probably saves a lot of round trips.

  137. lovetox

    You compare something, nobody actually does, and nobody will ever do (probing offline users) against your PEP proposal

  138. lovetox

    but yeah that would save roundtrips

  139. Kev

    Offline users do get probed when you come online, all your contacts do.

  140. Kev

    That's how you find out that they're offline (or not)

  141. Sam Whited

    Sure, the point is that there are ways it could save us stanzas and we won't know until we figure out how it's used and write the XEPs.

  142. Sam Whited

    Let's take the show example (I'm not suggesting this is how we should do it, I'm just saying that your assumption that it's more traffic isn't necessarily true): if we move show into PEP we could imagine a system where after we come online we get a single presence for only online devices like we get today. That contains the accout status value then *after* that we start getting updates from PEP. Now we have the niceties of device/account information being separated, but still get the same number of stanzas on login

  143. Sam Whited

    Or we could get show from PEP on login and not get presences at all, then probe accounts for devices only if/when we need them lazily. This would likely drastically reduce the amount of traffic on login (I think? Maybe we always need caps right away so this wouldn't work). Again, not suggesting we should do these things, just that "it will increase traffic" isn't something we know yet.

  144. lovetox

    Sam Whited, really you are talking about changing stuff in the whole eco system

  145. lovetox

    we just talked about putting show into PEP

  146. lovetox

    and yes this would double traffic, given all ccontact use this

  147. Sam Whited

    Yes, these are the things putting show in PEP eventually could allow us to do. I'm not suggesting we do them right away or that they're even possible necessarily, just that they're good examples of why "it will increase traffic" isn't a good argument.

  148. Sam Whited

    It might double traffic, or it might make it lesser overall once we start moving more things into PEP.

  149. lovetox

    are we talking about the same thing? you know how PEP works or?

  150. Sam Whited

    We won't know until we think about it a lot more, write the XEP, maybe start getting implementation experience.

  151. lovetox

    PEP says, on +notify, it pushes the last node of every contact, for every node you subscribe to

  152. lovetox

    so yes this is not scaleable

  153. lovetox

    unless you fundementally change PEP / Pubsub, putting more stuff in PEP will increase traffic

  154. Sam Whited

    Maybe "account info" is a node that contains lots of things in one big payload that previously would have been sent by many different presence/message/IQs.

  155. Sam Whited

    Maybe offline nodes are removed and the deletion signals offline (unless we have a feature where we keep a status message around or something). Now we stop getting updates from those and it's basically the same as presence was. There are all kinds of ways this could reduce the amount of traffic sent.

  156. lovetox

    yeah thats thinking about scaleability

  157. lovetox

    and that what we should do before adding more things into PEP

  158. Sam Whited

    Right, which is why I think we can't just say "it will double traffic" without an XEP and possibly implementation experience.

  159. Sam Whited

    I dunno, maybe it's not enough traffic to matter what happens before moving more things to PEP. Or maybe it is. The point is we don't know right now.

  160. lovetox

    i know, Gajim implements every UserPEP Xep there is

  161. lovetox

    and believe me even on accounts with 20 users, this means endless stanzas

  162. Sam Whited

    You're wanting me to argue that it absolutely will reduce traffic, and I'm not arguing that. I'm just arguing that your assertion that it will double traffic may or may not be true and it's not a good argument for why we shouldn't bother to move show/status into PEP.

  163. lovetox

    my assertion was it will double traffic, if you copy UserPEP XEP XY and do the same with status and show

  164. lovetox

    and that was definitly on the mind of everybody when this discussion started

  165. Sam Whited

    Why are you thinking that's what would happen when you haven't read Kevs theoretical XEP?

  166. lovetox

    now we moved the goalpost to, oh yeah that XEP would have to keep scalability in mind

  167. lovetox

    and im fine with that :)

  168. lovetox

    Kev can share it and prove me wrong, im happy if we have good solutions for problems

  169. Sam Whited

    Anyways, I shouldn't have let myself be drawn into pivoting this into a technical discussion. We're not there yet. My argument is that we need to think about use cases and users, and I don't see one for how the existing system works.

  170. lovetox

    also MUC incompatibility with PEP is a problem since a longer time, dont know if we have the same problem with MIX

  171. Sam Whited

    I sometimes think that we need to treat the public network as a service when we're writing XEPs. Maybe we need a Jabber product manager (or product mangaer committee) who puts together a cohesive vision for what the Jabber Service should look like in the future, and then decides if XEPs guide us towards or away from that.

  172. Sam Whited

    Yah, MUC would definitely have to be thought about, that's always tricky. Still though, that's all a ways out and isn't an argument for why we shouldn't write the XEP. It's definitely worth thinking about while writing it.

  173. Sam Whited

    Anyways, I need to step out now and get ready to leave. Please think about use cases. I'd really like to know if there actually is one for the current system.

  174. lovetox

    is it possible from the outside to see that a websocket connection is a xmpp connection?

  175. Zash

    Based on looking at the TLS connection? Probably not easily.

  176. lovetox

    as i understand websocket, first a normal HTTPS connection is made

  177. Zash

    Timeing information might leak that it's not following the common request-response pattern of HTTP

  178. lovetox

    then within that the protocol is upgraded to websocket

  179. Zash

    Yeah

  180. lovetox

    ok so if i want to conceil the fact that its an xmpp connection, this is probably a safer bet than xep0368

  181. lovetox

    we announce a protocol xmpp-client with 0368

  182. lovetox

    is this transfered in plaintext, within the tls negotiation

  183. lovetox

    or afterwards is the question

  184. Zash

    ALPN is sent in plain text in the beginning of the TLS handshake

  185. lovetox

    yep so trivial to see that its an xmpp connection

  186. moparisthebest

    Unless you don't send it, it's not mandatory, if you need to conceal this you should not send it

  187. moparisthebest

    Same with SNI

  188. Zash

    Can't get around the certificate being returned in the clear tho.

  189. moparisthebest

    Though encrypted SNI is almost here, I expect encrypted alpn to follow shortly

  190. moparisthebest

    Zash: iirc that's fixed already in TLS 1.3 ?

  191. Zash

    Dunno

  192. lovetox

    hm if i dont send the protocol than a webserver also running on 443 will not know that i want to talk to the xmpp server or?

  193. lovetox

    i think i ran into that problem early in my implementation

  194. moparisthebest

    > The difference is that in TLS 1.3, a lot less is in the clear. For example, in TLS version 1.2 you were able to witness the disclosure of the Subject Alternative Name (SAN) in the Certificate but in 1.3, this is encrypted and not made available for inspection by any intermediate system.

  195. moparisthebest

    From our favorite company https://blogs.cisco.com/security/tls-version-1-3-change-is-here-and-encrypted-traffic-analytics-has-got-your-back

  196. moparisthebest

    lovetox: depends on how the server is set up, maybe, maybe not, that's why it's important you keep trying all the SRV records

  197. moparisthebest

    Unless you must not be detected of course, in which case you abort

  198. lovetox

    hm problem is when connection succeeds i will not try others

  199. lovetox

    maybe i should wait for the first <stream> to make that decision

  200. moparisthebest

    Yep absolutely

  201. moparisthebest

    Also if TLS verification fails you should keep trying

  202. lovetox

    eh actually im in the camp to not shadow a badley setup server with various workarounds

  203. moparisthebest

    I haven't had problems with gajim, but dino won't connect to my server unless I patch out their xep 368 module because of that error

  204. moparisthebest

    You aren't, you are allowing easy DOS

  205. lovetox

    if a cert verify fails, why would it not fail on a other connection method?

  206. lovetox

    can you give me the address of your xmpp server so i can try if it works in my new code?

  207. moparisthebest

    Any mitm can accept a TCP connection

  208. moparisthebest

    lovetox: mitm ?

  209. lovetox

    a mitm that only mitm on one connection method?

  210. moparisthebest

    burtrum.org , feel free to poke, so if you don't send alpn over ipv4 you'll end up taking to nginx

  211. moparisthebest

    lovetox: absolutely? Plenty of ways, v4 vs v6, servers in different datacenters

  212. moparisthebest

    Maybe captive wifi is only set to mitm 443 not 5223

  213. moparisthebest

    Basically your code should never stop trying based on anything an attacker could cause

  214. lovetox

    but this is too complex

  215. lovetox

    cert on my server is expired

  216. lovetox

    i dont care, gajim shows me the error, i tell it to connect anyway

  217. lovetox

    trying everything first and remembering the first cert fail, then if everything fails coming back to that and offer the user to connect anyway

  218. lovetox

    really dont want to implement that

  219. lovetox

    also if you assume every cert fail is an attacker

  220. lovetox

    then you simply cant connect to a server anymore that has no valid cert

  221. lovetox

    which is also a choice i want to give to the user

  222. lovetox

    i can connect fine to your server btw

  223. lovetox

    also i dont see it as my responsibility to make Gajim into a tool that can withstand a DOS

  224. lovetox

    attack

  225. pep.

    lovetox: if you remember the cert you might allow the user for some more time.. I always find this weird tbh, this expiry thing. Tge cert expired but you're still connected so you don't care, even if it's been a week already, and when you reconnect you (the client) is like "omg the world is burning"

  226. lovetox

    yeah i also fail to see how a expired cert is suddenly insecure

  227. lovetox

    if its expired for 2 years

  228. lovetox

    ok an attacker had plenty of time to attack that cert

  229. lovetox

    but a week? ..

  230. pep.

    I guess it mostly shows how much the admin is active :p

  231. pep.

    or how skilled in cron they are!

  232. moparisthebest

    Right but I want gajim to connect from sleazy free WiFi if possible, not give up on first mitm or blocked port

  233. moparisthebest

    That entirely defeats the purpose of srv

  234. Zash

    I don't think SRV was invented as a way to avoid MITM or blocks

  235. lovetox

    wait, blocked port is different story

  236. lovetox

    Gajim will try until it has a successful connection with the host and port gathered via SRV

  237. moparisthebest

    A mitm can accept a TCP connection though

  238. moparisthebest

    You shouldn't give up until you have cryptographic proof you can't successfully connect to the server

  239. Zash

    prove a negative?

  240. moparisthebest

    Like, they provide a proper cert and then reject you with bad password, for instance

  241. moparisthebest

    And srv explicitly was invented to prevent dos, one service is down or unreachable or misconfigured, try the others

  242. Zash

    Where does it say that?

  243. moparisthebest

    What other purpose could it possibly have? Otherwise just use a well known port like http

  244. Zash

    RFC says it's for moving services and designate backup servers. There's one mention of "denial of service", in the context of SRV being used *for* it.

  245. moparisthebest

    Don't need backup servers if nothing can go wrong at your primary

  246. moparisthebest

    If something can go wrong though, why not try the backup

  247. defanor

    FWIW, that's the thing that bothered me about both "happy eyeballs" and looping through SRV records too: there can be scenarios in which a connection is possible, yet a client would fail to connect while following those. But fighting potential DOS via an unknown MITM (or poor connectivity) seems like a rabbit hole: even if you succeed in establishing a TLS connection, a MITM or a poor network could simply start dropping packets after

  248. defanor

    passing a few.

  249. moparisthebest

    That's fine, xmpp works fine over those kind of networks