XSF Discussion - 2022-01-27


  1. moparisthebest

    It's not used, because it's impossible to upgrade hashes

  2. moparisthebest

    The only people that could move to new scram are already using plain and for a reason

  3. emus

    It does not mean its okay to do so in other repositories...

  4. Guus

    Does anyone have experience with device binding?

  5. flow

    Guus, device binding?

  6. Guus

    allowing an account to be used by authorized devices only.

  7. mjk

    Like, authenticate with a cert?

  8. Guus

    I'm unsure what implementation is appropriate (which is why I'm asking).

  9. mjk

    Well, forcing certificate-based auth for an account and whitelisting a list of certs would be one way, I guess

  10. mjk

    One device = one cert

  11. mjk

    Or copy the key over every authorized device. Less secure, obviously :)

  12. mjk

    Don't have any expirience though, even client-side. Conversations is one of the clients supporting cert login

  13. dwd

    Guus, Do you mean "device" or "client" here?

  14. Guus

    dwd: device

  15. Guus

    (separately, 'client' make/model/version would be interesting too)

  16. dwd

    Guus, OK. Can this be *any* device? As in, BOYD phones can be authorised devices?

  17. dwd

    Guus, And if they uninstall and reinstall the client does this invalidate or maintain the authorisation?

  18. Guus

    dwd: none of this has been specified (yet).

  19. Guus

    I know that my client/customer is producing it's own hardware, so I can make guestimates - but on the other hand, I'd like to gain understanding of how such a feature could work in a broarder sense.

  20. Guus

    (I'm not sure if "produce own hardware" is more than "ship phone to factory to have its casing engraved", but alas)

  21. jonas’

    if we're really talking devices, then some TPM magic might do

  22. dwd

    Well, if we're talking Android custom spec devices, then many of those have the capability for an HSM on them, so you've got a device private key you can then authorize via an X.509 route.

  23. dwd

    As jonas’ says, there's TPM on other platforms, which I know less about.

  24. jonas’

    isn't TPM a special implementation of an HSM?

  25. dwd

    Guus, FWIW, Apple devices have the same HSM capability, and some Apple services authorize via presenting an X.509 cert signed by Apple's CA.

  26. dwd

    jonas’, Plus other bits I think? As I say, not really something I know much about.

  27. jonas’

    possibly

  28. jonas’

    I only looked into the API spec briefly

  29. dwd

    jonas’, But yeah, having a private key feels likely there too. In which case the manufacturer can sign it with a CA (doesn't need to be a public one), and then authorize the device that way.

  30. Guus

    Thanks guys.

  31. dwd

    Guus, Whichever, I think I'm right in saying that any sane implementation of this is going to end up with X.509 certs on the device. Even if it has to be fully software, and you're just relying on the device not being badly jailbroken.

  32. Guus

    I guess that makes sense.

  33. Guus

    How would we verify that in a scenario that involves XMPP clients?

  34. Guus

    Does this boil down to your earlier attempts at multi-phase auth?

  35. Guus

    s/attempts at/work on/

  36. MattJ

    I'm planning to work on that stuff in Prosody in the coming months, but I'm pretty sure this use-case doesn't even need any of that

  37. Kev

    We've done something in M-Link for a customer where they would issue certs to devices and then we'd autocreate accounts on the server based on presenting a trusted cert, IIRC, but it was some years ago.

  38. Max

    Hello, I'm new to XMPP and think about setting up an own server. I've set up a Mumble server before, which was quite easy, but I haven't found any information about whether I need a domain for an XMPP server or not. I prefer to host a server on demand without a domain but IP address (like Mumble). Is that possible? Sorry, if this isn't the right place to ask.

  39. MattJ

    Hi Max, welcome to XMPP 🙂

  40. Guus

    I'm unfamiliar with Mumble. Technically, it's possible to run an XMPP domain that is an IP address, but it'll be challenging to establish any kind of publicly trusted TLS connectivity.

  41. MattJ

    You generally will need a domain, yes. Due to TLS, and the potential for IP changes, etc.

  42. Guus

    also, "on demand" suggests that you're thinking of turning it on and off continuously? If your IP address will be your XMPP domain name, then that changes to your IP will cause issues.

  43. MattJ

    XMPP is more like email, so if you set up your server on an IP address then your users would get XMPP addresses like max@203.0.113.123 instead of max@example.com

  44. MattJ

    and if you ever need to move the server to a different IP, your user addresses have to change and that will break many things

  45. MattJ

    *unless* you decide you don't want federation, and you can find clients that allow you to override TLS certificate checking, and supply custom connection information

  46. Guus

    You can easily experiment with such a setup (IP-based, maybe mimicing domain names in hosts-files), but I'd not recommend using that "in production". It will probably also be challenging/impossible to turn such an experimental setup to one that is usable in the long term (you'll have to start over)

  47. Guus

    Also, Matt is a lot smarter than me so listen to him better. :)

  48. jonas’

    and (in addition to not federating) you're ready for rewriting all of your server side storage whenever you change the IP address

  49. dwd

    Guus, Answering your previous - no, you can just mandate a known certificate from "your" CA on C2S TLS. I think the right settings on Openfire's C2S TLS config will actually do this all for you without additional code required.

  50. MattJ

    Max, you might also find the Snikket FAQ on this topic helpful: https://snikket.org/faq/#q-do-i-need-to-register-a-domain-name-to-use-snikket

  51. Guus

    dwd: would that work? Doesn't that remove the distinction between 'device' and 'user' ?

  52. dwd

    Guus, Yes/yes. If you want to explicitly have a 1:1 user:device relationship then you'll also need SASL EXTERNAL and things though.

  53. Guus

    dwd (which would cause issues when one user wants to use two authorized devices)

  54. Zash

    authzid=user@host/device ?

  55. dwd

    Zash, Well, authzid=user@host still, and authcid=device, if you wanted to go that route.

  56. Zash

    Huh?

  57. Max

    Thanks Matt and Guus for the welcome! 🙂 That sounds interesting. I didn't expect that you can "simply" have an IP address as domain. My server would be a private one for very few people (2 to 3 maybe). I would create accounts for those users. I already experienced IP changes in the past, I then had to tell the others the new IP address to reconnect to Mumble and all was fine. The XMPP server would run on my laptop and therefore only as long as that laptop is running.

  58. dwd

    Zash, The authentication identifer would be the TLS certificate, and that identifies a specific device. The authorization identifer is always the Jid in XMPP.

  59. Zash

    I've seen things that put the full JID into ... one of those, e.g. in PLAIN

  60. dwd

    Zash, In the authentication identifier field or the authorization identifier field? The authzid is a bare Jid by standard (though we're all slack and allow just local parts and assume the domain). See: https://datatracker.ietf.org/doc/html/rfc6120#section-6.3.8

  61. dwd

    Zash, Whereas the authentication identifier is mechanism specific (and can be site specific).

  62. Zash

    Uh, which one is the first (usually zero-length) field in PLAIN? That's the one usually ignored and sometimes observed to contain the full JID from weird clients

  63. MattJ

    Max, if your users are technical folk, it's probably possible. Give it a try if you want, but just be aware that you'll likely encounter a lot of limitations and hurdles compared to using a domain.

  64. Zash

    I thought it was authzid \0 authcid \0 password

  65. dwd

    Max, If you're using an XMPP server with only an IP address, the IP address becomes part of the account name, so if your IP address changes then the accounts become invalid. What you *can* do, though, is use a dummy (non-existent) domain name for the server and tell people to connect with the IP address. That's not supported on all clients, though, and still leaves you with TLS problems.

  66. dwd

    Zash, I think you're right. [authzid]\0authcid\0password in PLAIN. But if authzid is provided the server must validate it and either honour it or reject the authentication with invalid-authzid.

  67. Zash

    ... Prosody just ignores the authzid 🙂

  68. Guus

    Max, if you're in control of the network, you might be able to 'fake' a domain name, by ensuring that lookups of a particular name (eg: `example.org` always end up with the IP address for your laptop). Again, this is very limiting, as you won't have any communication except for with devices directly in your network.

  69. Guus

    'faking' domain names can be done in a couple of different ways: running a local lookup service, modifying /etc/hosts/ files (and the Windows equivalent that I always forget the location of) on each device, or maybe using something like DynDNS (do they still exist?)

  70. dwd

    Zash, And that would be a violation of RFC 6120 and RFC 4422§3.6.

  71. mjk

    Max: to give an example of "rewriting the whole server storage" jonas mentioned, a user's contact list will contain entries like alice@1.2.3.4 and bob@1.2.3.4, message archive (if you need that server-side) and offline messages will also be adressed at such IP-based JIDs, etc. It's possible to rewrite all of that when the IP addr chganges, but I don't know if there's any tooling that would allow doing that seamlessly. It's practically a database migration to a new domain, which, I believe, is only partially covered by MattJ's tools

  72. Max

    Thanks all for the feedback! 🙂 I see that it's not that easy to use an IP address directly, though I'm tempted to at least try it once. I'm kind of reluctant to register a domain, because that makes me dependet from someone I don't know/trust.

  73. mjk

    Hmmm, yea, if a client allows specifying the connection address (some do), you could use an a priori nonexistent domain for user JIDs

  74. Zash

    Who hasn't used xmpp:me@localhost for testing at some point?

  75. mjk

    But having even just a gratis domain from some dynamic DNS provider is much less hacky and hard

  76. mjk

    Zash: I imagine that would be more like me@real.domain.tld but connect to localhost :)

  77. Guus

    for local testing, using the hostname of the computer that runs the server as the XMPP domain name often 'works'. Kinda.

  78. Zash

    Max, but can't you say the same about that IP address as about a domain registrar?

  79. Zash

    You don't own the IP, your ISP does.

  80. Guus

    (Not in a LAN)

  81. mjk

    Having a name actually allows clients to verify where to they're connecting

  82. mjk

    (PKI)

  83. dwd

    mjk, Well, mumble mumble about typically available PKIX.

  84. dwd

    mjk, I mean, run your own CA and use IPAddress SANs, right?

  85. Zash

    dwd, https://1.1.1.1 suggests that you can get IPaddress SANs from somewhere ... at least if you're Cloudflare

  86. Zash

    Also something something DANE

  87. Guus

    That's probably all a lot more than what Max is shooting for, with simply trying things out.

  88. mjk

    Sure, if the ca allows IPs as SANs, then same difference :) Is it CA/B that forbids that, btw?

  89. dwd

    Guus, Hush with your pragmatism and sensible comments.

  90. dwd

    mjk, Most CAs don't offer them. (Or, more accurately, most CAs won't validate them).

  91. mjk

    > I mean, run your own CA and use IPAddress SANs, right? Sure, if the ca allows IPs as SANs, then same difference :) Is it CA/B that forbids that, btw?

  92. mjk

    At least not Let's Encrypt, I assume

  93. Zash

    > Error creating new order :: Cannot issue for \"<my IP>\": The ACME server can not issue a certificate for an IP address

  94. pep.

    Max, any specific reason you want to use XMPP for this?

  95. pep.

    Maybe things like retroshare might be more appropriate? (or other p2p solutions?) Not entirely sure what you're looking for though

  96. Max

    Zash, you're right, I don't own the IP address, though I feel less dependent on someone else when I can just look up my external IP address and pass it to my friends. My ISP could change the address everyday, I wouldn't really care. I might have a strange point of view, but my knowledge about how the internet works is very limited (I don't really get why TLS or certificates are so important. Shame on me). pep, Mumble is awesome for VoIP, but it lacks some chat features. It would be cool to have an XMPP server running alongside the Mumble server, that's all. Maybe XMPP is overkill for this use case, I don't know...

  97. mjk

    I wonder if IRC is much more tolerant for "IP hosting"

  98. mjk

    I wonder if IRC is much more tolerant to "IP hosting"

  99. Zash

    In the 80s perhaps...

  100. Max

    I'll have a look at RetroShare or P2P in general, sounds like a good idea!

  101. Zash

    Surely even IRC requires TLS these days?

  102. mjk

    :shrug:

  103. mjk

    Max: to throw some more p2p names your way: Tox, Jami

  104. Guus

    Max: pragmatically: just install one of the servers and see how far you get. You've probably spent more time talking to us here than what it'd take to setup a quick test server.

  105. Zash

    Heh, ever so slowly IRC follows XMPP https://github.com/ircv3/ircv3-specifications/pull/483 😀

  106. Guus

    As long as you keep a throw-away mindset, you can do little harm.

  107. mjk

    > Error creating new order :: Cannot issue for \"<my IP>\": The ACME server can not issue a certificate for an IP address It's a conspiracy to make us buy names!11

  108. Max

    Well, I think IRC compared to Mumble chat doesn't make a noticable difference, feature wise. mjk, thanks for the suggestions! Zash, will do, thanks! 😃

  109. Zash

    Will do what?

  110. Guus

    (you're unwittingly stealing my thunder, I think)

  111. Zash

    Tab completion, how does it work?!

  112. Guus

    or in case of new users: Tab completion, does that work?!

  113. Zash

    And no movement on sRVName certs either? Sadness

  114. Guus

    afk lunch

  115. Max

    Zash, sorry, I meant Guus (trying to host instead of talking about it).

  116. Zash

    🙂

  117. dwd

    Max, But keep us posted with what you try.

  118. Max

    I will, I probably need help here and there. I'll try on the weekend, then I'll have more time to focus on it. 🙂

  119. Neustradamus

    Zash: https://github.com/search?q=org%3Aircv3+scram&type=code ;)

  120. ralphm

    @board: I'm abroad for work and will not be able to attend today's meeting.

  121. arc

    Morning

  122. arc

    Are we having a board meeting this morning?

  123. Zash

    Well MattJ, jcbrand, are you ?

  124. arc

    It doesn't look like it. I think at this point we've failed to meet so many times so far this year that we kind of expect the meeting to fail

  125. pep.

    How does one use PEP in 1:1 to be the source of truth for a feature. What node should the data go in? More specifically, which of the two accounts, and how does a new client knows which account to check/which is the source of truth. Or is it better to just not use PEP in this case

  126. pep.

    In MUC it's easier (or would be if it were deployed everywhere?), there's an obvious node (the MUC)

  127. pep.

    (Is this why some choose to do 1:1 in groupchats as well?)

  128. mjk

    For anyone interested in (intra-)xmpp data portability, there's a googlerrific blob of java called Data Transfer Project, that's supposed to perform cross-multinational data transfer through a common data format, which might be interesting for importing tweets 'n' hangouts 'n' stuff as xmpp micro-/macroblogging posts, mam history, etc. Here's, for example, the code importing posts into a Mastodon account: https://github.com/google/data-transfer-project/blob/889f1fa92fc54046b42a9448b53d9de0df84912c/extensions/data-transfer/portability-data-transfer-mastodon/src/main/java/org/datatransferproject/transfer/mastodon/social/MastodonActivityImport.java

  129. mjk

    For anyone interested in (intra-)xmpp data portability, there's a googlerrific blob of java called Data Transfer Project, that's supposed to perform cross-multinational data transfer through a common data format, which might be interesting for importing tweets 'n' hangouts 'n' stuff as xmpp micro-/macroblogging posts, mam history, etc. Here's, for example, the code importing posts into a Mastodon account: https://github.com/google/data-transfer-project/blob/master/extensions/data-transfer/portability-data-transfer-mastodon/src/main/java/org/datatransferproject/transfer/mastodon/social/MastodonActivityImport.java

  130. mjk

    The data formats seem to be here: https://github.com/google/data-transfer-project/tree/master/portability-types-common/src/main/java/org/datatransferproject/types/common/models

  131. pep.

    Is there any "common ways to do X" guide anywhere, that is not feature but building blocks for features, such as the question I asked above re PEP.

  132. pep.

    I'm thinking it's either that or I use MAM to do negociation and there's a significant chance the other side doesn't see it because they fetched too little. And I'm not entirely sure I want iq either for this. I'd need to iq every single device of the recipient right? each time I see a new one that is

  133. jonas’

    I don't understand the question about PEP tbh, pep..

  134. jonas’

    which two accounts even?

  135. pep.

    In a 1:1 chat

  136. jonas’

    but truth of what?

  137. pep.

    Of some random feature that would be used in this chat. I can go into specifics but I'm not sure that's required? Also I would like the answer to this question if there is one anyway, before anyone tells me "for this use Y rather" (and never know how to use PEP this way)

  138. pep.

    Say there's a value that is to be used by both parties in the chat, and the value needs to be usable by all devices taking part in the chat, even those not present when it was agreed upon

  139. jonas’

    all pep things I know "describe" the account

  140. jonas’

    so I know of nothing where they'd need to find a common ground

  141. jonas’

    > Say there's a value that is to be used by both parties in the chat, and the value needs to be usable by all devices taking part in the chat, even those not present when it was agreed upon sounds tricky especially because that value could change in the meantime and you don't have access to historic values for PEP in general

  142. pep.

    Ok, so anything else I can use to do this? Without having to re-negociate with each device

  143. jonas’

    you could write down something like "take the minimum" if it is orderablee

  144. jonas’

    but that's still going to have problems over time if the value is changed on either side

  145. pep.

    Yeah the value changing is fine here

  146. pep.

    I do need multiple values over time..

  147. jonas’

    🤷

  148. pep.

    It's doable with PEP, but is it what one would use

  149. pep.

    PEP doesn't have to be only 1 item

  150. emus

    That is something very interesting https://blog.documentfoundation.org/blog/2022/01/27/bug-bounties-finding-and-fixing-security-holes-with-european-commission-funds/

  151. mjk

    pep.: negotiating a timeout value for ephemeral messages comes to mind: https://xmpp.org/extensions/inbox/ephemeral-messages.html I didn't read the how, but it seems to be specified

  152. pep.

    Yeah that's actually what I'm thinking about changing.

  153. pep.

    The thing with MAM as I said is that there's a high chance somebody misses the negociation if they don't fetch enough

  154. pep.

    This protoXEP though adds a tag in each element which gives more chance for other devices to see it. I'm wondering if this is required

  155. mjk

    > Yeah that's actually what I'm thinking about changing. Oops, I spoiled The Reveal

  156. mjk

    > in each element In each <message> you mean? (Sorry, the protoxep was tl;dr)

  157. pep.

    Yeah in each message

  158. pep.

    In a weird way also, but I want to change that

  159. mjk

    Hmmyeah, putting the last value into pep instead seems saner

  160. pep.

    It's not jus the last value you want, it's every single value change and the corresponding message id (hoping they're all in order)

  161. pep.

    Once the timer is changed, following message will take this new value. Older messages keep the old timer value

  162. pep.

    But well, I've asked 4-5 people today and all I got was different requirements. So there's work to be done here first

  163. jonas’

    the corresponding message id?

  164. jonas’

    how would that work with multiple parallel 1:1 chats going on, with different people?

  165. pep.

    "from there onwards use this timer". I mean that's how I thought about doing it with PEP, if I used PEP

  166. pep.

    Different timer

  167. jonas’

    so one pep node per contact?

  168. jonas’

    or item

  169. pep.

    yeah per contact

  170. jonas’

    how would a contact find its node?

  171. pep.

    That was my question

  172. pep.

    Don't steal it

  173. Zash

    H(bare JID) ?

  174. jonas’

    but contact enumeration

  175. Zash

    (I have 3 lines of context)

  176. Zash

    What are we talking about?

  177. pep.

    Should I check on my account first, or the contact account?

  178. jonas’

    ... what?

  179. pep.

    jonas’, well who's going to hold that value

  180. jonas’

    ... both?

  181. pep.

    So duplicate the data?

  182. jonas’

    I don't know and am too sleepy to care

  183. mjk

    Both?

  184. Zash

    H( sort([ H(me), H(you) ]) )

  185. pep.

    Zash, still contact enumeration? :P

  186. jonas’

    Zash: did you say: incentivize people to choose jid such that H(jid) small?

  187. mjk

    pep.: isn't it duplicated by design? Each user has a preferred value, and some consensus then computed

  188. pep.

    mjk, no, the last one sent out wins

  189. Zash

    Also, plz don't invent more schemes where you create tons of nodes. Our users complain enough about the OMEMO nodes.

  190. pep.

    IMO

  191. pep.

    Zash, well find me a reliable way to do this

  192. mjk

    pep.: but there's no global authority on the message ordering, unless it's a muc

  193. pep.

    Is putting one more tag in message just fine?

  194. pep.

    How many tags can we put in message until it becomes too much

  195. Zash

    Reliable way to do X: Don't do X. Can't fail if you don't try!

  196. pep.

    :)

  197. mjk

    Also: doing nothing is faster

  198. mjk

    Also: (doing) nothing is faster

  199. pep.

    Let's not send messages

  200. Zash

    Sleep on it, let your subconscious solve the problem!

  201. pep.

    Sure. I'll tell it Zash told it to do that

  202. Zash

    The Z in Zash is for 💤️

  203. mjk

    pep.: wouldn't it suffice to only attach the tag to an ephemeral message, and store that value in pep, together with the same timestamp as that message?

  204. pep.

    Well if I add the tag in each message I don't need PEP anymore

  205. pep.

    I can put the current timer value in it

  206. mjk

    No, not each, only the ephemeral ones

  207. pep.

    Sure

  208. mjk

    You concers seems to have been that the value might get lost in mam

  209. Zash

    The pingfs approach? Store it all in in-transit messages in the network?

  210. mjk

    So duplicate it in pep

  211. pep.

    mjk, when one side initiates it

  212. mjk

    Anyway, my brain is sleepy half the day and I'm missing half the context

  213. pep.

    The other needs to see it's been initiated. That is, if we only say "from now on we do ephemeral message with timer t", and not each time "I'm an ephemeral message with timer t"

  214. mjk

    I actually don't see the harm in sending it with every ephemeral message, those aren't the majority of traffic, I s'pose