-
edhelas
Hi everyone, small topic regarding PEP and Pubsub node configurations.
-
edhelas
It seems that Movim didn't configured properly some PEP nodes while publishing things, linked with that ejabberd bug https://github.com/processone/ejabberd/issues/3044
-
edhelas
One of the way that I'm pushing to prevent that is to ensure server side that some of the PEP nodes have a fixed configuration, see https://github.com/movim/movim/wiki/Configure%20ejabberd#enforce-pubsub-configuration
-
edhelas
I have the feeling that trusting XMPP clients to configure each time correctly the nodes when publishing is kind of an illusion, you can have bugs, you can have "bad clients" etc...
-
edhelas
Wouldn't be wise to push those kind of "fixed server configuration", at least for all the config options that are defined as MUST in the XEPs ?
-
pep.
Fix clients and you wouldn't have these issues✎ -
pep.
Fix clients and you won't have these issues ✏
-
pep.
Enforcing stuff at the deployment level will just contribute to hiding issues like this
👍️ 1 -
jonas’
pep., as much as I like fixing clients, I deem enforcing this on the deployment level as a necessary defense-in-depth.
-
jonas’
publishing user bookmarks, for instance, because of a typo is Not Great.
-
Zash
we've considered and rejected this in prosody before
-
jonas’
and if servers protect against that (either by overriding defaults of the bookmark node _or_ by rejecting attempts to publish with access_model open), I very much elcome tat✎ -
jonas’
and if servers protect against that (either by overriding defaults of the bookmark node _or_ by rejecting attempts to publish with access_model open), I very much welcome that ✏
-
pep.
jonas’: does that prevent fixing clients though
-
jonas’
I don't think it does :)
-
edhelas
> Enforcing stuff at the deployment level will just contribute to hiding issues like this I'm fine rejecting the configuration with an "error" if it doesn't fit, at least the client knows, and it's perfectly "pubsub compatible". ↺
-
edhelas
Good and working clients will be OK, "bad clients" will have an error and can then know directly what to fix.
-
MattJ
The server can't protect against typos, e.g. in the node name
-
edhelas
XEPs MUST options are respected, and server admins will not be afraid to have "bad clients" misconfiguring nodes for some of their users.
-
edhelas
Everyone is happy and we can then fix our clients to make them fully compliants.
-
edhelas
You never know which weird client your users will use in the end.
-
jonas’
MattJ, arguably, node name typos are more easily discovered than access model typos
-
jonas’
you notice the former right away when doing interop testing with other clients
-
jonas’
the latter you only notice when someone finds bookmark notifications in their XML logs.
-
MattJ
It feels like it's shifting the responsibility to the server to protect an arbitrary and unbounded list of node names that are supposed to be opaque
-
MattJ
More sensible IMHO would be to e.g. default all PEP nodes to private by default, and require explicit configuration to make them open
-
MattJ
That might (almost certainly would) break a bunch of existing clients
-
MattJ
But I'd feel more comfortable with an arbitrary list of nodes we know should be open by default
-
MattJ
And update all those XEPs to require the client to include publish-options in the future
-
edhelas
Can be a solution yes
-
edhelas
Knowing that its a bit more than the access_model and publish_model
-
edhelas
But also the max_items and the item persistence
-
MattJ
Clients should configure it
-
MattJ
If they don't, they are already broken
-
MattJ
Hacky workarounds on the server are not the solution, especially if privacy/security is not at stake
-
Zash
And hardcoded lists in the server will get outdated since it's clients that know what nodes they use.
-
MattJ
ejabberd intentionally broke OMEMO for years by overriding PEP configuration
-
MattJ
I don't want to get into the game of intentionally or accidentally enforcing configuration that is supposed to be controlled by clients
-
MattJ
When the client publishes stuff, it knows what it is publishing and what the intended configuration for that data is
-
MattJ
The server does not know, and matching on node name is a hack
-
MattJ
If a XEP namespace gets bumped or whatever, everything breaks until all the servers update
-
edhelas
That's also why the PEP nodes have versions bookmarks:1
-
MattJ
It's very different to just "private by default" which is a sensible policy
-
Zash
or a new cool XEP is published, but since everyone is running the most ancient Ubuntu they don't get the new list for 5 years✎ -
edhelas
If you change the default node config, you bump the version
-
Zash
or a new cool XEP is published, clients rush to implement and deploy, but since everyone is running the most ancient Ubuntu they don't get the new list for 5 years ✏
-
MattJ
Maybe we should just make publish-options mandatory
👍️ 2 -
MattJ
At least for initial publishes
-
Zash
Maybe we should
-
Zash
and access model a required option that can't be left out
-
MattJ
For backwards compatibility I can then see us having a list of default configurations for existing widespread PEP node names
-
MattJ
But with the intention of deprecating that eventually
- Trung like private by default.
-
edhelas
> /me like private by default. I like it as well ↺
-
MattJ
I'll try and draft some XEP PRs this week
-
lovetox
why does it need a XEP? Its simply a server config to define a default node configuration or not?
-
Kev
No, because 163 requires "presence" as the default.
-
MattJ
The core proposal would be to 1) have every XEP that uses PEP declare the recommended node configuration, and 2) make publish-options mandatory (at least a SHOULD) everywhere we reasonably can (that means at least all new PEP-based XEPs)
-
MattJ
And I would add text about this to the existing informational XEPs, at least
-
Kev
I don't really understand publish-options, as it seems to enforce a weird flow on the client, but it's where we are, so that seems sensible enough.
-
lovetox
what do you find weird about ? i tell the server what i want, it tells me this does not reflect whats actually is there, and then i go into a node config flow
-
MattJ
I agree it's an awkward flow (in the failure case), but it's a very common pattern (check-and-set) in distributed systems
-
MattJ
lovetox: one awkward thing is that if you simply do that, two clients can fight over the configuration in a loop
-
Kev
It opens you up to all sorts of fun race conditions that there's just no reason for.
-
Zash
xyrrset !
-
MattJ
I've not seen that happen so far, but I consider that mostly luck
-
Kev
<Client> Please publish with these options <Server> But those aren't the options I've got set <Client> ... <Client> Please set these options <Server> Certainly, Ma'am. <Client> Please publish with these options <Server> Okeydokey, no problem
-
Kev
Compare with <Client> Please publish with these options <Server> Ok, I'll set those options and then publish
-
MattJ
Okay, so you think it should overwrite the configuration instead of failing
-
Zash
But then you get no indication that two clients are flipping settings back and forth
-
Zash
Like the disagreement on whether OMEMO stuff should be public or presence
-
Kev
> Okay, so you think it should overwrite the configuration instead of failing I have no problem with publish-options having a flag saying "fail" or "change", if people have a need for failing instead, but I suspect that the standard client behaviour is to just blindly do the change as in my tongue-in-cheek exchange above, and in that case the server may as well have done it.
-
Kev
> But then you get no indication that two clients are flipping settings back and forth You don't anyway, because the clients are (most likely) going to just silently reconfigure the node and you'll have the same flap, but with more stanzas.
-
lovetox
yeah sure a overwrite flag is nice, but does not spare a client to implement the failure flow
-
jonas’
so you have an indication; in your data usage.
-
lovetox
so not really a gain
-
Zash
Wait none of this protects against a bad client that sets bad settings
-
lovetox
> lovetox: one awkward thing is that if you simply do that, two clients can fight over the configuration in a loop
-
lovetox
thats a spec issue
-
jonas’
what would be a solution to that issue?
-
lovetox
and probably a client developer experience issue
-
jonas’
I fail to come up with good ideas
-
lovetox
writing a good spec?
-
lovetox
if you say, hey max items in a node is undefined i leave this to whatever developers need
-
lovetox
yeah bad spec will lead to config fights
-
lovetox
should never get published into a spec ..
-
jonas’
lovetox, nevermind max items. how would a better flow look like for things like access_model on bookmark nodes?
-
lovetox
thats why for bookmarks we invented "max" setting :)
-
lovetox
jonas’, i never said the current flow is bad, so i dont have solutions for things where i see no problem
-
lovetox
you may ask the ones that think its bad
-
pep.
So we've moved away from "we should fix faulty clients" :p
-
lovetox
im not sure what the problem is, you found one more thing a client devleoper has to care about or otherwise privacy of the user is at risk
-
lovetox
is it possible with pubsub to discover open nodes on a contact?
-
MattJ
Yes
-
lovetox
funny info i just received, about security labels, seems there are at least 2 government agencies who use Gajim and depend on the security labels support
-
mjk
remove immediately and offer paid support!
-
lovetox
but .. then its like a job ... beside my other job
-
Zash
it wasn't already? :)
-
lovetox
until now its a relaxing freetime hobby
-
mjk
right... also, hard to make a living only offering support for a minor XEP
-
Kev
Feel free to remove it and send them to Isode ;p