Mercurial > prosody-wiki
annotate mod_auth_ha1.wiki @ 469:da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
author | MWild1@gmail.com |
---|---|
date | Sat, 26 Jul 2014 21:51:40 +0000 |
parents | |
children | 8fc767861b1e |
rev | line source |
---|---|
469
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
1 #summary Authentication module for 'HA1' hashed credentials in a text file, as used by reTurnServer |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
2 #labels Stage-Beta,Type-Auth |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
3 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
4 = Introduction = |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
5 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
6 This module authenticates users against hashed credentials stored in a plain text file. The format is the same as that used by reTurnServer. |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
7 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
8 = Configuration = |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
9 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
10 || *Name* || *Default* || *Description* || |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
11 || auth_ha1_file || auth.txt || || |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
12 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
13 = File Format = |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
14 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
15 The file format is text, with one user per line. Each line is broken into four fields separated by colons (':'): |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
16 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
17 {{{ |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
18 username:ha1:host:status |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
19 }}} |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
20 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
21 || *Field* || *Description* || |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
22 ||username||The user's login name|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
23 ||ha1||An MD5 hash of "username:host:password"|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
24 ||host||The XMPP hostname|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
25 ||status||The status of the account. Prosody expects this to be just the text "authorized"|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
26 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
27 More info can be found [https://github.com/resiprocate/resiprocate/blob/master/reTurn/users.txt here]. |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
28 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
29 == Example == |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
30 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
31 {{{ |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
32 john:2a236a1a68765361c64da3b502d4e71c:example.com:authorized |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
33 mary:4ed7cf9cbe81e02dbfb814de6f84edf1:example.com:authorized |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
34 charlie:83002e42eb4515ec0070489339f2114c:example.org:authorized |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
35 }}} |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
36 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
37 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: |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
38 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
39 {{{ |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
40 echo -n "john:example.com:hunter2" | md5sum - |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
41 }}} |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
42 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
43 = Compatibility = |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
44 ||0.9||Works|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
45 ||0.10||Works|| |