jdev - 2025-04-12


  1. bodqhrohro

    > 2025-04-11T20:58:31Z - theTedd: > When the aim is to log in on mobile, you'll already be using data to request the code, and then presumably chatting afterwards The SIM is not necessarily installed in the same device.

  2. bodqhrohro

    > 2025-04-11T18:36:25Z - Zash: > but '77 doesn't really support flows like "enter an email, then enter the code we sent to that email", but https://xmpp.org/extensions/xep-0389.html was meant to allow that kind of thing Wow, I'm implementing a login wizard via Ad-Hoc right now, because XEP-0077 does not support multiple stages. Is it implemented in some clients already?

  3. bodqhrohro

    I'm not sure though if it's suitable for the case, probably still not.

  4. singpolyma

    I don't think it's implemented anywhere no

  5. badrihippo

    I'm hoping to implement it for a few clients though, once I figure out the details and get a funding green light from Prav

  6. badrihippo

    bodqhrohro, tell me more about your use-case?

  7. badrihippo

    So I've been thinking about FAST and it looks like combined with extensible IBR we have all we need for actual passwordless authentication?

  8. badrihippo

    If I understood the specs right, I can use extensible IBR the first time to receive a one-time login code to (email or mobile) and register the user if it matches

  9. badrihippo

    Then each time the user wants to log in from a new client we use FAST to trigger another one-time code, after which the client gets a token for future reconnections

  10. badrihippo

    One flaw is the client would get *two* codes the first time (once for registration, and once for login)

  11. badrihippo

    Unless there's something in the reg spec that lets the server say "okay cool you're registered and also authenticated so you can continue using the existing connection"? But that would *also* have to say "...and here's your FAST token" so things get a bit complicated 🤔

  12. badrihippo

    https://xmpp.org/extensions/xep-0389.html#example-15

  13. badrihippo

    After successful registration (at the point linked to above) is the negotiation considered complete (as if they've also authenticated) or does the client has to renegotiate (i.e. authenticate again)?

  14. badrihippo

    Equivalent question for whatever the `jabber:iq:register` RFC is

  15. badrihippo

    > well: > > You're welcome to implement it. or write a XEP Just learnt about this utilisation of XEP-0070 that actually implements "Sign into website with XMPP"! https://blog.agayon.be/xmpp_auth_django.html

  16. bodqhrohro

    > <badrihippo> > bodqhrohro, tell me more about your use-case? Multi-stage login via a transports. It already works via text commands, and via separate Ad-Hoc commands, I'm just duplicating it as a wizard also.

  17. bodqhrohro

    > <badrihippo> > bodqhrohro, tell me more about your use-case? Multi-stage login via a transport. It already works via text commands, and via separate Ad-Hoc commands, I'm just duplicating it as a wizard also.

  18. badrihippo

    Interesting. Did that work out of the box in clients or did you have to customise on that end too?

  19. badrihippo

    Interesting. Did that work out of the box in clients or did you have to customise on the client end too?

  20. bodqhrohro

    badrihippo: Ad-Hoc works well in many clients for decades already. There are indeed some tiny problems, e.g., Gajim didn't support multiple notes per a command result (I've sent a patch for that), and Psi+/Tkabber don't as well (still didn't even report). And there some bugs in forms in another.im and probably in Cheogram too.

  21. singpolyma

    bodqhrohro: multiple notes it should show only one of them per spec

  22. singpolyma

    But yes IMO every user facing flow should be built on ad hoc unless there's a very good reason not to

  23. Zash

    Is "you don't have an account yet" a good reason?

  24. singpolyma

    No?

  25. Zash

    I guess you can do it by first granting a limited account and then upgrading later.

  26. singpolyma

    You don't need an account. Same as ibr

  27. singpolyma

    If you're just talking to the server

  28. Zash

    So more iq stanzas before resource binding? That's not supposed to be allowed and only exists for historical reasons

  29. singpolyma

    Well we're talking about account registration. It's the same case where we do this already

  30. Zash

    For ugly historical reasons

  31. Zash

    Let's not add more of it

  32. bodqhrohro

    > 2025-04-12T13:08:47Z - singpolyma: > bodqhrohro: multiple notes it should show only one of them per spec Ehm, really?

  33. singpolyma

    Zash: Im not proposing adding more. Just keeping the one we have and using a different syntax

  34. Zash

    But I want it gone :(

  35. singpolyma

    bodqhrohro: yes. A command may have multiple payloads but they are alternatives to each other

  36. singpolyma

    Zash: how would you do registration then?

  37. Zash

    IBR2?

  38. singpolyma

    Which somehow doesn't need to communicate before having an account?

  39. Zash

    Wait what the, who put an iq there?

  40. singpolyma

    I can't imagine any way torke an IBR replacement without iq

  41. badrihippo

    > You don't need an account. Same as ibr I didn't know that!

  42. Zash

    Prosody doesn't even treat those as iq stanzas, because stanzas aren't allowed before resource binding (and authenticating)

  43. badrihippo

    > For ugly historical reasons What's the history?

  44. Zash

    badrihippo, in 1999, iq stanzas was used for everything

    👀 1
  45. singpolyma

    Zash: Oh so you just want to replace with IQ equivalent nonzas?

  46. Zash

    singpolyma, yes

  47. Zash

    like auth and everything else going on before resource binding

  48. singpolyma

    That seems worse. Nonzas are gross. But I guess it's equivalent

  49. singpolyma

    Why not a nonza named iq 😉

  50. Zash

    Noooooo!

  51. Zash

    We already have too many of those

  52. singpolyma

    Making up new names seem like where the "more of those" come from but fine. If we pick the other name and keep the payloads the same I can still use the ad hoc code path so I don't really care

  53. singpolyma

    Or I guess use the <command element as a nonza directly why not

  54. Zash

    Pre-bind <iq> requires more involved routing that the simple name+namespace dispatch used for other stream elements

  55. Zash

    also stanzas are supposed to be routable, which isn't allowed pre-auth/bind

  56. badrihippo

    I'm new to this part of the stream, but isn't the entire negotiation a sequence of request/responses anyway? So "iq" is kind of anyway implied for everything and there's no need to make it explicit just for one case?

  57. singpolyma

    Yes obviously an IQ with a to attribute would not be allowed pre bind

  58. singpolyma

    badrihippo: sure

  59. badrihippo realises that could also be an argument to add *more* iq to everything

  60. singpolyma

    Yes

  61. singpolyma

    Its the same either way. Using iq is slightly simpler but it doesn't really matter I guess

  62. singpolyma

    So long as we use <command

  63. badrihippo

    Looking at Zash's comments I think I need to read the code before forming a ~judgement~ opinion

  64. badrihippo

    To understand the technical part

  65. singpolyma

    An IQ can only have one payload so as long as you won't have multiple in flight at once using the payload directly is equivalent to using an iq

    👍🏽 1
  66. bodqhrohro

    > 2025-04-12T13:16:27Z - Zash: > But I want it gone :( Could you point me to an exact excerpt? I can't find anything like that, yet I see multiple explicit mentions that there can be multiple <note> elements. If payloads are supposed to be alternatives, then how are actions are supposed to be provided along with forms? I assume the same applies to notes: they are supposed to accompany other elements, not to replace them. Or does this apply only to elements of the same type? Also, it seems that spec-wise the whole set of children elements of the <command> element is considered a "payload", not individual elements or one of them.

  67. bodqhrohro

    > 2025-04-12T13:16:27Z - Zash: > But I want it gone :( Could you point me to an exact excerpt? I can't find anything like that, yet I see multiple explicit mentions that there can be multiple <note> elements. If payloads are supposed to be alternatives, then how are actions supposed to be provided along with forms? I assume the same applies to notes: they are supposed to accompany other elements, not to replace them. Or does this apply only to elements of the same type? Also, it seems that spec-wise the whole set of children elements of the <command> element is considered a "payload", not individual elements or one of them.

  68. Zash

    Huh?

  69. singpolyma

    Actions aren't a payload in the same way

  70. bodqhrohro

    > 2025-04-12T13:32:13Z - Zash: > Huh? Sorry, popup buttons in Gajim work unclearly for narrow rows and I miss the proper message sometimes.

  71. bodqhrohro

    Eww, they just got out of sync when scrolling.

  72. Zash

    https://cerdale.zash.se/s/067fa6bb-a04c-7ee4-8ceb-4a7120b4fc3f/345b2074-b9ef-4b70-98d5-cfa7d1641a9a.png

  73. singpolyma

    > When the precedence of these payload elements becomes important (such as when both "jabber:x:data" and "jabber:x:oob" elements are present), the order of the elements SHOULD be used. Those elements that come earlier in the child list take precedence over those later in the child list.

  74. singpolyma

    > The children of a <command/> element (other than <actions/> and <note/>) pertain to the command's execution. The order of these elements denote their precedence, so that those elements earlier in the list have higher precedence.

  75. bodqhrohro

    > 2025-04-12T13:33:47Z - singpolyma: > > When the precedence of these payload elements becomes important (such as when both "jabber:x:data" and "jabber:x:oob" elements are present), the order of the elements SHOULD be used. Those elements that come earlier in the child list take precedence over those later in the child list. I saw this, but what does "precedence" mean exactly? "Pick one" or "take order into account"?

  76. bodqhrohro

    > 2025-04-12T13:35:44Z - singpolyma: > > The children of a <command/> element (other than <actions/> and <note/>) pertain to the command's execution. The order of these elements denote their precedence, so that those elements earlier in the list have higher precedence. And this also means <note> is special along with <actions>.

  77. singpolyma

    Yes the second one says note is special which makes no sense and isn't now anyone implements it

  78. singpolyma

    Precedence means "which one you choose"

  79. singpolyma

    Eg I often deliver a note or form and oob with oob first so it is used when supported and when not supported the note or form is used

  80. singpolyma

    Based on how implementations work and how the rest of the spec reads I expect the (excepts actions or note) should just say (except actions)

  81. Zash

    https://xmpp.org/rfcs/rfc6120.html#rfc.section.4.3.5 has some words the effect of forbidding stanzas prior to completing stream negotiation and points out resource binding as an *historical* exception to that rule. Seems much cleaner to me to keep handling of stream negotiation (and e.g. xep-198 acks) separate from stanza routing.

  82. bodqhrohro

    > 2025-04-12T13:37:15Z - singpolyma: > Yes the second one says note is special which makes no sense and isn't now anyone implements it It makes sense because there are multiple types of notes which have different purpose.

  83. bodqhrohro

    > 2025-04-12T13:39:56Z - singpolyma: > Based on how implementations work and how the rest of the spec reads I expect the (excepts actions or note) should just say (except actions) I think implementations are just not well-polished enough because Ad-Hoc had little real use historically and wasn't battle-tested enough. AFAIR, there were even plans to remove it from Gajim because the code is rotten and abandoned, but someone insisted to keep it.

  84. lovetox

    i think you remember something wrong there

  85. bodqhrohro

    Maybe, I have no proofs there :P

  86. lovetox

    the only problem over the years i ran into with adhoc were more about the dataform which is included than about adhoc

  87. lovetox

    e.g. my text is not dispalyed pretty in this dataform

  88. bodqhrohro

    > 2025-04-12T13:51:19Z - lovetox: > the only problem over the years i ran into with adhoc were more about the dataform which is included than about adhoc Yup, aforementioned another.im bugs also happen with dataforms rather than in the scope of Ad-Hoc itself. (do forms have use out of Ad-Hoc though?)

  89. singpolyma

    >> 2025-04-12T13:37:15Z - singpolyma: >> Yes the second one says note is special which makes no sense and isn't now anyone implements it > It makes sense because there are multiple types of notes which have different purpose. Do you have an example of including two types of notes in one response?

  90. singpolyma

    >> 2025-04-12T13:51:19Z - lovetox: >> the only problem over the years i ran into with adhoc were more about the dataform which is included than about adhoc > Yup, aforementioned another.im bugs also happen with dataforms rather than in the scope of Ad-Hoc itself. > (do forms have use out of Ad-Hoc though?) Yes they do. In IBR for example. And MUC config

  91. bodqhrohro

    > 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about update properties, and one `warn` with a notice about corrected or rejected parameters. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.)

  92. bodqhrohro

    > 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated properties, and one `warn` with a notice about corrected or rejected parameters. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.)

  93. bodqhrohro

    > 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated options, and one `warn` with a notice about corrected or rejected parameters. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.)

  94. bodqhrohro

    > 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated options, and one `warn` with a notice about corrected or rejected optoins. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.)

  95. bodqhrohro

    > 2025-04-12T14:02:42Z - singpolyma: > Do you have an example of including two types of notes in one response? I have a configuration form where some options are incompatible with others and may be automatically harmonized on validation stage. Or incompatible with the server configuration, and thus also automatically changed. The transport informs about this in the command result, and thus there are two notes: one "usual" `info` about updated options, and one `warn` with a notice about corrected or rejected options. Technically, I could stuff them into one `warn` note, yet it would look meh. There are also some validation errors which can be displayed this way (`info` note and an `error` note), yet they can only occur with a misbehaving client, i.e. using a wrong widget for the field or an unknown name, so they shouldn't occur normally. There also were mutually dependent options, but they were removed already. (New ones may appear in the future though.)

  96. singpolyma

    So you have an error but you also include a seperate info note? 🤔

  97. bodqhrohro

    Actually, this is a legacy of mapping the CLI way to the form, where one command could change only one option at a time. I might consider reworking it, i.e., ping back the corrected form to the user to check and confirm it, and also to reject it altogether if there are problems with certain fields. Yet I think listing the changed options is easier than to spot what was changed in the form. As there are no rich means for interactive validation.

  98. bodqhrohro

    > 2025-04-12T14:14:42Z - singpolyma: > So you have an error but you also include a seperate info note? 🤔 Yup. "ERROR: Success", lol.

  99. singpolyma

    The wording there sort of implies you can have a note *and* a form too which seems odd since a firm can already display whatever. I've always done precedence with notes alongside everything

  100. bodqhrohro

    singpolyma: this time I'm talking about the completion stage. But a note and a form is an even more valid case regarding validation. How to display the reason the form was rejected otherwise? Show a message and provided a "prev" action to go to the previous stage and correct it? Doesn't seem flexible really.

  101. bodqhrohro

    singpolyma: this time I'm talking about the completion stage. But a note and a form is an even more valid case regarding validation. How to display the reason the form was rejected otherwise? Show a message and provide a "prev" action to go to the previous stage and correct it? Doesn't seem flexible really.

  102. bodqhrohro

    I also remember trying to add some instructions on filling the form, yet I probably rejected this idea exactly because there's no robust way to do that with current clients.

  103. singpolyma

    A form can show text already with instructions elements etc. Don't need a note for that

  104. lovetox

    but is it the right thing to do

  105. lovetox

    its not about sending just text, its about telling the client that an error or warning happend

  106. lovetox

    just writing it into the instruction text gives the client no chance to properly display whats happened

  107. bodqhrohro

    > 2025-04-12T15:00:12Z - singpolyma: > A form can show text already with instructions elements etc. Don't need a note for that Hmm, yeah, then it happened in the semi-functional XEP-0077 stub.

  108. singpolyma

    > just writing it into the instruction text gives the client no chance to properly display whats happened I have wished for a per field error option in data forms before.