XMPP Service Operators - 2021-10-19


  1. b43

    So I configured stun/turn on my server, configured the ports in the router, range too, but can only call out if im on my local network. Any ideas?

  2. b43

    Can receive calls from server while off my local network but only from someone on my local network...

  3. rob

    Probably the ports aren't open with your isp

  4. b43

    Whaaat?

  5. b43

    They do that too???

  6. b43

    Rob. Could you DM me please?

  7. b43

    rob: Could you DM me please?

  8. mjk

    > Whaaat? > They do that too??? Alll the time. For your protection <3

  9. Licaon_Kter

    edhelas: we can talk here since it's ontopic

  10. Licaon_Kter

    Re: movim.eu rejecting my cert that has DST X3 as an expired intermediate

  11. Menel

    Secret test who is using outdated server software 😀

  12. sam

    Licaon_Kter: I haven't been able to communicate with movim.eu at all for a few weeks now.

  13. Sam

    Is anyone running a proxy in front of their XMPP server that handles XMPP up through at least auth (or possibly all the way through resource binding, but whichever)? I'd be curious to see how you have your server configured.

  14. Ge0rG

    I merely run a haproxy for the TCP connections without SRV.

  15. rob

    Same but with traefik

  16. MattJ

    traefik does TCP?

  17. rob

    And UDP

  18. Licaon_Kter

    moparisthebest see Sam ^^^

  19. moparisthebest

    Sam, like https://github.com/moparisthebest/xmpp-proxy ? kinda

  20. Sam

    moparisthebest: yes, but I'm thinking about doing auth at this level too and was wondering if anyone is doing that

  21. jonas’

    what's the use case behind it / the greater picture?

  22. jonas’

    something like dovecot's submissiond?

  23. jonas’

    (though it's unclear to me what that would be in the XMPP context)

  24. moparisthebest

    Sam, which kind of auth, if you mean s2s cert auth, I plan to implement that, if you mean checking client passwords, I do not plan to implement that

  25. moparisthebest

    right now since SASL EXTERNAL etc isn't implemented, anything behind it has to do dialback

  26. Sam

    I don't know submissiond, but yes, this is client auth. I have an existing DB of usernames and passwords and I'd like this to handle xmpp auth using that DB, then proxy the connection to the server (presumably using some trusted auth that fills in the sasl identity with the person it has authed as).

  27. Sam

    I was just curious if anyone was already doing this or if I'd need to write some custom auth plugin for ejabberd and prosody

  28. moparisthebest

    instead of the proxy approach prosody can just handle xmpp auth using your existing DB, that's how I have mine set up

  29. moparisthebest

    I assume ejabberd can too

  30. Sam

    Prosody can't have access to this db for <reasons>

  31. moparisthebest

    can you extract only the data prosody needs on a schedule, or provide it a view it can access, something like that ?

  32. Sam

    mostly those reasons are "I don't want to write this in Lua or Elixir or Erlang" but there may be other constraints around vetting the codebase that can access it too.

  33. Sam

    That seems more difficult than just proxying auth and writing a small "trusted user auth" plugin for whatever the server ends up being

  34. moparisthebest

    let me just tell you about my setup and it may or may not be helpful to you idea-wise :)

  35. moparisthebest

    I have a mysql database managed by https://github.com/postfixadmin/postfixadmin , it ends up creating rows with usernames and password hashes

  36. moparisthebest

    dovecot+postfix+prosody with a slightly modified https://modules.prosody.im/mod_auth_sql.html query that for auth

  37. moparisthebest

    but, I also want nginx to only let those users log in to web interfaces for some things using the same username+password, it's annoying to get it hooked directly to the database, but by default it can look at username+hash pairs in a .htpasswd file, so I have a bash script ran every X minutes as a cronjob that queries the mysql database and dumps it to a .htpasswd file

  38. moparisthebest

    if you wanted to get fancier you could run that as a change event rather than on a schedule, but, in my setup I don't care

  39. ij

    moparisthebest, have you ever considered switching from sql to LDAP as a auth backend for all your services?

  40. moparisthebest

    but that's how I have a bunch of different systems use the same auth...

  41. moparisthebest

    could do, but no real reason I guess

  42. ij

    I have had similar setups, but it is far less painful and less work to have LDAP as backend auth… should have done the move to LDAP years before

  43. moparisthebest

    it's worth saying you might not design a system like this from scratch :) in my case I set up postfix+dovecot+postfixadmin and didn't add XMPP until years later

  44. ij

    same over here, but with exim+dovecot and my own admin UI…

  45. Ellenor Bjornsd.

    EXIM

  46. Ellenor Bjornsd.

    is that the one of choice for recovering qmailers?

  47. jonas’

    Sam, are you aware of https://modules.prosody.im/mod_auth_http.html?

  48. moparisthebest

    *selfish mode on* but if you come up with a way for a proxy to communicate auth status back to prosody please let me know Sam cause I'll need that :D

  49. moparisthebest

    I just planned on not letting any connections get through to prosody that aren't properly authed instead, and a module for prosody to just trust everything that does get through

  50. jonas’

    extend mod_net_proxy to support more metadata?

  51. Sam

    moparisthebest: will do; I was just going to allow only connections from the proxy at a firewall level and have it do SASL with the identity set (then write a custom module for Prosody or Ejabberd that uses that instead of its own builtin SASL)

  52. Sam

    jonas’: that could be a viable way to set this up, although I don't really see a point in introducing HTTP (although it does already exist, so it would be easy to let the auth service do that, maybe it's worth a shot). Thanks for the link

  53. rozzin

    Sam: I use ejabberd with an authenticator written in PHP..., there's an "external auth" module in ejabberd that defines a simplistic protocol for communication between ejabberd and an arbitrary other program....

  54. rozzin

    And yes, I should probably just have a bunch of these services use LDAP....

  55. rozzin

    There's one set that I wish I could get to authenticate against a Google domain—if anyone has ideas on how to make ejabberd do that....

  56. moparisthebest

    php has smtp libraries, modify your program to try to log into google's smtp server with the provided username+password to check validity

  57. mjk

    Note that if a given account has 2fa enabled (which google probably forced on it), this requires use of an "app password"

  58. MattJ

    https://modules.prosody.im/mod_auth_imap - I think dovecot can do this too if ejabberd can auth against that