XSF Discussion - 2023-08-22


  1. opal

    ok now i see a face there

  2. Rdzior

    Hi!

  3. moparisthebest

    Hello

  4. singpolyma

    How common is direct tls s2s support these days? Do we have any sense?

  5. jonas’

    inbound or outbound?

  6. singpolyma

    outbound I think? Like, if I run a server that supports only direct tls s2s with no starttls option can I talk to some people? many people? most people?

  7. jonas’

    I'm not sure if prosody supports outbound direct TLS.

  8. jonas’

    which would be a major share of the netwo rk

  9. jonas’

    which would be a major share of the network

  10. moparisthebest

    It does, which makes at least prosody and ejabberd

  11. lissine

    43% of the servers tested on compliance.conversations.im support direct tls https://compliance.conversations.im/test/xep0368/

  12. moparisthebest

    singpolyma: so I think you'd be able to talk to everyone running prosody 0.12+ and ejabberd (no idea on version)

  13. singpolyma

    lissine: that test is probably c2s though

  14. jonas’

    moparisthebest, with tweaks or with reasonable default config?

  15. lissine

    > lissine: that test is probably c2s though I guess so

  16. moparisthebest

    > moparisthebest, with tweaks or with reasonable default config? I think by default but now I'd have to look

  17. Zash

    Check if you can ping xmpp:xmpps-only.badxmpp.eu

  18. lissine

    Also the servers that are not tested are less likely to have it, since it's not the default on prosody for example. So the real number is less than 43% But the most popular public servers do have it

  19. singpolyma

    Zash: I can, with my defaults prosody 0.12 setup

  20. Zash

    The real number is *much* less than 43% becasue the test is for c2s only

  21. singpolyma

    On a server that didn't support it I guess I'd get the dreaded half-s2s right?

  22. Zash

    singpolyma, plausible

  23. Zash

    XEP-0288 to the rescue?

  24. Zash

    https://github.com/iNPUTmice/caas/blob/master/caas-app/src/main/java/im/conversations/compliance/xmpp/tests/XmppOverTls.java#L44

  25. Guus

    > How common is direct tls s2s support these days? Do we have any sense? Openfire supports it, but there's a bug somewhere that we haven't tracked down yet. I'm hoping that with the rewrite that we're doing, it magically disappears...

  26. singpolyma

    Zash: yeah, but even fewer servers support bidi

  27. Guus

    Openfire does not do bidi at all.

  28. Zash

    Deploy more bidi!

  29. Zash

    I for one enjoy being able to do s2s from my laptop on the go :)

  30. singpolyma

    bidi would solve a few other things for me, but I didn't need to ask if it was an option becaue I know even prosody doesn't by default yet, right?

  31. Zash

    It's included in the latest release but not enabled by default

  32. singpolyma

    maybe in 0.13 ;)

  33. singpolyma

    or dare I call it... 1.0? ;) ;)

  34. Zash

    1.0 delayed another decade

  35. singpolyma

    😂

  36. Zash

    Hm, sampling from the Prosody at conference.prosody.im, I see 60% s2s connections using port 5270

  37. Zash

    60% 5270 39% 5269 and some random other ports

  38. Zash

    Probably skewed by various factors

  39. Zash

    Massaging the data to account for some of that, I get 63% 5269 35% 5270

  40. Guus

    DNS SRV lookups give an even chance of 5270 and 5269 usage?

  41. lissine

    on https://compliance.conversations.im/test/xep0368/ isn't it wierd that it says on July 6th, 60% passed, while on the top of the page it says 43% servers compliant?

  42. Zash

    The *Conversations* Compliance checker moves in mysterious ways

  43. Daniel

    lissine: yes that metric is a bit weird. The graph only shows publicly listed servers. The other one is for all servers we have in our database

  44. moparisthebest

    singpolyma: just curious what's your use case for direct TLS only?

  45. lovetox

    whats the problem with servers not supporting direct tls?

  46. lovetox

    i always thought start tls is the more complicated thing, where you need to upgrade the connection

  47. MSavoritias fae.ve

    is direct tls more secure? because from understanding it should protect from downgrade attacks no?

  48. MSavoritias fae.ve

    since it tries only tls

  49. moparisthebest

    It's not more secure *if* you implement starttls right

  50. MSavoritias fae.ve

    noted

  51. moparisthebest

    But if you allow plaintext connections too then yes it's more secure

  52. moparisthebest

    Modern things that require encryption should implement starttls like "send the plaintext stream header and request to upgrade to TLS, completely ignore plaintext response, start upgrade to TLS"

  53. moparisthebest

    The vulnerability comes from trusting the plaintext response when it says "nah we should just do plaintext instead"

  54. MSavoritias fae.ve

    so the only reason we implement starttls is because compatibility right?

  55. moparisthebest

    Right

  56. MSavoritias fae.ve

    ack

  57. moparisthebest

    Starttls is from a time when the ietf wanted to only hand out 1 port per protocol, and still support encrypted and not encrypted connections

  58. moparisthebest

    It *also* solved the problem the TLS SNI extension solved differently later

  59. moparisthebest

    If anyone designed it today no one would design starttls, but it made sense at the time

  60. MSavoritias fae.ve

    so as usual the tech community wants to die with the old stuff. meh :/

  61. moparisthebest

    tl;dr you can always blame everything on changing requirements :)

  62. moparisthebest

    > so as usual the tech community wants to die with the old stuff. meh :/ Well I don't think so, another decade and we'll be able to turn it off :)

  63. MSavoritias fae.ve

    hopefully. i mean i dont mind things going slow.

  64. moparisthebest

    Actually directtls probably needs a default port before we can do that...

  65. MSavoritias fae.ve

    as long as we get somewhere

  66. MSavoritias fae.ve

    ah right

  67. moparisthebest

    I'd of course suggest 443 but others won't agree :/

  68. MSavoritias fae.ve

    but wouldnt that mean we do directtls over http?

  69. MSavoritias fae.ve

    https*

  70. moparisthebest

    No with alpn port 443 should multiplex appropriately

  71. MSavoritias fae.ve

    ah so we still do xmpp but we hijack the port

  72. MSavoritias fae.ve

    interesting

  73. moparisthebest

    old world: each protocol has a dedicated port, evil networks easily filter ports/protocols they don't like new world: each protocol goes over TLS/QUIC on port 443 with a dedicated ALPN, evil networks with more advanced equipment filter protocols they don't like near future world: each protocol goes over TLS/QUIC on port 443 with a dedicated ALPN using ECH, all protocols look identical to evil networks, screw you surveillance states

  74. MSavoritias fae.ve

    me: can we remove ports? who cares about numbers

  75. MSavoritias fae.ve runs away

  76. moparisthebest

    yea that's the new/future world, no one cares about numbers, everything is 443 :P

  77. MSavoritias fae.ve

    ironically gnunet removed IPs, removed tcp, removed DNS but kept ports oO

  78. lissine

    Idea: XEP-0288 as part of advaced server core compliance in XMPP Compliance Suites 2024

  79. lissine

    Idea: XEP-0288 as part of advaced server core compliance in XMPP Compliance Suites 2024

  80. MSavoritias fae.ve

    wait thats an addon??

  81. MSavoritias fae.ve

    never saw that xep before

  82. MattJ

    I'm mildly opposed to it, but not enough to veto such a move (if we want it adopted, adding it to the compliance suites is definitely sensible)

  83. MattJ

    Not that I'm on council/can actually technically veto such a move :)

  84. MattJ

    MSavoritias fae.ve, XMPP traditionally uses a pair of connections for s2s (incoming + outgoing). So if I send a stanza to you, my server will open a connection to your server and send the stanza over that.

  85. MSavoritias fae.ve

    ah. noted. havent read the standard yet ^^'

  86. MattJ

    XEP-0288 is an optimization that means if you already have an incoming connection from a remote server, you can just use that to send a stanza instead of opening a new connection

  87. MattJ

    It potentially halves the number of open s2s TCP connections

  88. MSavoritias fae.ve

    yeah. why is not adopted then? complexity?

  89. MSavoritias fae.ve

    or maybe its not a big enough optimization for people to care

  90. MattJ

    My problem with it is that it can mask broken setups

  91. MattJ

    As someone just pointed out, it technically allows you to s2s from behind a NAT and have everything work

  92. MattJ

    ...or appear to work

  93. moparisthebest

    > My problem with it is that it can mask broken setups This is also my problem with it

  94. MSavoritias fae.ve

    ah. ok

  95. MattJ

    Everything would appear to work, but if someone tries to message you from a server you haven't already connected to, that will fail and you'll have no idea

  96. moparisthebest

    Server A and server B can have perfectly working connections with conversations.im but won't be able to make a connection between themselves, ugly

  97. singpolyma

    > singpolyma: just curious what's your use case for direct TLS only? moparisthebest: hosting providers that provide automated TLS termination

  98. singpolyma

    > so the only reason we implement starttls is because compatibility right? I honestly prefer starttls I think it's a better solution technically. But HTTP refused so now we have a "standard starttls" called SNI and it's most of what you need in most cases, and it's so popular now (because of http) that many providers do it for you automatically

  99. moparisthebest

    Ah ok you need it then, I was hoping you'd say "I only have 1 port" and I was gonna say "ok then multiplex" :)

  100. singpolyma

    > Actually directtls probably needs a default port before we can do that... Default ports are a historical artifact IMO, we have SRV now

  101. moparisthebest

    Right but we can't just break half the network

  102. moparisthebest

    Someone deployed a server years ago, keeps it up to date, it always just works, they didn't bother creating srv records, now we drop starttls and their server just stops working? Kinda gross

  103. singpolyma

    > As someone just pointed out, it technically allows you to s2s from behind a NAT and have everything work If you're veeeery careful this is an advantage ;)

  104. singpolyma

    moparisthebest: oh, right, I'm not in favour of dropping support for startls or standard port

  105. singpolyma

    But I wouldn't create a new standard port for new stuff

  106. singpolyma

    Just use SRV for new stuff

  107. singpolyma

    Any my proposed direct-tls-only setup will still be able to talk to starttls-only servers. Just so long as they can talk direct-tls on their outgoing leg

  108. moparisthebest

    Right

  109. moparisthebest

    But by "standard port" I mean "try this as a last result if all else fails" and I think that's sensible, I just do it in xmpp-proxy, 443 for direct TLS and quic

  110. moparisthebest

    But by "standard port" I mean "try this as a last resort if all else fails" and I think that's sensible, I just do it in xmpp-proxy, 443 for direct TLS and quic

  111. singpolyma

    IMO if you don't have any direct tls SRV advertised then you don't have direct tls. Falling back doesn't seem advantageous to me. If you want it on 443, add a record that points at 443

  112. moparisthebest

    Keep in mind DNS is trivial to block

  113. singpolyma

    Not if you DoH ;)

  114. MSavoritias fae.ve

    a better question is now though: whats the threat model we are trying to solve :)

  115. moparisthebest

    ie it's perfectly feasible you'd find a network that filtered SRV records but not TLS on 443

  116. singpolyma

    I'm not very concerned about hostile networks that are actively trying to block. But I'm also mostly talking about s2s here where that's very unlikely to be the case

  117. moparisthebest

    It's not much of a "threat model" per-say, but my guiding philosophy is the user always wants to connect to their server no matter what and since there is absolutely no harm to trying hardcoded ports as a last resort, and a chance they might work, just do it

  118. singpolyma

    I'm not against xmpp-proxy doing that, but I don't know that it warrants officially blessing 443 by an XEP

  119. moparisthebest

    I've long threatened/promised to write a "srv best practices" type XEP, maybe it should just go there

  120. singpolyma

    yes, as an informational note in such xep I would support it I think

  121. Zash

    > old world: each protocol has a dedicated port, evil networks easily filter ports/protocols they don't like > new world: each protocol goes over TLS/QUIC on port 443 with a dedicated ALPN, evil networks with more advanced equipment filter protocols they don't like > near future world: each protocol goes over TLS/QUIC on port 443 with a dedicated ALPN using ECH, all protocols look identical to evil networks, screw you surveillance states Congratulations, you handed over everything to OpenSSL.

  122. moparisthebest

    s/OpenSSL/rustls/ :)

  123. lissine

    or libressl

  124. moparisthebest

    No that's just OpenSSL

  125. MSavoritias fae.ve

    (its not)

  126. Zash

    > My problem with it is that it can mask broken setups Moving from Dialback to SASL EXTERNAL already did this, sorta.

  127. lissine

    but it's maintained by openbsd, so not the same

  128. MSavoritias fae.ve

    its not the same codebase either anymore

  129. MattJ

    Zash, it did move things in that direction, yes. But even with EXTERNAL the potential network issues are very visible when they occur. If I can't connect to you, I can't send a message to you. Ever.

  130. MattJ

    With bidi, successfully sending a message to someone no longer means that you can successfully connect to them. So sometimes it might work, and sometimes it might not.

  131. moparisthebest

    lissine, MSavoritias fae.ve: libressl has the same notorious foot gun API as OpenSSL which is 90% of the problem, being written in C is the other 10%, from that perspective they are the same

  132. moparisthebest

    MattJ: what if, when you are the incoming end of a bidi connection, you try to establish an outgoing connection to that server and if it fails you notify the admin of remote server over the bidi connection you have, if successful just close it?

  133. MSavoritias fae.ve

    > lissine, MSavoritias fae.ve: libressl has the same notorious foot gun API as OpenSSL which is 90% of the problem, being written in C is the other 10%, from that perspective they are the same I agree about the C part. I was just pointing out they are not the same :)

  134. MattJ

    moparisthebest: yes, that is a potential enhancement we have discussed and could explore with implementation

  135. singpolyma

    We'll call the XEP bidi: trust but verify

  136. moparisthebest

    I like it

  137. Trung

    Can't we like update the xep and make bidi the standard? Bidi saves a lot of screen real estate.

  138. MattJ

    Trung: what kind of screen real estate?

  139. MattJ

    We're talking about saving TCP connections, which is unrelated to anything you see on your screen, unless you run netstat. And even then any terminal can scroll 🙂

  140. Trung

    ~6inch in the pocket thingy

  141. Zash

    moparisthebest, MattJ: I've tried to do such checks upon connection establishment to verify connectivity (for SASL EXTERNAL half-brokenness actually) but got into loops or deadlocks mostly

  142. matthias

    I guess you all know that images in public anonymous MUCs leak IP adresses so the muc is not anonymous anymore. What do you all think about this behavior?

  143. Zash

    Not great, but if you require user action before loading them it's the same as any URL. We've had talks about providing some proxy clients can fetch things via.

  144. singpolyma

    Anything that isn't inband will leak IP to *someone* unless you use tor