Skip to main content

Yet another ejabberd authentication bridge that uses apache-style htpasswd files

Project description

Yet another ejabberd authentication bridge that uses apache-style .htpasswd files.

Project

Installation

$ sudo apt-get install libffi-dev
$ pip install ejabberd-htpasswd

Configuration

Update the authentication configuration in your /etc/ejabberd/ejabberd.cfg file:

{auth_method, external}.
{extauth_program, "/usr/local/bin/ejabberd-htpasswd /path/to/htpasswd"}.
%% optional -- update as appropriate
%% {extauth_instances, 2}.
%% {extauth_cache, 300}.

Options

The ejabberd-htpasswd script takes one optional positional argument, the fully-qualified path to the “.htpasswd” file, and several optional parameters:

  • -d, --debug:

    Enable debug mode for more stuff in the log files.

  • -l {FILENAME}, --log-file {FILENAME}:

    The log file name, which will be rotated as defined by -s and -c; default: /var/log/ejabberd/auth-htpasswd.log.

  • -s BYTES, --log-size BYTES:

    specify the maximum size of the log file in bytes before the log file is rotated; default: 1048576 (1 MB).

  • -c NUMBER, --log-count NUMBER:

    specify the maximum number of log rotation files; default: 10.

  • -t EXPR, --domain-transform EXPR:

    specify a “sed”-style substitution expression for domain name transformation; example: /.*\.example\.com$/example\.com/. Note that when placed in the ejabberd config file, several layers of escaping must be done, so you’ll need something like this to accomplish the above:

    {extauth_program,
      "/usr/local/bin/ejabberd-htpasswd \\
        -t /.*\\\\.example\\\\.com$/example.com/ \\
        /path/to/htpasswd"}.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ejabberd_htpasswd-0.1.3.tar.gz (17.4 kB view details)

Uploaded Source

File details

Details for the file ejabberd_htpasswd-0.1.3.tar.gz.

File metadata

File hashes

Hashes for ejabberd_htpasswd-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4ae834bf6ae33cef1053b7481c3a95d210fcdc7e456019e72297f581239a477b
MD5 266aeb6fd5197e03557323b9695d91bb
BLAKE2b-256 9c78798542f931c089f6e84b8bf38fcd52a324a045f5a2b364ab62c962acbf4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page