-
lovetox
if i end a stream correctly, does the server send unavailable presences out?
-
lovetox
or do i have to do this myself befor i end the stream
-
Zash
Server sends unavailable when the session ends, if it's still available at that point.
-
lovetox
hm not sure this answers my question
-
pep.
"yes, if the server is not down"?
-
lovetox
i send </stream> and end my stream
-
Zash
lovetox: the answer is yes
-
lovetox
ok thanks :)
-
Zash
the server will send unavailable if you don't
-
lovetox
ok and its not considered bad by the client to not send it themself
-
Kev
I'd consider it daft to do so.
-
lovetox
Kev, its daft to send presence themself as client?
-
lovetox
or not?
-
Kev
Yeah. The server's going to do it for you, so I think it's daft for a client to maintain code to duplicate that.
-
lovetox
great, i thought so too :)
-
Zash
In theory you can set a status message while you're offline, but I don't think the server is required to keep that.
-
Zash
Probably made more sense before always-on mobile clients
-
pep.
"always-on"
-
asterix
Except if you want to set a good bye status message.
-
lovetox
hm yeah true we actually have a good bye message feautre
-
lovetox
and im pretty sure servers keep that
-
Zash
I'm reminded of the disussions around having status messages in PEP instead of presence
-
lovetox
i see that all the time if people leave a muc
-
lovetox
and going offline
-
pep.
Zash: a "bye message" in PEP?
-
lovetox
and of course they have to keep it
-
lovetox
its a presence i send, the server does not know that im going to go offline in a sec
-
Zash
lovetox: no, they just have to broadcast it
-
lovetox
i thought thats what keeping it means
-
lovetox
or do you send a second unavailable presence after i send mine and end the stream
-
lovetox
i think not
-
Zash
Prosody does not keep unavailable presence around after broadcasting them
-
lovetox
why would i need the server to store the message?
-
Zash
and after that there's no point of generating unavailable on disconect
-
lovetox
i told everyone that is online that im going offline
-
Zash
I'm not sure I follow what you're saying
-
Sam Whited
What if I'm offline when you send that message, you go offline, then I come online? I might also want your status message (which is why it should be in PEP in my opinion).
-
lovetox
yeah thats not possible
-
Kev
Sam Whited: I have a TODO from the Summit to write presence-over-PEP, BTW.
-
lovetox
but thats not a reason to not tell the people who are online and are able to receive it, to not tell them
-
Zash
I believe there's a hint in one of the RFCs that the server could keep the last unavailable presence of the last resource and send in response to probes later, but I'm pretty sure it's optional and at least Prosody doesn't do this.
-
Sam Whited
Kev: oh that's interesting, I was just thinking about specifics like a status messages being a new thing in PEP, not presence in general and all the other information it conveys. I'll be curious to see that
-
Kev
Sam Whited: I mean status/show, really.
-
Kev
So <presence/> becomes device information, and PEP becomes user information.
-
Zash
https://xmpp.org/rfcs/rfc6121.html#presence-probe-inbound
-
Zash
point 3 there has the text I was thinking of
-
Zash
PEP is better tho
-
lovetox
its just much much more traffic for nearly no gain
-
lovetox
previously it was 100 presences on coming online, then its doubled because everybody puts status and show in pep
-
lovetox
also its probably fine to have a account wide status
-
lovetox
but show?
-
lovetox
if i come online i get the last pep info, show = online
-
lovetox
but no presence means offline
-
lovetox
also there is an information loss, if i see a work pc as away, but the smartphone as online
-
lovetox
i can assume a person is not at his workplace right now
-
Sam Whited
I'd be okay with that; personally I prefer to treat status as an account thing. You can either reply to messages or not and I shouldn't have to think about what clients are busy and online and away.
-
Sam Whited
With carbons and MAM it becomes way less important to have each individual device have more granular status than online and offline.
-
Kev
lovetox: I don't think you can assume that at all.
-
Kev
I frequently have my phone with me when I'm in the office, but have stepped away from my desk.
-
lovetox
thats what i meant with not at your workplace
-
lovetox
the desk
-
Sam Whited
lovetox: but why would it be marked as away? I suspect most people don't change their status every time they step away from their desk for a few minutes, and they still have their phone on them so it's not like they're going to miss your message if you send them one?
-
lovetox
Point is, right now we have the possibility to maintain a show value per client, this is a feature, for some people this is useless, others find it veryuseful, it depends on the circumstances
-
lovetox
you want to take this away, and i simply ask, what for, what is the gain we have from that?
-
lovetox
Sam Whited, auto away is a thing
-
Sam Whited
A much simpler system for users.
-
lovetox
If you want to make it simple for YOUR users, nobody forces you to display the show value from each device
-
Sam Whited
Who finds it very useful? Are people still sending messages to individual clients?
-
lovetox
Sam Whited, its about the information, not about sending messages
-
lovetox
A device is autoaway for 20 minutes
-
lovetox
thats a device status, and a device show
-
Sam Whited
lovetox: I don't understand what people are doing with this information then.
-
lovetox
this information is useufl
-
Sam Whited
It seems like an anti-feature to me.
-
jonas’
it becomes useful once you have to deal with device-to-device communication
-
lovetox
you dont have to, point is xmpp offers that information
-
jonas’
like jingle file transfers and calls
-
lovetox
if you dont want to show it to your users, dont
-
lovetox
you dont need a show in pep, to reduce to presence shows to one✎ -
lovetox
you dont need a show in pep, to reduce two presence shows to one ✏
-
jonas’
having an account-wide show is also a useful thing though✎ -
Sam Whited
lovetox: it's not just about showing it, it's about setting it. I already do only show one to my users
-
jonas’
having a user-controlled account-wide show is also a useful thing though ✏
-
lovetox
like all other clients
-
lovetox
so i dont see any gain for the user here
-
Sam Whited
IMO anything that involves individual clients we should be fixing or getting rid of; eg. Jingle too. If someone sends me a file I should pick what device to receive it on, not them.
-
lovetox
now its one, afterwards its one
-
lovetox
i see XMPP can deal with multiple devices as a feature
-
lovetox
yes its tricky sometimes
-
lovetox
yes its not easy for devs to make this easy for users
-
lovetox
but its nevertheless a big feautre, that other messengers like whatsapp never had for years
-
lovetox
and still to this day its not even near XMPP
-
lovetox
i think todays users can be trusted to get the gist of a system with multiple devices
-
lovetox
we dont have to treat them as super dumb
-
jonas’
I’m not sure that’s true
-
Sam Whited
I still really don't see the use case, "having more features than WhatsApp" isn't a usecase, and may not even be a good thing.
-
Kev
I'm not sure providing features that make sense is about user being stupid.
-
lovetox
im now a few years in very near contact with users of Gajim, and never had even one asked what it means that there are 2 devices listed with different show
-
lovetox
and status
-
lovetox
Kev what is the feature you are talking about
-
lovetox
as we already said, all clients show ONE show value already
-
lovetox
moving this into pep, and afterwards showing ONE show value
-
lovetox
makes 0 difference for any user
-
Kev
Allowing a user to set a status message applicable for themselves, rather than a device.
-
lovetox
we talk since 10 minutes about show
-
lovetox
not status
-
lovetox
but yes i agree, account wide status can be useful
-
Kev
And to be able to say that they're "Do Not Disturb" and not have that change because a client that had disconnected suddenly gets a connection again.
-
Sam Whited
I probably confused that, I always call that status but I meant online/away/busy not the status message
-
Sam Whited
And if you're just asking your users who already use XMPP that's a very self-selecting sample set. We're trying to make the network make sense and be easier for everyone, not just existing XMPP users.
-
lovetox
you make it easier in one department, and loss stuff in the other
-
Sam Whited
What are we losing? I still don't see any use case for per-device show values. The Jingle one makes sense, but we need to fix jingle not keep this weird state where show is per-device.
-
lovetox
obviously the show from each device, if you only have one
-
jonas’
> If someone sends me a file I should pick what device to receive it on, not them. how are you going to do that if you’re AFK?
-
Sam Whited
Again: what is the use case? I understand *technically* what information is being lost, I don't understand why we care about that information.
-
lovetox
but lets leave this for now, i see you dont find it useful so it has to go
-
jonas’
will the transfer be stuck until you "accept the call" on one device?
-
lovetox
what about the PEP spam?
-
jonas’
will you configure a default preference?
-
lovetox
how much more info you want to put in different PEP nodes?
-
Sam Whited
jonas’: I dunno, we can figure that out later. Completely different discussion
-
jonas’
Sam Whited, I find this not completely different, but ok
-
lovetox
when i come online, how many MB data do i have to download from the server, just so im up to date with everyone
-
lovetox
?
-
jonas’
lovetox, good question!
-
lovetox
Put it into PEP, is not a scaleable solution
-
lovetox
and we/you should think rather sooner about how to solve this
-
jonas’
it’d be more scalable if PEP updates from a single contact were aggregated in a single stanza
-
Sam Whited
Oh, is the argument changing to scalability now? The goalposts appear to be moving.
-
lovetox
Sam Whited, why is a goalpost moving, if i have multiple points why this is bad?
-
lovetox
i respect that you dont share my opinion about show per device is useful
-
Sam Whited
The points are changing without actual answers to the previous questions. I agree, we should talk about scalability too though, but I'm less concerned about the technical side of things, we can solve that when we write the XEP.
-
Kev
lovetox: The proposal isn't that per-device presence payloads become illegal. Just that they're not used if what you're trying to convey is the status of the user rather than a device.
-
lovetox
you cant solve pep scalability by writing another UserStatus xep
-
Sam Whited
lovetox: do we know that it's not scalable before we write the XEP? How do we know it doesn't save us a lot of stanzas?
-
Sam Whited
For example, let's say we have a system like the original we were describing where status messages work even if the user is offline. If we did that in the current presence based system, every time the user is online they have to do a presence probe for all of their offline contacts. In PEP they just get that pushed down only for contacts that have actually pushed a presence. That probably saves a lot of round trips.
-
lovetox
You compare something, nobody actually does, and nobody will ever do (probing offline users) against your PEP proposal
-
lovetox
but yeah that would save roundtrips
-
Kev
Offline users do get probed when you come online, all your contacts do.
-
Kev
That's how you find out that they're offline (or not)
-
Sam Whited
Sure, the point is that there are ways it could save us stanzas and we won't know until we figure out how it's used and write the XEPs.
-
Sam Whited
Let's take the show example (I'm not suggesting this is how we should do it, I'm just saying that your assumption that it's more traffic isn't necessarily true): if we move show into PEP we could imagine a system where after we come online we get a single presence for only online devices like we get today. That contains the accout status value then *after* that we start getting updates from PEP. Now we have the niceties of device/account information being separated, but still get the same number of stanzas on login
-
Sam Whited
Or we could get show from PEP on login and not get presences at all, then probe accounts for devices only if/when we need them lazily. This would likely drastically reduce the amount of traffic on login (I think? Maybe we always need caps right away so this wouldn't work). Again, not suggesting we should do these things, just that "it will increase traffic" isn't something we know yet.
-
lovetox
Sam Whited, really you are talking about changing stuff in the whole eco system
-
lovetox
we just talked about putting show into PEP
-
lovetox
and yes this would double traffic, given all ccontact use this
-
Sam Whited
Yes, these are the things putting show in PEP eventually could allow us to do. I'm not suggesting we do them right away or that they're even possible necessarily, just that they're good examples of why "it will increase traffic" isn't a good argument.
-
Sam Whited
It might double traffic, or it might make it lesser overall once we start moving more things into PEP.
-
lovetox
are we talking about the same thing? you know how PEP works or?
-
Sam Whited
We won't know until we think about it a lot more, write the XEP, maybe start getting implementation experience.
-
lovetox
PEP says, on +notify, it pushes the last node of every contact, for every node you subscribe to
-
lovetox
so yes this is not scaleable
-
lovetox
unless you fundementally change PEP / Pubsub, putting more stuff in PEP will increase traffic
-
Sam Whited
Maybe "account info" is a node that contains lots of things in one big payload that previously would have been sent by many different presence/message/IQs.
-
Sam Whited
Maybe offline nodes are removed and the deletion signals offline (unless we have a feature where we keep a status message around or something). Now we stop getting updates from those and it's basically the same as presence was. There are all kinds of ways this could reduce the amount of traffic sent.
-
lovetox
yeah thats thinking about scaleability
-
lovetox
and that what we should do before adding more things into PEP
-
Sam Whited
Right, which is why I think we can't just say "it will double traffic" without an XEP and possibly implementation experience.
-
Sam Whited
I dunno, maybe it's not enough traffic to matter what happens before moving more things to PEP. Or maybe it is. The point is we don't know right now.
-
lovetox
i know, Gajim implements every UserPEP Xep there is
-
lovetox
and believe me even on accounts with 20 users, this means endless stanzas
-
Sam Whited
You're wanting me to argue that it absolutely will reduce traffic, and I'm not arguing that. I'm just arguing that your assertion that it will double traffic may or may not be true and it's not a good argument for why we shouldn't bother to move show/status into PEP.
-
lovetox
my assertion was it will double traffic, if you copy UserPEP XEP XY and do the same with status and show
-
lovetox
and that was definitly on the mind of everybody when this discussion started
-
Sam Whited
Why are you thinking that's what would happen when you haven't read Kevs theoretical XEP?
-
lovetox
now we moved the goalpost to, oh yeah that XEP would have to keep scalability in mind
-
lovetox
and im fine with that :)
-
lovetox
Kev can share it and prove me wrong, im happy if we have good solutions for problems
-
Sam Whited
Anyways, I shouldn't have let myself be drawn into pivoting this into a technical discussion. We're not there yet. My argument is that we need to think about use cases and users, and I don't see one for how the existing system works.
-
lovetox
also MUC incompatibility with PEP is a problem since a longer time, dont know if we have the same problem with MIX
-
Sam Whited
I sometimes think that we need to treat the public network as a service when we're writing XEPs. Maybe we need a Jabber product manager (or product mangaer committee) who puts together a cohesive vision for what the Jabber Service should look like in the future, and then decides if XEPs guide us towards or away from that.
-
Sam Whited
Yah, MUC would definitely have to be thought about, that's always tricky. Still though, that's all a ways out and isn't an argument for why we shouldn't write the XEP. It's definitely worth thinking about while writing it.
-
Sam Whited
Anyways, I need to step out now and get ready to leave. Please think about use cases. I'd really like to know if there actually is one for the current system.
-
lovetox
is it possible from the outside to see that a websocket connection is a xmpp connection?
-
Zash
Based on looking at the TLS connection? Probably not easily.
-
lovetox
as i understand websocket, first a normal HTTPS connection is made
-
Zash
Timeing information might leak that it's not following the common request-response pattern of HTTP
-
lovetox
then within that the protocol is upgraded to websocket
-
Zash
Yeah
-
lovetox
ok so if i want to conceil the fact that its an xmpp connection, this is probably a safer bet than xep0368
-
lovetox
we announce a protocol xmpp-client with 0368
-
lovetox
is this transfered in plaintext, within the tls negotiation
-
lovetox
or afterwards is the question
-
Zash
ALPN is sent in plain text in the beginning of the TLS handshake
-
lovetox
yep so trivial to see that its an xmpp connection
-
moparisthebest
Unless you don't send it, it's not mandatory, if you need to conceal this you should not send it
-
moparisthebest
Same with SNI
-
Zash
Can't get around the certificate being returned in the clear tho.
-
moparisthebest
Though encrypted SNI is almost here, I expect encrypted alpn to follow shortly
-
moparisthebest
Zash: iirc that's fixed already in TLS 1.3 ?
-
Zash
Dunno
-
lovetox
hm if i dont send the protocol than a webserver also running on 443 will not know that i want to talk to the xmpp server or?
-
lovetox
i think i ran into that problem early in my implementation
-
moparisthebest
> The difference is that in TLS 1.3, a lot less is in the clear. For example, in TLS version 1.2 you were able to witness the disclosure of the Subject Alternative Name (SAN) in the Certificate but in 1.3, this is encrypted and not made available for inspection by any intermediate system.
-
moparisthebest
From our favorite company https://blogs.cisco.com/security/tls-version-1-3-change-is-here-and-encrypted-traffic-analytics-has-got-your-back
-
moparisthebest
lovetox: depends on how the server is set up, maybe, maybe not, that's why it's important you keep trying all the SRV records
-
moparisthebest
Unless you must not be detected of course, in which case you abort
-
lovetox
hm problem is when connection succeeds i will not try others
-
lovetox
maybe i should wait for the first <stream> to make that decision
-
moparisthebest
Yep absolutely
-
moparisthebest
Also if TLS verification fails you should keep trying
-
lovetox
eh actually im in the camp to not shadow a badley setup server with various workarounds
-
moparisthebest
I haven't had problems with gajim, but dino won't connect to my server unless I patch out their xep 368 module because of that error
-
moparisthebest
You aren't, you are allowing easy DOS
-
lovetox
if a cert verify fails, why would it not fail on a other connection method?
-
lovetox
can you give me the address of your xmpp server so i can try if it works in my new code?
-
moparisthebest
Any mitm can accept a TCP connection
-
moparisthebest
lovetox: mitm ?
-
lovetox
a mitm that only mitm on one connection method?
-
moparisthebest
burtrum.org , feel free to poke, so if you don't send alpn over ipv4 you'll end up taking to nginx
-
moparisthebest
lovetox: absolutely? Plenty of ways, v4 vs v6, servers in different datacenters
-
moparisthebest
Maybe captive wifi is only set to mitm 443 not 5223
-
moparisthebest
Basically your code should never stop trying based on anything an attacker could cause
-
lovetox
but this is too complex
-
lovetox
cert on my server is expired
-
lovetox
i dont care, gajim shows me the error, i tell it to connect anyway
-
lovetox
trying everything first and remembering the first cert fail, then if everything fails coming back to that and offer the user to connect anyway
-
lovetox
really dont want to implement that
-
lovetox
also if you assume every cert fail is an attacker
-
lovetox
then you simply cant connect to a server anymore that has no valid cert
-
lovetox
which is also a choice i want to give to the user
-
lovetox
i can connect fine to your server btw
-
lovetox
also i dont see it as my responsibility to make Gajim into a tool that can withstand a DOS
-
lovetox
attack
-
pep.
lovetox: if you remember the cert you might allow the user for some more time.. I always find this weird tbh, this expiry thing. Tge cert expired but you're still connected so you don't care, even if it's been a week already, and when you reconnect you (the client) is like "omg the world is burning"
-
lovetox
yeah i also fail to see how a expired cert is suddenly insecure
-
lovetox
if its expired for 2 years
-
lovetox
ok an attacker had plenty of time to attack that cert
-
lovetox
but a week? ..
-
pep.
I guess it mostly shows how much the admin is active :p
-
pep.
or how skilled in cron they are!
-
moparisthebest
Right but I want gajim to connect from sleazy free WiFi if possible, not give up on first mitm or blocked port
-
moparisthebest
That entirely defeats the purpose of srv
-
Zash
I don't think SRV was invented as a way to avoid MITM or blocks
-
lovetox
wait, blocked port is different story
-
lovetox
Gajim will try until it has a successful connection with the host and port gathered via SRV
-
moparisthebest
A mitm can accept a TCP connection though
-
moparisthebest
You shouldn't give up until you have cryptographic proof you can't successfully connect to the server
-
Zash
prove a negative?
-
moparisthebest
Like, they provide a proper cert and then reject you with bad password, for instance
-
moparisthebest
And srv explicitly was invented to prevent dos, one service is down or unreachable or misconfigured, try the others
-
Zash
Where does it say that?
-
moparisthebest
What other purpose could it possibly have? Otherwise just use a well known port like http
-
Zash
RFC says it's for moving services and designate backup servers. There's one mention of "denial of service", in the context of SRV being used *for* it.
-
moparisthebest
Don't need backup servers if nothing can go wrong at your primary
-
moparisthebest
If something can go wrong though, why not try the backup
-
defanor
FWIW, that's the thing that bothered me about both "happy eyeballs" and looping through SRV records too: there can be scenarios in which a connection is possible, yet a client would fail to connect while following those. But fighting potential DOS via an unknown MITM (or poor connectivity) seems like a rabbit hole: even if you succeed in establishing a TLS connection, a MITM or a poor network could simply start dropping packets after
-
defanor
passing a few.
-
moparisthebest
That's fine, xmpp works fine over those kind of networks