about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-01-17 15:34:44 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2014-01-17 15:34:44 +0100
commit9dde6d38e9fc273fc62386eeda0da2e89a2cebfc (patch)
tree232438307d7b5aac900f2388f4136039840c27d2
parentrepolist: make owner clickable to search (diff)
downloadcgit-pink-9dde6d38e9fc273fc62386eeda0da2e89a2cebfc.tar.gz
cgit-pink-9dde6d38e9fc273fc62386eeda0da2e89a2cebfc.zip
auth: document tweakables in lua script
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--filters/simple-authentication.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/filters/simple-authentication.lua b/filters/simple-authentication.lua
index 9291302..230d3a3 100644
--- a/filters/simple-authentication.lua
+++ b/filters/simple-authentication.lua
@@ -12,17 +12,27 @@
 --
 --
 
+-- A list of password protected repositories along with the users who can access them.
 local protected_repos = {
 	glouglou	= { laurent = true, jason = true },
 	qt		= { jason = true, bob = true }
 }
 
+-- Please note that, in production, you'll want to replace this simple lookup
+-- table with either a table of salted and hashed passwords (using something
+-- smart like scrypt), or replace this table lookup with an external support,
+-- such as consulting your system's pam / shadow system, or an external
+-- database, or an external validating web service. For testing, or for
+-- extremely low-security usage, you may be able, however, to get away with
+-- compromising on hardcoding the passwords in cleartext, as we have done here.
 local users = {
 	jason		= "secretpassword",
 	laurent		= "s3cr3t",
 	bob		= "ilikelua"
 }
 
+-- All cookies will be authenticated based on this secret. Make it something
+-- totally random and impossible to guess. It should be large.
 local secret = "BE SURE TO CUSTOMIZE THIS STRING TO SOMETHING BIG AND RANDOM"
 
 
a href='/cgit-pink/commit/tests/t0001-validate-git-versions.sh?id=27a6d69ab38825602bdbd5a5d0161e465326ea8d&follow=1'>tests: successfully validate rc versionsChristian Hesse 2019-06-05git: update to v2.21.0Christian Hesse 2019-06-05ui-ssdiff: ban strncat()Christian Hesse 2019-06-05global: make 'char *path' const where possibleChristian Hesse 2019-05-20ui-shared: restrict to 15 levelsJason A. Donenfeld 2019-02-23ui-diff,ui-tag: don't use htmlf with non-formatted stringsChris Mayo 2019-02-23ui-ssdiff: resolve HTML5 validation errorsChris Mayo 2019-01-03filters: migrate from luacrypto to luaosslJason A. Donenfeld 2019-01-02ui-shared: fix broken sizeof in title setting and rewriteJason A. Donenfeld 2018-12-09git: update to v2.20.0Christian Hesse 2018-11-25ui-blame: set repo for sbJason A. Donenfeld 2018-11-25auth-filter: pass url with query string attachedJason A. Donenfeld 2018-11-21git: use xz compressed archive for downloadChristian Hesse 2018-10-12git: update to v2.19.1Christian Hesse 2018-09-11ui-ssdiff: ban strcat()Christian Hesse 2018-09-11ui-ssdiff: ban strncpy()Christian Hesse 2018-09-11ui-shared: ban strcat()Christian Hesse 2018-09-11ui-patch: ban sprintf()Christian Hesse 2018-09-11ui-log: ban strncpy()Christian Hesse 2018-09-11ui-log: ban strcpy()Christian Hesse 2018-09-11parsing: ban sprintf()Christian Hesse 2018-09-11parsing: ban strncpy()Christian Hesse 2018-08-28filters: generate anchor links from markdownChristian Hesse 2018-08-03Bump version.Jason A. Donenfeld 2018-08-03clone: fix directory traversalJason A. Donenfeld 2018-08-03config: record repo.snapshot-prefix in the per-repo configKonstantin Ryabitsev