From 5015b98db8bd231f2facc5692b881f78194af8e9 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 1 Aug 2022 17:44:05 +0200 Subject: Add a configuration reference page --- doc/src/SUMMARY.md | 9 +++- doc/src/config.md | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/src/rfc.md | 3 ++ 3 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 doc/src/config.md create mode 100644 doc/src/rfc.md diff --git a/doc/src/SUMMARY.md b/doc/src/SUMMARY.md index 6dd8034..92d7932 100644 --- a/doc/src/SUMMARY.md +++ b/doc/src/SUMMARY.md @@ -12,6 +12,11 @@ - [Not ready for production]() +# Reference + +- [Configuration file](./config.md) +- [RFC coverage](./rfc.md) + # Design - [Overview](./overview.md) @@ -19,9 +24,9 @@ - [Mutation Log](./log.md) - [IMAP UID proof](./imap_uid.md) -# Reference +# Internals -- [Data format](./data_format.md) +- [Persisted data structures](./data_format.md) - [Cryptography & key management](./crypt-key.md) # Development diff --git a/doc/src/config.md b/doc/src/config.md new file mode 100644 index 0000000..732ecb7 --- /dev/null +++ b/doc/src/config.md @@ -0,0 +1,126 @@ +# Configuration file + +A configuration file that illustrate all the possible options, +in practise, many fields are omitted: + +```toml +s3_endpoint = "s3.garage.tld" +k2v_endpoint = "k2v.garage.tld" +aws_region = "garage" + +[lmtp] +bind_addr = "[::1]:2525" +hostname = "aerogramme.tld" + +[imap] +bind_addr = "[::1]:993" + +[login_static] +default_bucket = "aerogramme" + +[login_static.user.alan] +email_addresses = [ + "alan@smith.me" + "aln@example.com" +] +password = "$argon2id$v=19$m=4096,t=3,p=1$..." + +aws_access_key_id = "GK..." +aws_secret_access_key = "c0ffee" +bucket = "aerogramme-alan" + +user_secret = "s3cr3t" +alternate_user_secrets = [ "s3cr3t2" "s3cr3t3" ] + +master_key = "..." +secret_key = "..." + +[login_ldap] +ldap_server = "ldap.example.com" + +pre_bind_on_login = true +bind_dn = "cn=admin,dc=example,dc=com" +bind_password = "s3cr3t" + +search_base = "ou=users,dc=example,dc=com" +username_attr = "cn" +mail_attr = "mail" + +aws_access_key_id_attr = "garage_s3_access_key" +aws_secret_access_key_attr = "garage_s3_secret_key" +user_secret_attr = "secret" +alternate_user_secrets_attr = "secret_alt" + +# bucket = "aerogramme" +bucket_attr = "bucket" + +``` + +## Global configuration options + +### `s3_endpoint` + +### `k2v_endpoint` + +### `aws_region` + +## LMTP configuration options + +### `lmtp.bind_addr` + +### `lmtp.hostname` + +## IMAP configuration options + +### `imap.bind_addr` + +## Static login configuration options + +### `login_static.default_bucket` + +### `login_static.user..email_addresses` + +### `login_static.user..password` + +### `login_static.user..aws_access_key_id` + +### `login_static.user..aws_secret_access_key` + +### `login_static.user..bucket` + +### `login_static.user..user_secret` + +### `login_static.user..master_key` + +### `login_static.user..secret_key` + +## LDAP login configuration options + +### `login_ldap.ldap_server` + +### `login_ldap.pre_bind_on` + +### `login_ldap.bind_dn` + +### `login_ldap.bind_password` + +### `login_ldap.search_base` + +### `login_ldap.username_attr` + +### `login_ldap.mail_attr` + +### `login_ldap.aws_access_key_id_attr` + +### `login_ldap.aws_secret_access_key_attr` + +### `login_ldap.user_secret_attr` + +### `login_ldap.alternate_user_secrets_attr` + +### `login_ldap.bucket` + +### `login_ldap.bucket_attr` + + + diff --git a/doc/src/rfc.md b/doc/src/rfc.md new file mode 100644 index 0000000..5b42c92 --- /dev/null +++ b/doc/src/rfc.md @@ -0,0 +1,3 @@ +# RFC coverage + +*Not yet written* -- cgit v1.2.3