-3

I don't want to have wide-open registration on my server so I don't have to deal with spam accounts, but at the same time I don't want to have to manually add accounts for each person I invite to my ejabberd server. Is there a way to have one-time registration URLs or one-time codes to input on the registration page that I can generate and hand out, and then each person can set up their own account?

1 Answers1

0

If by registration page you mean mod_register_web it doesn't seem to have such functionality out of the box. However, ejabberd supports multiple authentication methods of which most enables you to code a custom registration page with one-time registration codes.

If you simply need to prevent registrations from total strangers and don't have the skills for creating an own registration page, a simple option would be adding a reverse proxy with password protection in front of Web Admin BOSH HTTPS port 5281 including mod_register_web's https://example.org:5281/register/:

  1. Make the ejabberd_http module only listen on localhost:

    port: 5281
        ip: "127.0.0.1"
        module: ejabberd_http
        web_admin: true
        http_bind: true
        tls: true
        certfile: "/etc/ejabberd/server.pem"
    
  2. Add a (TLS protected) reverse proxy (e.g. Apache / Nginx) to serve https://localhost:5281/register/ on https://example.org:anyport/register/.

  3. Password protect the proxy with HTTP basic authentication. (This won't prevent using the same password multiple times.)

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129