]> Cypherpunks.ru repositories - gocheese.git/blob - doc/passwords.texi
Passwords listing ability
[gocheese.git] / doc / passwords.texi
1 @node Passwords
2 @unnumbered Password authentication
3
4 Password authentication is required for packages uploading. Passwords
5 are dynamically changed through the FIFO file. You have to create it and
6 use in @option{-passwd} option. Optionally, to list currently present
7 logins use another FIFO and @option{-passwd-list} option:
8
9 @example
10 $ mkfifo passwd passwd-list
11 $ gocheese -passwd passwd -passwd-list passwd-list ...
12 @end example
13
14 Then you must feed it newline-separated records in following format:
15
16 @example
17 username:hashed-password
18 @end example
19
20 Where @code{hashed-password} is in one of following algorithms:
21
22 @table @asis
23
24 @item @url{https://www.argon2i.com/, Argon2i} (recommended one!)
25     To get Argon2i hashed-password you can use any of following tools:
26
27     @itemize
28     @item @code{go get @url{https://github.com/balakhonova/argon2i,
29         github.com/balakhonova/argon2i}} (Go)
30     @item @url{https://github.com/p-h-c/phc-winner-argon2} (C)
31     @end itemize
32
33     Example user @code{foo} with password @code{bar} can have the
34     following password file entry:
35
36 @verbatim
37 foo:$argon2i$v=19$m=32768,t=3,p=4$OGU5MTM3YjVlYzQwZjhkZA$rVn53v6Ckpf7WH0676ZQLr9Hbm6VH3YnL6I9ONJcIIU
38 @end verbatim
39
40 @item SHA256
41     You can use your operating system tools:
42
43 @example
44 $ echo -n "password" | `command -v sha256 || echo sha256sum`
45 @end example
46
47     Example user @code{foo} with password @code{bar} will have the
48     following password file entry:
49
50 @verbatim
51 foo:$sha256$fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9
52 @end verbatim
53
54 @end table
55
56 To add or update password entry:
57
58 @example
59 $ echo foo:$sha256$... > passwd
60 $ cat passwords.txt > passwd
61 @end example
62
63 To delete login entry use empty password:
64
65 @example
66 $ echo foo: > passwd
67 @end example
68
69 You can also check you passwords file with:
70
71 @example
72 $ gocheese -passwd-check < passwords.txt
73 $ echo $?
74 @end example