view mod_auth_ha1/README.markdown @ 1880:a7c1f1b6ef05

mod_checkcerts: Improve error handling when loading certificate
author Kim Alvefur <>
date Tue, 29 Sep 2015 14:56:46 +0200
parents 4d73a1a6ba68
line wrap: on
line source

- 'Stage-Beta'
- 'Type-Auth'
summary: |
    Authentication module for 'HA1' hashed credentials in a text file, as
    used by reTurnServer


This module authenticates users against hashed credentials stored in a
plain text file. The format is the same as that used by reTurnServer.


  Name              Default    Description
  ----------------- ---------- ---------------------------------
  auth\_ha1\_file   auth.txt   Path to the authentication file

Prosody reads the auth file at startup and on reload (e.g. SIGHUP).

File Format

The file format is text, with one user per line. Each line is broken
into four fields separated by colons (':'):


  Field      Description
  ---------- ----------------------------------------------------------------------------------
  username   The user's login name
  ha1        An MD5 hash of "username:host:password"
  host       The XMPP hostname
  status     The status of the account. Prosody expects this to be just the text "authorized"

More info can be found


Constructing the hashes can be done manually using any MD5 utility, such
as md5sum. For example the user 'john' has the password 'hunter2', and
his hash can be calculated like this:

    echo -n "" | md5sum -


  ------ -------
  0.9    Works
  0.10   Works
  ------ -------