aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-19 13:27:41 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-19 23:59:45 +0100
commitf0936adb34ceddf7d6d5aa99519e7fdccdba8237 (patch)
treefa33e75c2032f7b940fb15dfc3babe9f686398a4
parent66bc98275f24935b2d609ce9c98de5c3b73c6dd3 (diff)
downloadslcl-f0936adb34ceddf7d6d5aa99519e7fdccdba8237.tar.gz
README.md: Update according to current status
-rw-r--r--README.md40
1 files changed, 26 insertions, 14 deletions
diff --git a/README.md b/README.md
index 255453c..028111c 100644
--- a/README.md
+++ b/README.md
@@ -48,8 +48,16 @@ to `slcl`. If required, encryption should be done before uploading e.g.: using
### Ubuntu / Debian
+#### Mandatory packages
+
+```sh
+sudo apt install build-essential libcjson-dev libssl-dev
+```
+
+#### Optional packages
+
```sh
-sudo apt install libcjson-dev libssl-dev xxd
+sudo apt install cmake xxd jq
```
## How to use
@@ -96,10 +104,14 @@ Where:
- `public` is a directory containing read-only files that can be accessed
without authentication. Internally, they are implemented as simlinks to
other files.
- - **Note:** this directory must be created before running `slcl`.
+ - **Note:** `slcl` creates this directory if it does not exist, with
+ directory mode bits set to `0700`.
- `user` is a directory containing user directories, which in turn contain
anything users put into them.
- - **Note:** this directory must be created before running `slcl`.
+ - **Note:** `slcl` creates this directory if it does not exist, with
+ directory mode bits set to `0700`.
+
+**Note:** `slcl` creates the given directory if it does not exist.
A more complete example:
@@ -107,7 +119,7 @@ A more complete example:
.
├── db.json
├── public
-│   └── 416d604c03a1cbb2 -> user/alice/file.txt
+│   └── 44e03ab1bc3b0eff1567c76619186596 -> user/alice/file.txt
└── user
├── alice
│   └── file.txt
@@ -115,9 +127,6 @@ A more complete example:
└── file2.txt
```
-**Note:** user directories (`alice` and `john` on the example above) must be
-created before running `slcl`.
-
### Credentials database
`slcl` reads credentials from the `db.json` database, with the following
@@ -135,13 +144,16 @@ schema:
}
```
-[`usergen`](usergen) is an interactive script that consumes a username, a
-password and, optionally, a user quota in MiB. Then, [`usergen`](usergen)
-writes a JSON object that can be appended to the `users` JSON array in
-`db.json`. A salt is randomly generated using `openssl` and passwords are
-hashed multiple times beforehand - see [`usergen`](usergen) and
-[`auth.c`](/auth.c) for further reference. Also, a random key is generated
-that is later used to sign HTTP cookies.
+[`usergen`](usergen) is an interactive script that consumes a directory,
+a username, a password and, optionally, a user quota in MiB. A salt is
+randomly generated using `openssl` and passwords are hashed multiple times
+beforehand - see [`usergen`](usergen) and [`auth.c`](/auth.c) for further
+reference. Also, a random key is generated that is later used to sign HTTP
+cookies.
+
+Then, [`usergen`](usergen) appends a JSON object to the `users` JSON array in
+the `db.json` file located inside the given directory. Also,
+[`usergen`](usergen) creates the user directory inside the `user/` directory.
When users authenticate from a web browser, `slcl` sends a SHA256HMAC-signed
[JSON Web Token](https://jwt.io), using the random key generated by