canaille-globuzma/canaille/conf/config.sample.toml

122 lines
3.5 KiB
TOML
Raw Normal View History

2020-12-31 11:41:01 +00:00
# All the Flask configuration values can be used:
# https://flask.palletsprojects.com/en/1.1.x/config/#builtin-configuration-values
2020-08-31 12:09:28 +00:00
# The flask secret key for cookies. You MUST change this.
2020-08-17 09:05:01 +00:00
SECRET_KEY = "change me before you go in production"
2020-08-31 12:09:28 +00:00
# Your organization name.
2020-11-05 11:18:17 +00:00
NAME = "Canaille"
2020-08-31 12:09:28 +00:00
2020-10-22 15:37:01 +00:00
# The interface on which canaille will be served
2020-10-29 12:43:53 +00:00
# SERVER_NAME = "auth.mydomain.tld"
# PREFERRED_URL_SCHEME = "https"
2020-10-22 15:37:01 +00:00
2020-08-31 12:09:28 +00:00
# You can display a logo to be recognized on login screens
2020-11-05 11:18:17 +00:00
LOGO = "/static/img/canaille-head.png"
# Your favicon. If unset the LOGO will be used.
FAVICON = "/static/img/canaille-c.png"
2020-08-17 09:05:01 +00:00
2020-08-17 09:38:25 +00:00
# If unset, language is detected
2020-08-31 12:09:28 +00:00
# LANGUAGE = "en"
2020-08-17 09:38:25 +00:00
2020-08-31 12:09:28 +00:00
# Path to the RFC8414 metadata file. You should update those files
# with your production URLs.
2020-10-21 12:04:40 +00:00
OAUTH2_METADATA_FILE = "canaille/conf/oauth-authorization-server.json"
OIDC_METADATA_FILE = "canaille/conf/openid-configuration.json"
2020-08-25 09:15:38 +00:00
2020-09-01 15:27:56 +00:00
# If you have a sentry instance, you can set its dsn here:
# SENTRY_DSN = "https://examplePublicKey@o0.ingest.sentry.io/0"
# If this option is set to true, when a user tries to sign in with
# an invalid login, a message is shown saying that the login does not
# exist. If this option is set to false (the default) a message is
# shown saying that the password is wrong, but does not give a clue
# wether the login exists or not.
# HIDE_INVALID_LOGINS = false
2021-01-01 15:44:57 +00:00
# SELF_DELETION controls the ability for a user to delete his own
# account. The default value is true.
# SELF_DELETION = true
2020-08-17 09:05:01 +00:00
[LDAP]
2020-08-18 15:39:34 +00:00
URI = "ldap://ldap"
ROOT_DN = "dc=mydomain,dc=tld"
BIND_DN = "cn=admin,dc=mydomain,dc=tld"
2020-08-17 09:05:01 +00:00
BIND_PW = "admin"
2021-08-31 13:49:59 +00:00
TIMEOUT =
2020-08-19 14:20:57 +00:00
2020-09-01 15:11:30 +00:00
# Where to search for users?
USER_BASE = "ou=users,dc=mydomain,dc=tld"
2020-08-20 08:45:33 +00:00
# Filter to match users on sign in. Supports a variable
2020-08-31 12:09:28 +00:00
# {login}. For sigin against either uid or mail use:
2020-08-20 08:45:33 +00:00
# USER_FILTER = "(|(uid={login})(mail={login}))"
2020-08-19 14:56:04 +00:00
USER_FILTER = "(|(uid={login})(cn={login}))"
2020-08-20 08:45:33 +00:00
2020-11-01 10:33:56 +00:00
# A class to use for creating new users
USER_CLASS = "inetOrgPerson"
2020-11-02 11:13:03 +00:00
# Filter to match super admin users. Super admins can manage
# OAuth clients, tokens and authorizations. If your LDAP server has
# the 'memberof' overlay, you can filter against group membership.
2020-08-31 11:54:33 +00:00
# ADMIN_FILTER = "uid=admin"
2020-09-17 07:44:45 +00:00
ADMIN_FILTER = "memberof=cn=admins,ou=groups,dc=mydomain,dc=tld"
2020-08-24 08:03:48 +00:00
2020-11-02 11:13:03 +00:00
# Filter to match super admin users. User admins can edit, create
# and delete user accounts. If your LDAP server has the 'memberof'
# overlay, you can filter against group membership.
# USER_ADMIN_FILTER = "uid=moderator"
USER_ADMIN_FILTER = "memberof=cn=moderators,ou=groups,dc=mydomain,dc=tld"
2021-06-03 13:00:11 +00:00
GROUP_BASE = "ou=groups"
GROUP_CLASS = "groupOfNames"
GROUP_NAME_ATTRIBUTE = "cn"
GROUP_USER_FILTER = "(member={user.dn})"
# The list of ldap fields you want to be editable by the
# users.
FIELDS = [
"uid",
"mail",
"givenName",
"sn",
"userPassword",
"telephoneNumber",
"employeeNumber",
2020-12-31 17:10:54 +00:00
# "jpegPhoto",
2021-06-03 13:00:11 +00:00
"groups",
]
2020-08-31 12:09:28 +00:00
# The jwt configuration. You can generate a RSA keypair with:
# ssh-keygen -t rsa -b 4096 -m PEM -f private.pem
# openssl rsa -in private.pem -pubout -outform PEM -out public.pem
2020-08-24 08:03:48 +00:00
[JWT]
2020-10-21 12:04:40 +00:00
PUBLIC_KEY = "canaille/conf/public.pem"
PRIVATE_KEY = "canaille/conf/private.pem"
2020-08-28 14:07:39 +00:00
KTY = "RSA"
ALG = "RS256"
2020-08-24 08:03:48 +00:00
EXP = 3600
2020-08-24 09:28:15 +00:00
[JWT.MAPPING]
2020-08-26 10:03:06 +00:00
# Mapping between JWT fields and LDAP attributes from your
2020-09-25 12:20:09 +00:00
# User objectClass. Default values fits inetOrgPerson.
2020-08-24 09:28:15 +00:00
SUB = "uid"
NAME = "cn"
PHONE_NUMBER = "telephoneNumber"
2020-09-25 12:20:09 +00:00
EMAIL = "mail"
GIVEN_NAME = "givenName"
2020-10-19 15:15:09 +00:00
FAMILY_NAME = "sn"
2020-09-25 12:20:09 +00:00
PREFERRED_USERNAME = "displayName"
LOCALE = "preferredLanguage"
2020-12-31 17:10:54 +00:00
PICTURE = "jpegPhoto"
2020-10-29 12:43:53 +00:00
ADDRESS = "postalAddress"
2020-10-22 15:37:01 +00:00
[SMTP]
HOST = "localhost"
PORT = 25
TLS = false
LOGIN = ""
PASSWORD = ""
2020-10-22 15:37:01 +00:00
FROM_ADDR = "admin@mydomain.tld"