Giter Club home page Giter Club logo

ejabberd_mysql_auth's Introduction

ejabberd MySQL authentication module

This is a module for ejabberd to to authenticate against a MySQL database. The intent was to use the same database for postfix and ejabberd, while using Postfix Admin as a simple interface for account administration. Originally I was using the authentication module by Mattias Hemmingsson, but this was quite hacky and not able to fetch passwords for users on different domain names. Also it broke on specific passwords and kept the database connection open.

Therefore this implementation fixes those issues and implements an external config file for easy configuration. Also the logging was rewritten in order to have a better filtering of debug messages if needed.

Installation

  1. copy auth_mysql.py anywhere on your ejabberd host (i.e. /etc/ejabberd/auth_mysql.py).
  2. set permissions for the script, so that the ejabberd user can execute it:
    chown ejabberd:ejabberd /etc/ejabberd/auth_mysql.py
    chmod 775 /etc/ejabberd/auth_mysql.py
    
  3. create a config file (use auth_mysql.example.py as guidance).
  4. configure ejabberd.yml to use the script as external authentication method:
    auth_method: external
    extauth_program: "/etc/ejabberd/auth_mysql.py"
    
  5. Restart ejabberd

Hints

  • The configuration files path is statically set to /etc/ejabberd/auth_mysql.yml.
  • The log files path is statically set to /var/log/ejabberd/sso-auth.log.

If you need or want to change these paths, edit the script.

License

GPL-2

ejabberd_mysql_auth's People

Contributors

haemka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.