History

auth: document tweakables in lua script

Jason A. Donenfeld committed 12 years ago

Commit 9dde6d31 parent a2b6b371 file · +10 −0Browse files

Unified · Split

filters/simple-authentication.lua+10−0
@@ -12,17 +12,27 @@ · 11 unmodified lines
1212 --
1313 --
1414
15+-- A list of password protected repositories along with the users who can access them.
1516 local protected_repos = {
1617 glouglou = { laurent = true, jason = true },
1718 qt = { jason = true, bob = true }
1819 }
1920
21+-- Please note that, in production, you'll want to replace this simple lookup
22+-- table with either a table of salted and hashed passwords (using something
23+-- smart like scrypt), or replace this table lookup with an external support,
24+-- such as consulting your system's pam / shadow system, or an external
25+-- database, or an external validating web service. For testing, or for
26+-- extremely low-security usage, you may be able, however, to get away with
27+-- compromising on hardcoding the passwords in cleartext, as we have done here.
2028 local users = {
2129 jason = "secretpassword",
2230 laurent = "s3cr3t",
2331 bob = "ilikelua"
2432 }
2533
34+-- All cookies will be authenticated based on this secret. Make it something
35+-- totally random and impossible to guess. It should be large.
2636 local secret = "BE SURE TO CUSTOMIZE THIS STRING TO SOMETHING BIG AND RANDOM"
2737
2838