Mercurial > prosody-wiki
annotate mod_auth_ha1.wiki @ 484:b70f4ca106d5
Edited wiki page mod_storage_mongodb through web user interface.
author | MWild1@gmail.com |
---|---|
date | Sun, 24 Aug 2014 09:24:44 +0000 |
parents | 8fc767861b1e |
children |
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* || |
470
8fc767861b1e
Edited wiki page mod_auth_ha1 through web user interface.
MWild1@gmail.com
parents:
469
diff
changeset
|
11 || auth_ha1_file || auth.txt || Path to the authentication file|| |
8fc767861b1e
Edited wiki page mod_auth_ha1 through web user interface.
MWild1@gmail.com
parents:
469
diff
changeset
|
12 |
8fc767861b1e
Edited wiki page mod_auth_ha1 through web user interface.
MWild1@gmail.com
parents:
469
diff
changeset
|
13 Prosody reads the auth file at startup and on reload (e.g. SIGHUP). |
469
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 = File Format = |
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 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
|
18 |
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 username:ha1:host:status |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
21 }}} |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
22 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
23 || *Field* || *Description* || |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
24 ||username||The user's login name|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
25 ||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
|
26 ||host||The XMPP hostname|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
27 ||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
|
28 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
29 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
|
30 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
31 == Example == |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
32 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
33 {{{ |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
34 john:2a236a1a68765361c64da3b502d4e71c:example.com:authorized |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
35 mary:4ed7cf9cbe81e02dbfb814de6f84edf1:example.com:authorized |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
36 charlie:83002e42eb4515ec0070489339f2114c:example.org:authorized |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
37 }}} |
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 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
|
40 |
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 echo -n "john:example.com:hunter2" | md5sum - |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
43 }}} |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
44 |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
45 = Compatibility = |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
46 ||0.9||Works|| |
da42de0ae310
Created wiki page through web user interface. Sorry Link Mauve.
MWild1@gmail.com
parents:
diff
changeset
|
47 ||0.10||Works|| |