XSF Discussion - 2018-02-28


  1. edhelas

    We do indeed

  2. goffi

    Hi, SàT support it too

  3. SaltyBones

    SaT?

  4. goffi

    SaltyBones: https://salut-a-toi.org

  5. vanitasvitae

    Just read the XMPP Newsletter. Good work :)

  6. daniel

    Oh there is one already?

  7. daniel

    Is it available on a website? Or is it literally just a newsletter?

  8. vanitasvitae

    https://xmpp.org/2018/02/the-xmpp-newsletter-28-february-2018

  9. goffi

    neat :)

  10. vanitasvitae

    Basically it is a link list, but there were one or two articles that slipped my eyes

  11. Ge0rG

    I love it how xmpp.is say they won't support the spam fighting manifesto, and then describe how they essentially implement each of the stated requirements <https://xmpp.is/2018/02/21/the-jabber-spam-fighting-manifesto/>

  12. Maranda

    Ge0rG, infact xmpp.is is one of the servers I get spim hits from atm, *the hilarity ™️®️*

  13. Maranda

    I wonder why

  14. Ge0rG

    Maranda: Contact addresses for xmpp.is are https://xmpp.is/contact/ (support, admin, feedback, abuse)

  15. Ge0rG

    please feel free to bother them.

  16. Maranda

    🤣

  17. Ge0rG

    When looking for xmpp.is in my log I found this one instead: https://isopres.de/impressum/

  18. mathieui

    Thanks for the newsletter, by the way

  19. Ge0rG

    Yeah, it's awesome!

  20. Ge0rG

    I'd love to have the big ones (like EVE and Epic) mentioned on our twitter as well

  21. jonasw

    this ID mess is a mess

  22. jonasw

    Kev, there’s no reasonable way we can actually force clients to generate globally unique IDs though, is there?

  23. jonasw

    so I don’t think that there’s an actual solution to the "appears to be rewriting history" issue.

  24. Kev

    No, I think there's not (I keep saying that, I think) - I wasn't arguing we can solve it, I was arguing that "they've got lots of power anyway" isn't the reason to not care.

  25. jonasw

    oh, I must’ve misunderstood that

  26. jonasw

    how would we be caring then?

  27. Kev

    I felt that "they've got lots of power anyway" was a "we shouldn't care". We should care, we just probably can't avoid it, so we carefully document it in security considerations etc.

  28. Kev

    It sounded like Simon was saying that malicious clients/servers are a problem not worth thinking about. I might have misinterpreted his words.

  29. SaltyBones

    Yeah, that's not what I was trying to say...

  30. SaltyBones

    Hm...how to sum this up...1. A client and server can claim that a message-ID was A when it was B; that is almost unsolvable but the other recipients just won't believe it anyway. 2. There is usually no authentication in XMPP so the point seems a bit moot.

  31. jonasw

    the main issue is that an ID can be re-used

  32. jonasw

    as far as I understand it

  33. jonasw

    and since we use IDs as identifiers in various protocols (LMC, but also References and stuff), that’s a problem

  34. SaltyBones

    Yeah, but there is a difference between assuming that it happens by accident and can be fixed and assuming that it is adversarial.

  35. jonasw

    I’m confused

  36. Ge0rG

    The only way to properly solve this is to limit the validity domain of IDs to a single session.

  37. Kev

    SaltyBones: "no authentication"?

  38. Kev

    I think one can reasonably argue with that statement.

  39. jonasw

    Kev, I think they refer to "cryptographic authentication". A server can esaily forge a stanza for anyone to or from his domain.

  40. SaltyBones

    Yeah, sorry.

  41. SaltyBones

    Ge0rG, but then you could force the server to have some sort of UUID and a session counter and if you throw the three things together you get reasonable global IDs.

  42. Kev

    There's cryptographic authentication, even. It's just that it's applied to the domain, not beyond.

  43. goffi

    is there a licence for the Newsletter? Would be nice so it could be translated

  44. SaltyBones

    goffi, has been discussed in the comm team channel

  45. Tobias

    isn't all website content on xmpp.org under a single license

  46. Kev

    Should be, but I think that notice was lost at some point.

  47. SaltyBones

    Kev, yes, but there is no message authentication so if you only store messages you cannot prove to anybody later that serverA sent you messageB with ID-C...

  48. Kev

    That's somewhat different.

  49. SaltyBones

    Yes, just pointing it out because you of your "somebody claims you liked a post about KKK" example

  50. SaltyBones

    Yes, just pointing it out because of your "somebody claims you liked a post about KKK" example

  51. jonasw

    SaltyBones, the issue is that that scenario can be caused by a client alone.

  52. SaltyBones

    jonasw, the reason I ended up with this proposal is that it makes the situation better and it is very easy to implement.

  53. jonasw

    a mailicous server is really powerful, indeed, and we generally assume that each user can trust their own server, and that they have to some extent trust a MUC service if they’re using one

  54. Kev

    SaltyBones: I think my issue is that the core of your proposal (the hashing thing) doesn't make anything better :)

  55. Kev

    Or, I don't see how it does.

  56. SaltyBones

    Kev, that's a reasonable way to look at it. You could just as well not do the hashing and just use per-connectionserver-salt + connection-counter

  57. SaltyBones

    That was just a fix for the "oh but the connection counter leaks stuff" problem...

  58. Kev

    Oh, no, you couldn't do counters, because of the leaks.

  59. Kev

    But as telling the server what ID to use for MAM isn't sensible, AFAICS, I don't think the server being able to predict the client ID buys much at all.

  60. SaltyBones

    If the server can assure that the client ID is unique it can simply use that for MAM.

  61. SaltyBones

    That's the main point... :)

  62. jonasw

    SaltyBones, but that only solves the "client knows the eventual ID of the message"

  63. jonasw

    it doesn’t solve any of the malleability things cross-domain.

  64. jonasw

    that is only solved by your rewriting proposal, and I’m not confident that will work properly

  65. jonasw

    except with a lot of complexity on the server

  66. SaltyBones

    jonasw, not sure what you mean

  67. SaltyBones

    jonasw, not sure what you mean with malleability cross-domain

  68. Kev

    SaltyBones: You're assuming that a server is happy to have arbitrary client-provided IDs as the primary query into the archive. I'm suggesting I don't think that's valid.

  69. Kev

    I think you have to let the server decide how it indexes its database.

  70. SaltyBones

    Kev, they are not arbitrary at all because the server can verify that the client generated them correctly. Essentially they are just forced to use the same generation algo....

  71. SaltyBones

    Of course if there are servers that don't like this algorithm for some reason than we should look at what that reason is and how to fix it. :)

  72. jonasw

    SaltyBones, the reason for prosody/Zash is clear: their ID contains the date because that allows quick access to a bucket of MAM data

  73. goffi

    SaltyBones: and what was the conclusion of the discussion? Can we re-use? Tobias: I don't see any licence mention on the wesite, what is it?

  74. Tobias

    I'm sure you can translate it when referencing back and mention the original author

  75. SaltyBones

    goffi, translations would be appreciated and then linked to from the main newsletter. Not a real legal discussion.

  76. goffi

    Tobias: SaltyBones: I plan to translate in French to a popular website, but it require to specify licence, so I want to be sure I can set CC By-SA there. And yes I'll mention original post of course.

  77. Tobias

    what's the SA?

  78. goffi

    Share Alike

  79. SaltyBones

    goffi, join commteam@ and ask there.

  80. goffi

    SaltyBones: Tobias: asking there now, thanks

  81. SaltyBones

    jonasw, they could just include a timestamp for timestamp queries and use an increasing salt to have an increasing index...

  82. SaltyBones

    We can probably suss out all of these problems but I am not sure anybody but me is actually interested in doing that. xD

  83. Ge0rG

    > but I am not sure anybody but me is actually interested in doing that. I know that feeling. Too well.

  84. Kev

    I'm glad to have this discussion. I'm not convinced that the proposal, and the complexity that goes with it, is solving any problems that a simpler solution doesn't.

  85. jonasw

    SaltyBones, but timestamps aren’t monotonic

  86. Kev

    That is, it seems to me that the problems solved by this solution are the same solved by just saying to clients 'be unique in origin-id', and updating other XEPs to say 'reply with the origin-id' (LMC, Receipts, etc.).

  87. jonasw

    yeah

  88. Ge0rG

    SaltyBones: sorry, I didn't even read through the message-IDs thread due to lack of time.

  89. SaltyBones

    Kev, and maybe adding a reply "this is your mam-ID" to client messages

  90. SaltyBones

    jonasw, they aren't? :)

  91. Kev

    Or ignoring origin-id, using the stanza ID the way we always have, and killing MUC with fire :)

  92. jonasw

    SaltyBones, clock corrections make it non-monotonic. and of course there’s the issue of clock sync between nodes

  93. Ge0rG

    Kev: or just finally mandating that MUC must keep message IDs.

  94. Kev

    Or that.

  95. Ge0rG

    And mandating that clients which want to employ LMC and other references must use sufficiently unique IDs

  96. SaltyBones

    jonasw, ah I was thinking about the lamport kind of timestamp

  97. jonasw

    that sounds complex

  98. Ge0rG

    Maybe somebody wants to resurrect the Jul 2014 thread on MUC message IDs.

  99. SaltyBones

    a little

  100. SaltyBones

    jonasw, anyway if you have server generated timestamps and a monotonic counter the mapping should be pretty easy although not a NOP :)

  101. Kev

    You need more than monotonic, don't you?

  102. Ge0rG

    SaltyBones: but clustering!

  103. Ge0rG

    no wait, that was Dave's text.

  104. Ge0rG

    but race conditions!1!

  105. SaltyBones

    If you want clustering and query by timestamp I suppose you need the opposite of monotonic.

  106. SaltyBones

    You want to merge archives by timestamp. Although that sounds dubious.

  107. SaltyBones

    So, let's suppose that servers really want to generate their own ID for internal use. That seems fair but then why does the client need to know this ID for MAM? That's a bit fishy imho...

  108. Kev

    Because it's that ID that is the index into the archive.

  109. Ge0rG

    I wonder if we can do XMPP over that link: http://www.vodafone.com/content/index/media/vodafone-group-releases/2018/vodafone-and-nokia-to-create-first-4g-network-on-moon.html

  110. SaltyBones

    but why does the client need to know that

  111. Kev

    Because it queries the archive.

  112. SaltyBones

    To do what?

  113. SaltyBones

    I mean, there are obvious solution here as well: 1. The client query the server by its own ID and the server can try to use that as an additional index or 2. The server could just reply to client messages with the new ID.

  114. SaltyBones

    But the whole situation is weird...what are the clients trying to achieve by querying the MAM?

  115. Kev

    There is some massive logical disconnect here.

  116. Kev

    You're asking why a user would want to retrieve messages from their message archive.

  117. Kev

    What's the point of having the archive if you *can't* query it?

  118. SaltyBones

    But why would you need to know what s in the archive to query it

  119. Kev

    Have you read the XEP? :)

  120. SaltyBones

    Well, I ve tried... :)

  121. Kev

    You say things like "Give me everything since message X", where X is the MAM ID.

  122. SaltyBones

    Yes, but now we are asking the client to query by and ID which the server generated and didn't tell it about...

  123. SaltyBones

    Why not just query by the clients ID or timestamp?

  124. Ge0rG

    timestamps are unreliable

  125. jonasw

    SaltyBones, because it is exact

  126. Kev

    Syncing on timestamp doesn't work, indeed.

  127. jonasw

    timestamps are not exact

  128. Kev

    And the client ID means you're storing the primary index provided by the client, which enforces implementation details on the server that I'm not convinced we want to.

  129. Kev

    And maybe it's something we can live with, but I don't currently see what it buys us.

  130. jonasw

    I know at least one implementation which can’t live with that :)

  131. Holger

    The message in question might be an incoming message, an outgoing message sent by that client, or an outgoing message sent by another client. You'd use the client ID in some or all these cases?

  132. Kev

    jonasw: If you mean Prosody's timestamp one, I think additional stuff's going to end up needed there anyway, for all the other things we were discussing at the summit.

  133. Kev

    But yes.

  134. Kev

    Holger: Well, you obviously can't in all, for id clashing reasons. At least, not with this suggested scheme.

  135. Holger

    That's why I'm asking.

  136. Holger

    So basically the client ID is not an option.

  137. Holger

    If you don't want to introduce another great mess.

  138. jonasw

    Holger, that’s a very good point, I like it :)

  139. Ge0rG

    another great mess! \o/

  140. Neustradamus

    It is beautiful to see the first newsletter after XMPP Roundup and Jabber journal :)

  141. Neustradamus

    I see a new redirection problem: http://wiki.jabber.org/index.php/....

  142. Holger

    I'm confused. Say the client re-logs in after loosing the connection and knows the MAM ID not just of the last incoming but also of the last outgoing message because we solved that somehow. He then queries MAM with after=$ID. How does he decide whether to specify the $ID of the last outgoing or the last incoming message? The ordering of incoming vs. outgoing messages on the client side might be different from the server side, no? (Maybe *this* can only be solved properly by having the server reflect IDs?)

  143. jonasw

    yes, that can be solved by having the server reflect IDs

  144. Ge0rG

    Holger: that's an awesome point

  145. Ge0rG writes it on the back of his "race conditions" card

  146. jonasw

    hah

  147. jonasw

    that’s why I think we just want self-carbons by now.

  148. Kev

    It's the same point I made on the list earlier this morning.

  149. jonasw

    yeah

  150. Kev

    But with more words ;)

  151. Holger

    Kev: Oh sorry, I didn't catch up yet.

  152. Kev

    The chat in here was triggered by me replying to the mailing list thread, I think.

  153. jonasw

    yeah

  154. Ge0rG

    Kev: except almost nobody read your mail, it seems

  155. SaltyBones

    The ordering or messages in MAM can be different from the client?

  156. Holger

    Can we maybe somehow merge reflection of IDs with 0198 ACKs?

  157. Ge0rG

    SaltyBones: yes

  158. Ge0rG

    Holger: this is something I proposed when MAM first appeared.

  159. Kev

    Holger: I'd rather not, that's somewhat breaking layering.

  160. Ge0rG

    Holger: 0198 and Carbons and MAM in a single unholy union.

  161. SaltyBones

    Why can they be different and who is right? :)

  162. Holger

    Kev: Then the layers are wrong IMO.

  163. Kev

    Really?

  164. Holger

    Kev: I find it a bit embarrassing to define a protocol that has the server generate two responses to a single message.

  165. Kev

    198 is about the network layer and stuff getting through.

  166. Kev

    MAM is about the protocol layer.

  167. jonasw

    Holger, two responses?

  168. Zash

    198 isn't per message

  169. jonasw

    not even per stanza, indeed

  170. Holger

    jonasw: (1) ACK I got message with ID $count, (2) ACK I got the message with MAM $ID.

  171. jonasw

    Holger, but the (1) ACK is explicitly requested by the client with an <{sm}r/>

  172. Holger

    Yes I'd usually request it per-stanza.

  173. jonasw

    hm, I don’

  174. jonasw

    *I don’t

  175. Kev

    So 198 could be bunching a load of stuff, for different stanzas (which may or may not be messages), and is generally going to happen once the server receives the stanzas, whereas 313 happens later, once it routes goes in the archive.

  176. Holger

    jonasw: If the client doesn't deem this necessary, why does it deem it necessary for MAM?

  177. Holger

    Ge0rG: Yay I'm good at re-inventing wheels.

  178. Ge0rG

    Kev: some servers will only emit the 0198 ack after fully processing the stanza

  179. jonasw

    Holger, because MAM contains things from other entities I suppose

  180. Ge0rG

    yaxim will emit an <r/> after each message because mobile is unreliable

  181. jonasw

    on the XEP-0198 stream, I know the order of the stanzas. In MAM, I don’t unless I get an in-order reflection of my own message.

  182. SaltyBones

    If a client queries the MAM by last ID but the order in the MAM might be different I don't understand how it works. :)

  183. Holger

    Ge0rG: And if it was reliable you wouldn't need 0198. I never got the idea of requesting an ACK only every now and then.

  184. Holger

    Except for requesting it only once per bunch of stanzas you sent in one go, or so. In which case a single MAM ID response is fine as well.

  185. jonasw

    Holger, when sending a bunch of messages at once, it makes sense to request an ack only after the last message

  186. jonasw

    saves overhead

  187. jonasw

    yeah

  188. jonasw

    (or rather, sending a bunch of stanzas in general)

  189. Holger

    Yes what I don't get is how the requirements differ from those for MAM ID reflections.

  190. jonasw

    Holger, hm, maybe that would work.

  191. jonasw

    still requires some kind of knowledge about the relative ordering of messages you sent vs. messages you received and other resources sent

  192. jonasw

    I don’t think we can get that without something on the stanza layer?

  193. Holger

    Why?

  194. jonasw

    to be able to query correctly

  195. Holger

    The ordering is now defined by the order or stanza IDs you got on your incoming stream.

  196. Holger

    *the order of stanza IDs

  197. jonasw

    how would I know when I send and receive a stanza at the same time and then my connection drops without stream management.

  198. jonasw

    now I need to query the archive

  199. jonasw

    which of the two IDs do I use to get a complete, dupfree picture?

  200. Holger

    You ditch unacknowledged messages locally and query MAM with after=$ID, where ID is the last ID you got from the server, no?

  201. jonasw

    (I’m currently too hungry to think of a more sophisticated case where using the wrong ID would actually lead to *missed* messages, but there might be some)

  202. jonasw

    okay, I need some food first

  203. jonasw

    food for thought, if you will.

  204. Holger

    I'll try coffee.

  205. Holger

    And I'll read Kev's email :-)

  206. flow

    MAM IDs in SM acks seems to be worth exploring

  207. MattJ

    Depends whether you want to communicate to the client "this was the last entry in MAM at this point in the stream", or whether you want the client to know the ID of every message in the archive

  208. Ge0rG

    Holger: except we need SM for IQs as well.

  209. flow

    MattJ, last entry in archive should be sufficient for most cases

  210. Ge0rG

    MattJ: what about giving back a list of message id / message ID pairs.

  211. Holger

    Ge0rG: Those will obviously not carry a MAM ID?

  212. MattJ

    I'm guessing Ge0rG means a map of @id -> MAM-ID

  213. Ge0rG

    I just love our nomenclature

  214. MattJ

    What nomenclature?

  215. MattJ

    Nobody can agree on what to call anything :)

  216. Ge0rG

    Can't we just map jabber IDs to nonza IDs and be done?

  217. Holger

    :-)

  218. Ge0rG

    This protocol is not for zimpies™

  219. Holger

    While at it, maybe just fix 0198 to return an ID for every stanza and ditch both <r/> and the counting which nobody gets right anyway :-P

  220. Ge0rG

    Holger: but layers!

  221. Holger

    Ge0rG: The TCP layer is responsible for reliable message delivery.

  222. Ge0rG

    Holger: no, TCP is a byte stream, not a message stream.

  223. MattJ

    I think 198 is fine as-is, and I'm not keen on extending it

  224. MattJ

    But yes, we do need to solve the MAM-ID-for-outgoing-messages problem

  225. Ge0rG

    MattJ: from a smart-server dumb-client point of view, having four different mechanisms to track messages sucks.

  226. Holger

    So then we need a separate acknowledgment for MAM.

  227. Ge0rG

    I'm talking of 0184, 0198, 0280 and 0313

  228. MattJ

    Typically consensus has been about reflecting outgoing messages (in part, or in full), because this also has other benefits and we do it in Carbons anyway (just not for the originating resource)

  229. Ge0rG

    MattJ: yes.

  230. Ge0rG

    I wonder how that will play out with self-messages.

  231. MattJ

    Heh

  232. Holger

    I understand where you guys are coming from, I just think this adds a bit embarrasement when you show the procotol to a newcomer for the first time.

  233. MattJ

    Holger, and your preferred solution is?

  234. MattJ

    Oh sorry, you already said

  235. Holger

    MattJ: Merging 0198 ACKs with 0313 message reflections.

  236. Ge0rG

    Holger: XMPP is already mocked by HTTP developers. It can't get any worse.

  237. Holger

    But I see how just adding a stanza-id attribute and otherwise keeping 0198 as-is has downsides. So yes just adding a 0313 mechanism is probably an easier way forward.

  238. jonasw

    FWIW, I think keeping 198 and MAM IDs separate is sane separation of concerns

  239. MattJ

    For the most case I don't think we should be introducing newcomers to the protocol

  240. Holger

    It's just like other things where the end result is more convoluted than it would be if we addressed all this sync foo in one go.

  241. MattJ

    It's a library problem, and the problem is most libraries just leave you with stanza building

  242. Ge0rG

    with 0313 reflections we probably don't need to <r/> each message any more

  243. Holger

    We need new libraries!

  244. Ge0rG

    We need more libraries!

  245. Ge0rG

    There are only three(?) for python!

  246. jonasw

    i need to port poezio to aioxmpp, then there’ll be only one *evil laughter*

  247. Ge0rG

    jonasw: python-nbxmpp!

  248. jonasw

    that does barely count as library

  249. Ge0rG

    and sleekxmpp used to be a parent of slixmpp? There is also xmpppy

  250. Holger

    Ge0rG: Well what we really need is new library authors I guess, and at least those will have to be introduced to the protocol. In practice you'll have to understand most of that stuff as a serious client author as well, of course, even if your library is sane.

  251. Ge0rG

    So we have five.

  252. Ge0rG

    Holger: as it happens, the most active libraries are maintained by client devs.

  253. Holger

    See.

  254. Ge0rG

    We have much NIH here.

  255. jonasw

    I wonder why ;-)

  256. Holger

    So I'm not fully convinced that "but libraries!" is a good excuse for adding insanity to the protocol.

  257. jonasw

    I can at least argue that I didn’t NIH, there simply wasn’t anything for python3-asyncio when I started. And I even considered porting sleekxmpp to asyncio, but I thought this to be not reasonably possible.

  258. jonasw

    Holger, as both library and client author, I agree.

  259. jonasw

    but I think keeping SM and MAM separate is sane.

  260. Ge0rG

    jonasw: you are biased.

  261. jonasw

    Ge0rG, why?

  262. Ge0rG

    I also think that keeping SM and MAM separate is good.

  263. Ge0rG

    And I argue in favor of a new type of session, which is MAM-Sub

  264. jonasw

    yeah

  265. jonasw

    that’d be great

  266. Ge0rG

    > Still, I like the idea of MAM subscriptions as a replacement or augmentation for carbons Saying that for three years now.

  267. jonasw

    Ge0rG, implement it pls

  268. jonasw

    although bind2 will probably do pretty much that?

  269. Ge0rG

    jonasw: bind2 is just a mechanism to carry things.

  270. jonasw

    bind2 would have the effect of MAM-Sub though?

  271. Ge0rG

    jonasw: nope

  272. jonasw

    by doing MAM sync and carbon enablement in a single atomic step?

  273. Ge0rG

    Let me make a strawman proposal of MAM-sub: - you initiate a bind2 session, supplying the last-known MAM-ID - the server doesn't deliver offline messages - the server delivers your pending MAM messages - the server auto-enables carbons and mam-reflections to you, starting to deliver everything after the MAM sync as "live"

  274. jonasw

    yeah

  275. Ge0rG

    so MAM-Sub is like Carbons but with mam-reflections

  276. jonasw

    alternatively, the server could just give you the current last MAM ID so that you can do the sync asynchronously

  277. jonasw

    while already receiving live messages

  278. Ge0rG

    I'm sure I proposed that and a bunch of other nifty optimizations (0198 auto-resume/start in bind2) on the ML some time last year

  279. jonasw

    yo

  280. jonasw

    we just need implementations.

  281. Ge0rG

    jonasw: processing MAM after live will be a pita, but okay.

  282. jonasw

    depends on your client, I guess

  283. jonasw

    I’d be fine with that.

  284. jonasw

    has a considerable latency advantage, especially if you’ve been out for more than just a few hours

  285. flow

    Ge0rG, do mam-reflections solve the issue Holger described between incoming and outgoing messages?

  286. Ge0rG

    flow: yes.

  287. Ge0rG

    flow: MAM reflections will be part of your MAM archive, right between incoming messages, properly ordered.

  288. jonasw

    we just need to make sure that MAM-Reflections don’t rewrite IDs. this time for real *scnr*

  289. jonasw

    Ge0rG, what, why?

  290. jonasw

    wouldn’t you just have your outgoing messages in the MAM archive?

  291. flow

    Ge0rG, so mam-reflections are done after the message has been added to your archive, both incoming and outgoing messages

  292. Ge0rG

    flow: yes

  293. Ge0rG

    jonasw: I'm not following

  294. flow

    sounds good

  295. flow

    you should write a XEP

  296. flow

    or otherwhise the idea will possibly be burried in the standards@ archive

  297. jonasw

    Ge0rG, why would you have the MAM reflection thing (presumably <message from="mam" to="your client"><forwarded><inner message from="your client"/></forwarded><stanza-id…/></message>) in the archive instead of just <inner message/>?

  298. Ge0rG

    jonasw: wait, what?

  299. jonasw

    what is a MAM reflection?

  300. flow

    jonasw, I don't think that is what Ge0rg wanted to say with "will be part of your archive"

  301. Ge0rG

    jonasw: whatever we make it to be

  302. jonasw

    Ge0rG, I am super confused now

  303. Ge0rG

    jonasw: could be a sent carbon of your outgoing message, or the outgoing message wrapped in MAM

  304. jonasw

    yeah

  305. jonasw

    okay

  306. jonasw

    but WHY would you put that wrapped message into MAM again?

  307. Ge0rG

    jonasw: or maybe just a small-ish ack with the MAM ID and your original @id

  308. Ge0rG

    jonasw: I wouldn't

  309. jonasw

    I don’t understand: 12:14:59 Ge0rG> flow: MAM reflections will be part of your MAM archive, right between incoming messages, properly ordered. this then

  310. Ge0rG

    jonasw: I'd put the original message, obviously

  311. Ge0rG

    jonasw: ignore it please

  312. jonasw

    okay

  313. jonasw

    then I didn’t say a thing since 12:15:01Z

  314. Ge0rG

    jonasw: of course your *sent message* will be part of your MAM archive, plus the MAM-ID

  315. jonasw

    yeah, that’s a good thing :)

  316. flow

    Ge0rG, once MAMSub is active, clients will only receive messages not stored into mam via the usual way, all other archived messages will be mam-reflected, correct?

  317. Ge0rG

    flow: wait, what?

  318. flow

    Ge0rG, specific mam-reflections please

  319. SaltyBones

    I find our reasoning so far somewhat questionable. Because servers might want to use different IDs for messages these IDs should be reflected to the client so that it can make queries with that ID. Shouldn't a simply be able to respond to a clients query if the client uses its original ID? Maybe this is not really practically possible anymore now but it seems somehow more logical. :)

  320. Ge0rG

    flow: no, you will receive all messages as usual, with MAM-IDs injected

  321. SaltyBones

    I find our reasoning so far somewhat questionable. Because servers might want to use different IDs for messages these IDs should be reflected to the client so that it can make queries with that ID. Shouldn't a server simply be able to respond to a clients query if the client uses its original ID? Maybe this is not really practically possible anymore now but it seems somehow more logical. :)

  322. flow

    Ge0rG, and carbons still using forwarded?

  323. Ge0rG

    flow: let me sort this out: you will receive all(*) incoming messages as regular messages, sent carbons from your other clients as sent carbons and MAM reflections of your outgoing messages as whatever works (e.g. forwarded)

  324. Ge0rG

    all(*) = remember what I proposed at the summit / XMPP2 / routing2 brainstorming

  325. Ge0rG

    But maybe routing2 is still too controversial

  326. flow

    What gives you the impression that it is too controversial?

  327. Ge0rG

    flow: it breaks existing XMPP routing

  328. flow

    But it's opt-in. Do we have an example of a legacy protocol which breaks when another involved entity activated routing2?

  329. Ge0rG

    flow: not that I am aware of. But the proble is that it changes semantics of bare/full JID routing, which is guaranteed to leak outside the XMPP2 domain

  330. flow

    I guess that is just a fancy expression for "something could rely on the semantics and would break if someone else is using routing2"

  331. MattJ

    The root problem is that an XMPP1 entity will happily send to the full JID of an XMPP2 entity and expect it to be treated in the XMPP1 way

  332. Kev

    Full-JID 'I'm xmpp2' annotation seems like it works though.

  333. Ge0rG

    Kev: maybe, yeah.

  334. Kev

    Or heuristically 'fixing' xmpp1 full JID based on DPI, but that seems unappealing and probably fragile.

  335. flow

    Kev, DPI?

  336. Kev

    Deep Packet Inspection.

  337. flow

    deep packet inspection?

  338. Kev

    Which I'm abusing as a term to mean 'look inside the payloads'.

  339. MattJ

    The problem with the annotation is that it feels like it's undermining the point of routing2 in the first place

  340. MattJ

    If we're going to annotate, let's just annotate and we don't need to make any other changes

  341. MattJ

    and that's basically hints, but with a stronger definition of how to process them

  342. Kev

    MattJ: Maybe, perhaps.

  343. Kev

    What else would you annotate, though?

  344. MattJ

    Exactly - nothing

  345. MattJ

    So XMPP2 is XMPP1 with annotations on stuff you want to treat as ephemeral

  346. Kev

    And changed routing rules for anything that's not annotated?

  347. Kev

    And clients need to know to ignore anything in an annotated message, because it shouldn't be getting them.

  348. Kev

    I don't know, I'm kinda concerned that people are going to go down the "Oh, let's annotated such-and-such special casing" like we have with no-copy and no-store at the moment.

  349. MattJ

    Indeed

  350. Kev

    In principle, it's technically equivalent.

  351. Kev

    I still feel we might want to start sending messages from the bare JID instead of the full JID.

  352. MattJ

    from or to?

  353. Kev

    From.

  354. MattJ

    I hadn't considered changing from

  355. Kev

    You certainly want to be sending to the bare JID.

  356. Kev

    Although if we're saying "treat all messages to a full JID as to a bare JID unless they have an ephemeral annotation", that may be reduced, I guess.

  357. Maranda

    Hmm conversations lost the message I sent here this morning from the backlog hm hm

  358. Kev

    I need to find time to write some specific words here, so we can bash them, I think.

  359. Ge0rG

    https://marc.info/?l=openbsd-misc&m=151974573718360&w=2 - Alright, I'm not complaining about XMPP protocol design any more

  360. jonasw

    Ge0rG, lol

  361. Ge0rG

    Yup. OpenSSL. Still written by monkeys.

  362. moparisthebest

    Random question without much thought, why can't the one true message id be implicit as the hash of the whole stanza?

  363. SaltyBones

    It's hard to define what should go into the hash and then some "things" change those things anyway so the ID would change...

  364. moparisthebest

    But isn't just hash the entire thing good enough?

  365. SaltyBones

    moparisthebest, yesterday I would have said yes but now it is clear that people don't just want unique IDs they want very specific IDs and pick them themselves.

  366. moparisthebest

    They can still do that

  367. SaltyBones

    moparisthebest, just read the backlog from today :)

  368. moparisthebest

    The public one is the hash, they can use whatever as the private one

  369. moparisthebest

    Encoding implementation decisions into the protocol seems wrong

  370. moparisthebest

    Especially when it has loads of downsides

  371. MattJ

    moparisthebest, hashing XML is problematic, and in any case the same stanza may change en-route

  372. MattJ

    Unless you're saying it's just hashed after the first hop

  373. goffi

    I was thinking about hash too, but the issue with hash is that you have to find one without collision. If you change, you'll break all existing ecosystem.

  374. SaltyBones

    moparisthebest, the problem is that we leak the private one because it is required for MAM queries.

  375. SaltyBones

    see my 13:25 comment :)

  376. Kev

    moparisthebest: Stanzas might change at every hop. So you can't just hash the whole thing.

  377. Ge0rG

    moparisthebest [14:11]: > Encoding implementation decisions into the protocol seems wrong Hashing parts of a message into its id is just that

  378. Kev

    goffi: Hashes changing is a solved problem, at least, you just specify the hash used.

  379. Ge0rG

    We could just replace messages with their cryptographic ids and become the next peer to peer distributed content storage network

  380. goffi

    Kev: yes, but what for already emitted IDs ?

  381. Kev

    goffi: They don't have an embedded scheme.

  382. moparisthebest

    Ge0rG, I'm not saying hashing parts, that gets complicated, I'm saying hash the entire thing

  383. moparisthebest

    as to changing at server hops, doesn't the id only matter between client and their server?

  384. moparisthebest

    so my client sends a message which I know has id AAAA because that's the hash

  385. moparisthebest

    my server can change it, if it does, it sends me back a message telling me AAAA is now BBBB

  386. moparisthebest

    does that not solve everything?

  387. Kev

    No the idea matters between endpoint entities.

  388. Kev

    No the id matters between endpoint entities.

  389. moparisthebest

    if any server can change the message, the id can only matter between a client and their server?

  390. Kev

    No, the id matters end to end.

  391. Kev

    But the content of a stanza might be changed at any hop.

  392. Kev

    So hashing to generate an id doesn't work.

  393. moparisthebest

    so now you might have an id that is the same and different contents?

  394. moparisthebest

    what's the point exactly?

  395. Kev

    See <delay/> for an obvious application.

  396. moparisthebest

    what's the point in a@a.com having the same id as b@b.com ?

  397. moparisthebest

    surely it only matters between a@a.com and a.com, and b@b.com and b.com ?

  398. Kev

    Because otherwise you can't reply to previous messages, which you obviously need to be able to do.

  399. moparisthebest

    wait where is this concept of replying to a specific message?

  400. moparisthebest

    as far as I'm aware, there is just a guaranteed order and that's it

  401. Kev

    In assorted XEPs.

  402. Kev

    LMC, Receipts, ...

  403. Ge0rG

    You'd have to track the message id associations for all eternity.

  404. moparisthebest

    it sounds flawed at a basic level, in a federated system, where a message can change at any server hop, how can you expect an id to refer to remotely the same thing on opposite servers?

  405. moparisthebest

    but really hashing would still work right? the server knows the incoming hash and the outgoing hash

  406. moparisthebest

    when it gets a read receipt etc etc, it just reverse maps it on the way out?

  407. SaltyBones

    Ge0rG, you need to track that anyway because read receipts, right?

  408. SaltyBones

    I mean the client has to do it not the server but still..

  409. Ge0rG

    SaltyBones: the client won't know the effective id between server a and server b

  410. moparisthebest

    and doesn't need to Ge0rG ?

  411. Ge0rG

    moparisthebest: yes, you need to reverse map, for the lifetime of the message. Which might be months.

  412. moparisthebest

    a@a.com can't talk directly to b.com

  413. moparisthebest

    sure

  414. Holger

    moparisthebest: Message contents aren't unique so you can't use a hash as an ID.

  415. jonasw

    inb4 nonce

  416. moparisthebest

    Holger, I don't understand what you mean, I mean hash an entire stanza for an id

  417. jonasw

    moparisthebest, you can’t reasonably expect a re-writing server to map between IDs for all eternity, *plus* to know all protocols where message IDs may be referenced

  418. moparisthebest

    if you rewrite, you map, easy

  419. moparisthebest

    shouldn't need to know any specific protocols?

  420. Holger

    moparisthebest: Entire stanza contents aren't unique either.

  421. jonasw

    moparisthebest, a server would have to re-write a clients reference to another ID, e.g. for XEP-0184 (reciepts) or Last MEssage Correction.

  422. moparisthebest

    Holger, I don't understand, if 2 stanzas hash to the same id they are the same stanza

  423. Holger

    moparisthebest: But they are still two stanzas.

  424. jonasw

    moparisthebest, but maybe sent at a different time.

  425. moparisthebest

    no they are just 1 stanza

  426. jonasw

    like "that’s a good idea", I send that maybe ten times a week in here

  427. jonasw

    a stanza is always its context

  428. Holger

    moparisthebest: Hah what?!

  429. jonasw

    (aaand here we are at matrix’ DAG thing)

  430. Maranda

    Do I have to mention what kind of hard fail hashes are? Does DKIM ring a bell?

  431. moparisthebest

    storage-wise you store them once etc?

  432. jonasw

    Maranda, yeah, good point

  433. jonasw

    oh my god

  434. Holger

    moparisthebest: "etc" :-)

  435. Holger

    moparisthebest: What jonasw said.

  436. moparisthebest

    ah you are saying if you send the exact same stanza every day or something, got it

  437. moparisthebest

    but maybe the rest would work? if id's are only valid per-hop

  438. moparisthebest

    and anything rewriting the id keeps a map for as long as needed?

  439. jonasw

    moparisthebest, how long is "as needed"?

  440. jonasw

    eternity?

  441. moparisthebest

    well for a server it'd be as long as it had the message

  442. jonasw

    especially with non-IM use cases I can imagine "as long as needed" can be quite a while

  443. Holger

    moparisthebest: So you're hashing contents and keeping a map because the contents of a given stanza may change and ignoring the fact that different stanzas might have identical stanzas. But apart from that hashing contents sounds like a perfect solution yes.

  444. moparisthebest

    in mam/smacks/offline storage

  445. jonasw

    moparisthebest, what about references to that message?

  446. Holger

    *identical contents

  447. moparisthebest

    Holger, no I've scrapped hashing :P

  448. Holger

    Ah.

  449. moparisthebest

    jonasw, surely those are only good while there is something to reference?

  450. jonasw

    moparisthebest, another server might have a MAM for longer than you do

  451. Maranda

    moparisthebest, good boy that's for the best 🤗

  452. Maranda

    (scrapping hashes)

  453. moparisthebest

    Maranda, to be fair that was my first question (if you want to uniquely identify a message why wouldn't hashing work?)

  454. moparisthebest

    to which the answer was, we need to uniquely identify a message as well as it's position in the stream

  455. Kev

    There were many answers, and I think that's one of the few things that wasn't an answer.

  456. moparisthebest

    jonasw, in which case it has a map?

  457. Maranda

    I guess that was plentily answered already by multiple sources about the "why"

  458. moparisthebest

    the answers I saw about hashing were 'well you have to decide what to hash' which is different

  459. Maranda

    Beside that attempting to reinvent "a DKIM version" for stanzas/xmpp is a horrifying thought 😘

  460. jonasw

    Maranda, but SPIM!!kk

  461. moparisthebest

    dkim is an entirely different solution for an entirely different problem

  462. moparisthebest

    that xmpp already has solved from day 1

  463. moparisthebest

    (that problem is, is server X allowed to send messages for domain Y)

  464. Ge0rG

    Can't we just store the message content on the blockchain and only exchange message IDs?

  465. moparisthebest

    so what's the problem with a simple solution like, client sets id, if any server changes it it keeps a map, the end?

  466. moparisthebest

    servers don't *have* to change it, but if they do, they keep a map

  467. Maranda

    moparisthebest, sorry to contradict but that's not what DKIM ultimately *does*, not that it's important though.

  468. moparisthebest

    that's the goal isn't it Maranda ?

  469. Maranda

    Nope DKIM is more about message authentication, contraffaction and tampering prevention.

  470. moparisthebest

    I think it has that side-effect because of the hashing, but the goal was server-that-sent-this-was-authorized-by-domain

  471. Maranda

    You're confusing with SPF me thinks.. And both are failing that's why they had to invent a third, DMARC that somehow fails too.

  472. moparisthebest

    and there are 2 methods, SPF doesn't hash but is only useable at first hop, and DKIM hashes and is therefore useable through multiple hops (as long as no servers change the hashed part :))

  473. Holger

    > DKIM provides a method for validating a domain name identity that is associated with a message through cryptographic authentication. http://dkim.org/

  474. moparisthebest

    DMARC is not a 3rd, it's just enforcing/reporting on SPF and DKIM ?

  475. moparisthebest

    still unsure why we are discussing this, XMPP already guarantees the sending server is authorized by the domain

  476. Holger

    Someone mentioned DKIM out of the blue, someone else responded :-)

  477. Holger

    I'd like to get back to FTP again!

  478. Maranda

    DMARC, nope not just reporting, and I'd avoid reading just introductions. Saves headache laters.

  479. moparisthebest

    I said it was enforcing and reporting

  480. moparisthebest

    and that's all it is?

  481. Maranda

    You did? Oh you did I'm blind apologies blame the cold exposure 😆

  482. moparisthebest

    that's fully understandable, unfortunately :)

  483. Maranda

    That was a grotesque example to explain how inadeguate I think hashes are in stanzas context, no big deal anyways. Brb.

  484. Kev

    Holger: Servers change IDs per-hop based on a hash of the contents, store the mapping between IDs, entities fetch the mapping over FTP and do the lookups there. Address of the FTP server is stored in a blockchain.

  485. Kev

    You're welcome.

  486. moparisthebest

    I feel like you're missing an opportunity to use GOPHER in there someplace

  487. Holger

    Kev: Perfect!

  488. Dave Cridland

    Can we guarantee forward secrecy of ids?

  489. Kev

    Yes, but not perfectly.

  490. Dave Cridland

    Also, no need to use a hash. We could base64 the entire stanza into the id attribute.

  491. Dave Cridland

    No collisions, and no need for hash agility then.

  492. jonasw

    Dave Cridland, ELOOP

  493. Holger

    We base64 the stanza including the original id attribute and then replace it with the result?

  494. Dave Cridland

    Without the id attribute, obviously. It'll solve the c14n problem.

  495. Kev

    Holger: No, you base64 it including the *new* id.

  496. Holger

    Ah. Now it makes sense to me.

  497. Kev

    Else the stanza's changing and you'd need a new id.

  498. Dave Cridland

    Kev, I don't know why you're being silly. My suggestion was practical, and just as sensible as all the others.

  499. jonasw

    Dave Cridland, it’s possible to do

  500. Kev

    One of those two statements is true.

  501. jonasw

    since there’s no length field, you can put the resul… nevermind

  502. jonasw

    oh my god

  503. jonasw

    I really should get to sleep

  504. MattJ

    I just switched to this tab, I can't tell what's a joke and what's not any more

  505. jonasw

    MattJ, assume everything is

  506. Kev

    MattJ: That's the joke.

  507. Tobias

    and don't forget, today is opposite day :)

  508. Dave Cridland

    Tobias, OR IS IT!!?!??!!

  509. SaltyBones

    So, to bring it back a bit. It seems this view is currently popular: The server needs to pick his own IDs, the client needs to use these IDs for MAM queries and we will add reflection so that using reflection and carbons a client gets copies of all its messages to have those IDs.

  510. moparisthebest

    why is it more important for the server to pick it's own IDs than the client?

  511. Kev

    Concrete proposal: Set origin-ID uniquely on the client, add another id any time something archives it and wants it available, reflect that id back to the first client on first hop. Set the stanza id to the same as the origin-id, but generally ignore it and use the origin-id where available in things like LMC.

  512. SaltyBones

    I don't think it is an issue of what is more important it's just that the server writers want to do that. I am not one so I cannot tell you why. :)

  513. moparisthebest

    so I propose they can do whatever they want, they just need to keep a map?

  514. Ge0rG

    moparisthebest: keeeping a map is a hard task.

  515. Ge0rG

    moparisthebest: also actually replacing all references according to the map, because you don't know what's a reference and what's just random data.

  516. moparisthebest

    I'm pretty sure it's one of the simplest tasks in computer science

  517. SaltyBones

    Ge0rG, true but now we need the client to keep the map or to change the ID of old messages or something...it also seems hard :)

  518. moparisthebest

    it's not naming, cache invalidation, or off-by-one errors :P

  519. Kev

    No, it's two of those things in one :)

  520. Ge0rG

    moparisthebest: actually it is a part of cache invalidation.

  521. Zash

    Off by one naming of invalid caches

  522. SaltyBones

    But the point stands, doesn't the work still have to be done but now it must be done by the client?

  523. Kev

    No.

  524. SaltyBones

    It needs the origin-ID for references and the stanza-ID for MAM queries....

  525. Kev

    It doesn't need any mapping.

  526. moparisthebest

    I thought the point was to hose all those and go to 1 id ?

  527. Ge0rG

    and the message ID in case the origin-ID gets stripped

  528. Kev

    Ge0rG: I suggest (and it's a novel suggestion, because I know no-one's suggested it before) setting the id to the same as the origin id.

  529. Ge0rG

    Kev: you'll never get the author convinced to do that

  530. SaltyBones

    Kev, I'm not sure I agree that keeping two IDs for messages is very different from a mapping... :)

  531. Ge0rG

    SaltyBones: the client needs to keep an index on the origin-ID, but probably not on the MAM ID

  532. Ge0rG

    I need to look up messages by origin-ID for LMC and ACKs, but not when fetching an archive

  533. SaltyBones

    Don't you have to merge the local and MAM archive somehow?

  534. moparisthebest

    in fact I think keeping 2 id's and an index on one is the very definition of a map

  535. jonasw

    Dave Cridland, I sent you an email with https://github.com/xsf/xeps/pull/593 for the council agenda :/

  536. Ge0rG

    moparisthebest: the difference is that on the client, you store that as part of the message DB, and you can clean it up together with the messages

  537. Kev

    SaltyBones: These are logically two different things. You need (temporarily) a way of correlating messages and their replies ,which is origin-id. For MAM sync you only need a single ID, which is the latest thing to go in the archive that you've seen (and, depending on your model, even that is optional).

  538. Kev

    I don't see a situation in which you ever need to map between the two.

  539. moparisthebest

    so what if the client sets an id, and if the server wants to change it, it just sends that info back to the client and doesn't keep a map?

  540. moparisthebest

    what's the downside of a single id ?

  541. Ge0rG

    moparisthebest: it won't work.

  542. moparisthebest

    why not?

  543. Ge0rG

    I'm sure this has been outlined in here multiple times today

  544. moparisthebest

    client sends id=A, server sends back A is now B, client changes id=A to id=B, done?

  545. Ge0rG

    moparisthebest: what if the client disconnects after sending A?

  546. moparisthebest

    smacks/mam handles all that

  547. Ge0rG

    moparisthebest: except when you don't know that A is B now and the smacks session expires

  548. moparisthebest

    B still gets it with mam though

  549. moparisthebest

    and C who knows nothing about id=A just ignores it

  550. SaltyBones

    Kev, it seemed to be annoying for client devs to handle the different kinds of IDs and merge them and use the appropriate one everywhere but maybe I just misunderstood...

  551. moparisthebest

    it seems to be annoying for both client and server devs

  552. Kev

    SaltyBones: I don't think it's a significant problem, just that sometimes people aren't sure which id to use.

  553. Kev

    (Because everything that talks about the id was written back when there was only the stanza id, and so didn't need to be explicit which one)

  554. Ge0rG

    e) none of the above.

  555. moparisthebest

    which turns out to be the significant problem

  556. SaltyBones

    Yeah, maybe. From this far away I really can't tell how I would handle syncing local history with mam :)

  557. MattJ

    There is only one id that MAM is concerned about, ignore everything else

  558. SaltyBones

    Sure, so clients will store everything with origin-ID first, then add the stanza-ID when they receive the reflection and then just merge in other messages from MAM based on that, right?

  559. moparisthebest

    I mean when everything gets this wrong you can pretend it's not a problem, just like everyone did for years with XHTML-IM, that doesn't make it not-a-problem though

  560. MattJ

    SaltyBones, personally I don't really understand why origin-id exists

  561. moparisthebest

    and to be clear I don't mean in the future things might get this wrong, I mean essentially any newly written thing gets this wrong now

  562. Ge0rG

    MattJ: because of MUC reflections.

  563. SaltyBones

    MattJ, I think most people agree that it is superfluous and should be the same as message-ID.

  564. MattJ

    Ge0rG, and I think servers breaking MUC reflections are broken

  565. Ge0rG

    and because back in 2014, somebody refused to mandate that MUCs shall retain the ID on reflection.

  566. MattJ

    so lets do that now, because 99% of servers get this right

  567. Ge0rG

    MattJ: OK. I'll revive the thread.

  568. MattJ

    and stop making this id discussion so much more confusing

  569. MattJ

    As I recall the most vocal opponent to mandating id preservation since changed their mind

  570. Ge0rG

    Okay, the other reason was that on origin-id you can assume client-enforced uniqueness, which you can't on @id

  571. SaltyBones

    what?

  572. MattJ

    So then we're back to stanza-id for tracking between you and your server, and @id for end-to-end tracking

  573. SaltyBones

    why would a client be able to generate unique origin-ID but not unique message-ID?

  574. Ge0rG

    SaltyBones: a client isn't *guaranteed* to generate a unique @id

  575. MattJ

    Who cares?

  576. Ge0rG

    I don't know.

  577. Ge0rG

    maybe people doing references.

  578. MattJ

    The only entity concerned with the uniqueness of @id are clients that generate them

  579. Zash

    Reference them*

  580. SaltyBones

    But if it *can* generate a unique origin-ID it can generate a unique message-ID, yes? :)

  581. Ge0rG

    MattJ: clients that process incoming @id's too, for references and ACKs

  582. MattJ

    so if you're doing receipts/LMC/etc. then just be sure you generate sensible ids

  583. SaltyBones

    But if it *can* generate a unique origin-ID it can generate a unique message-ID, can't it? :)

  584. Ge0rG

    SaltyBones: yes. But with @id you don't know from the outside, with origin-id you do

  585. SaltyBones

    Ge0rG, you mean it's not mandated in the spec?

  586. Ge0rG

    SaltyBones: no. @id is optional

  587. MattJ

    SaltyBones, that's the whole root of this discussion

  588. Ge0rG

    SaltyBones: you could send all your messages with id="badgerbadger"

  589. SaltyBones

    MattJ, maybe, I'm haven't been around long enough to have seen the root of this discussion. ;)

  590. Ge0rG

    SaltyBones: https://mail.jabber.org/pipermail/standards/2014-July/028988.html

  591. MattJ

    @id is optional and controlled entirely by the sending client, nobody except that client can use it for anything. If you generate an error reply, you reflect the id attribute, that's all

  592. SaltyBones

    Ge0rG, ...I can't even imagine that "it seemed like a good idea at the time"

  593. Ge0rG

    SaltyBones: MUC is full of such ideas.

  594. MattJ

    Second problem is that some MUC server(s?) did not preserve the id attribute in MUC rooms, which broke some clients when they received their own messages back with a different id attribute

  595. flow

    > Ge0rG> SaltyBones: you could send all your messages with id="badgerbadger"

  596. flow

    I don't think this is true

  597. flow

    at least for messages part of the same session

  598. Ge0rG

    flow: > It is up to the originating entity whether the value of the 'id' attribute is unique only within its current stream or unique globally.

  599. Ge0rG

    flow: now I could join this MUC with a multi-session nick, reset my session after each MUC message and you'd end up full of badgers.

  600. Ge0rG

    or do the same to you via type=chat.

  601. flow

    Right, but not within the same session/stream. I just wanted to clarify that

  602. Ge0rG

    @id is an end-to-end property, so binding it to the session lifetime doesn't make any sense.

  603. Ge0rG

    flow: technically you are correct.

  604. flow

    just a matter of the definiton of end"

  605. Ge0rG

    Winter's coming!

  606. Zash

    Nah, noh it ends

  607. SaltyBones

    So, to sum up: Add reflection of messages to make it easier to figure out how to query MAM otherwise everything has to be the way it is...?

  608. SaltyBones

    Maybe document better what every kind of ID is used for to make it easier for devs?

  609. MattJ

    As far as I'm concerned there is one id set by the client and one id set by the server

  610. flow

    <origin-id/> was invented mostly a workaround for the MUC reflection issue

  611. SaltyBones

    MattJ, ...and the client set one is origin-ID the server set one is stanza-ID.

  612. MattJ

    I strongly feel that origin-id should go

  613. MattJ

    and that any broken MUC services should be fixed

  614. Ge0rG

    flow: except it doesn't actually solve it, as seen with biboumi.

  615. SaltyBones

    Okay, so move origin-ID to message-ID and forbid rewriting.

  616. flow

    Ge0rG, m0ar pls

  617. Ge0rG

    I'll bring it up on council.

  618. MattJ

    flow, summary is that transports can't always preserve it

  619. flow

    SaltyBones, why move? just use rfc6120 IDs like before

  620. SaltyBones

    I mean conceptually, move the responsibility...

  621. MattJ

    which puts them in the "broken MUC server" category as far as I'm concerned

  622. Kev

    FWIW, transports don't have to be written in such a way as they lose them.

  623. SaltyBones

    Kev, what?

  624. SaltyBones

    Kev, what? parse_error

  625. Kev

    The ids

  626. Maranda

    Biboumi... 🤔

  627. SaltyBones

    Kev, ah, you're saying that transports can always be written in such a way that they do not lose IDs?

  628. moparisthebest

    not if it's impossible to keep a map of IDs >:)

  629. Kev

    SaltyBones: At the cost of complexity.

  630. SaltyBones

    Sure, sure

  631. SaltyBones

    Yeah forbidding ID mangling seems like it would be a very same thing to do

  632. SaltyBones

    Should standza-IDs be transmitted btw? Or is that between client and server only?

  633. SaltyBones

    s/same/sane

  634. MattJ

    SaltyBones, the latter. It's stamped on incoming stanzas (to the user) by the server, to let the client know what id the server has assigned it (e.g. in the MAM archive)

  635. MattJ

    and in some version of the future, it will also be stamped on reflected outgoing messages

  636. SaltyBones

    And are stanza-IDs used anywhere else? They seem to be presented as this kind of general concept that can be used to add stable IDs for some sort of domain...

  637. Kev

    They started off as just a part of MAM. They were extracted out (probably wrongly).

  638. Kev

    Well, no, not quite wrongly.

  639. Kev

    Because they're used beyond MAM, they're also going to be used for Unread sync, and injected into Carbons and stuff.

  640. MattJ

    SaltyBones, originally MAM used to stamp <archived by="archive-jid" id="unique-id-for-mam-queries" />

  641. MattJ

    But the general feeling was that this unique id shouldn't be MAM-specific, but reusable

  642. SaltyBones

    Yeah, I'm just wondering if it has actually ever been used for anything and if tha anything is also between client and server or not.

  643. Kev

    Yes, only between client and server (or client and client)

  644. Kev

    Unread sync is the obvious one that it's needed.