maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# Password table
 2
 3auth.pass_table module implements username:password authentication by looking up the
 4password hash using a table module (maddy-tables(5)). It can be used
 5to load user credentials from text file (via table.file module) or SQL query
 6(via table.sql_table module).
 7
 8
 9Definition:
10```
11auth.pass_table [block name] {
12	table <table config>
13
14}
15```
16Shortened variant for inline use:
17```
18pass_table <table> [table arguments] {
19	[additional table config]
20}
21```
22
23Example, read username:password pair from the text file:
24```
25smtp tcp://0.0.0.0:587 {
26	auth pass_table file /etc/maddy/smtp_passwd
27	...
28}
29```
30
31## Password hashes
32
33pass_table expects the used table to contain certain structured values with
34hash algorithm name, salt and other necessary parameters.
35
36You should use `maddy hash` command to generate suitable values.
37See `maddy hash --help` for details.
38
39## maddy creds
40
41If the underlying table is a "mutable" table (see maddy-tables(5)) then
42the `maddy creds` command can be used to modify the underlying tables
43via pass_table module. It will act on a "local credentials store" and will write
44appropriate hash values to the table.