Next: , Previous: , Up: GoCheese  


Password authentication

Password authentication is required for packages uploading. Passwords are dynamically changed through the FIFO file. You have to create it and use in -passwd option. Optionally, to list currently present logins use another FIFO and -passwd-list option:

$ mkfifo passwd passwd-list
$ gocheese -passwd passwd -passwd-list passwd-list ...

Then you must feed it newline-separated records in following format:

username:hashed-password[:ro]

Where hashed-password is in one of following algorithms:

Argon2i (recommended one!)

To get Argon2i hashed-password you can use any of following tools:

Example user foo with password bar can have the following password file entry:

foo:$argon2i$v=19$m=32768,t=3,p=4$OGU5MTM3YjVlYzQwZjhkZA$rVn53v6Ckpf7WH0676ZQLr9Hbm6VH3YnL6I9ONJcIIU
SHA256

You can use your operating system tools:

$ echo -n "password" | `command -v sha256 || echo sha256sum`

Example user foo with password bar will have the following password file entry:

foo:$sha256$fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9

Optional :ro flag forbids user to upload packages, but allows read-only access if -auth-required is enabled.

To add or update password entry:

$ echo foo:$sha256$... > passwd
$ cat passwords.txt > passwd

To delete login entry use empty password:

$ echo foo: > passwd

You can also check you passwords file with:

$ gocheese -passwd-check < passwords.txt
$ echo $?