aboutsummaryrefslogtreecommitdiff
path: root/monfront.conf.example
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2021-12-02 17:54:14 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2021-12-02 17:54:14 +0100
commitfa05045d31c05c8928020f05f1d281901d983b2b (patch)
tree2ed3bac60302bfb14535a169f4b3e10d18fc6120 /monfront.conf.example
parent41d4805d584161ca16b8187194385e47c36422a6 (diff)
cmd/monfront - import monfront from separate repository
This is the import from the separate monfront repository. The history could not be imported, but this should suffice.
Diffstat (limited to 'monfront.conf.example')
-rw-r--r--monfront.conf.example66
1 files changed, 66 insertions, 0 deletions
diff --git a/monfront.conf.example b/monfront.conf.example
new file mode 100644
index 0000000..26a6422
--- /dev/null
+++ b/monfront.conf.example
@@ -0,0 +1,66 @@
+# db contains the database credentials.
+# For available options, see https://godoc.org/github.com/lib/pq
+db = "user=username password=password sslmode=disable dbname=monzero"
+
+# Listen sets the IP and port to start listening for incoming connections.
+listen = "127.0.0.1:8080"
+
+# Change the template path to a different directory.
+#template_path = "templates"
+
+[ssl]
+# Enable SSL support to start listening for incoming connections.
+# This is required for some authentication modes.
+enable = false
+# Configure the path to the private key of the certificate.
+#private_key = "monfront.priv"
+# Set the path to the certificate.
+#certificate = "monfront.crt"
+
+[authentication]
+# mode can be one of "none", "header", "list", "db", "cert"
+# * none disables the authentication
+# * header checks the header of the header parameter
+# * list uses the list parameter to check usernames and passwords
+# * db uses the db credentials to check usernames and passwords
+# * cert uses a client certificate CA to check incoming users
+#
+# When setting a mode of list or db, SSL settings are required to protect
+# the provided credentials.
+mode = "none"
+
+# Set a random string to generate session tokens. The token is placed in a
+# cookie with secure flags, so that the session can't be misused.
+#session_token = ""
+
+# allow_anonymous allows users to view the frontend even when not
+# authenticated.
+#allow_anonymous = false
+
+# When the mode is set to header, this header must contain the username the
+# user was authenticated as. It will then be used to load the permissions.
+# header = "X-AUTH-NAME"
+
+# When using the mode list, this list is checked for matches of usernames
+# and passwords.
+#list = [
+# ["user1", "passwordhash"],
+# ["user2", "anotherpass"],
+#]
+
+# Set the path to the client certificate CA to check incoming client
+# certificates.
+#cert = "clientCA.crt"
+
+[authorization]
+# The mode decides who gets to change data in the frontend.
+# It can be one of:
+# * none - nobody can change data
+# * list - usernames from a specific list can change data
+# * db - users allowed to change data is loaded from the database
+# * all - everyone can change all the data
+mode = "all"
+
+# The list defines the usernames allowed to change data in the frontend. They
+# must be authenticated to get the permission.
+#list = ["user1", "user2"]