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

215 lines
6.8 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.
2021-12-03 17:37:25 +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
# LOGO = "/static/img/canaille-head.png"
2020-11-05 11:18:17 +00:00
# Your favicon. If unset the LOGO will be used.
# FAVICON = "/static/img/canaille-c.png"
2020-08-17 09:05:01 +00:00
# The name of a theme in the 'theme' directory, or an absolute path
# to a theme. Defaults to 'default'. Theming is done with
# https://github.com/tktech/flask-themer
# THEME = "default"
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-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"
2023-01-14 19:16:01 +00:00
# If HIDE_INVALID_LOGINS is set to true (the default), when a user
# tries to sign in with an invalid login, a message is shown indicating
# that the password is wrong, but does not give a clue wether the login
# exists or not.
2023-01-14 19:16:01 +00:00
# If HIDE_INVALID_LOGINS is set to false, when a user tries to sign in with
# an invalid login, a message is shown indicating that the login does not
# exist.
# HIDE_INVALID_LOGINS = true
# If ENABLE_PASSWORD_RECOVERY is false, then users cannot ask for a password
# recovery link by email. This option is true by default.
# ENABLE_PASSWORD_RECOVERY = true
2022-01-01 10:56:48 +00:00
# The validity duration of registration invitations, in seconds.
# Defaults to 2 days
# INVITATION_EXPIRATION = 172800
2021-10-31 13:40:12 +00:00
[LOGGING]
# LEVEL can be one value among:
# DEBUG, INFO, WARNING, ERROR, CRITICAL
2021-12-03 17:37:25 +00:00
# Defaults to WARNING
2021-10-31 13:40:12 +00:00
# LEVEL = "WARNING"
# The path of the log file. If not set (the default) logs are
# written in the standard error output.
# PATH = ""
[BACKENDS.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-12-03 17:37:25 +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"
# The object class to use for creating new users
2021-12-03 17:37:25 +00:00
# USER_CLASS = "inetOrgPerson"
# The attribute to identify an object in the User dn.
# USER_ID_ATTRIBUTE = "uid"
2020-08-20 08:45:33 +00:00
# Filter to match users on sign in. Supports a variable
# {login} that can be used to compare against several fields:
2021-12-03 17:37:25 +00:00
# USER_FILTER = "(|(uid={login})(mail={login}))"
2020-08-20 08:45:33 +00:00
2021-12-02 17:23:14 +00:00
# Where to search for groups?
2021-12-03 17:37:25 +00:00
GROUP_BASE = "ou=groups,dc=mydomain,dc=tld"
2021-12-02 17:23:14 +00:00
# The object class to use for creating new groups
2021-12-03 17:37:25 +00:00
# GROUP_CLASS = "groupOfNames"
2021-12-02 17:23:14 +00:00
# The attribute to identify an object in the User dn.
2021-12-03 17:37:25 +00:00
# GROUP_ID_ATTRIBUTE = "cn"
2021-12-02 17:23:14 +00:00
# The attribute to use to identify a group
2021-12-03 17:37:25 +00:00
# GROUP_NAME_ATTRIBUTE = "cn"
2021-12-02 17:23:14 +00:00
[ACL]
2021-12-02 17:23:14 +00:00
# You can define access controls that define what users can do on canaille
# An access control consists in a FILTER to match users, a list of PERMISSIONS
# matched users will be able to perform, and fields users will be able
2021-12-06 23:07:32 +00:00
# to READ and WRITE. Users matching several filters will cumulate permissions.
2021-12-02 17:23:14 +00:00
#
# 'FILTER' parameter can be:
# - absent, in which case all the users will match this access control
# - a mapping where keys are user attributes name and the values those user
# attribute values. All the values must be matched for the user to be part
# of the access control.
# - a list of those mappings. If a user values match at least one mapping,
# then the user will be part of the access control
#
2021-12-02 17:23:14 +00:00
# Here are some examples
2023-04-15 11:08:24 +00:00
# FILTER = {user_name = 'admin'}
# FILTER =
# - {groups = 'admins}
# - {groups = 'moderators'}
2021-12-02 17:23:14 +00:00
#
# The 'PERMISSIONS' parameter that is an list of items the users in the access
# control will be able to manage. 'PERMISSIONS' is optionnal. Values can be:
# - "edit_self" to allow users to edit their own profile
2021-12-06 23:07:32 +00:00
# - "use_oidc" to allow OpenID Connect authentication
# - "manage_oidc" to allow OpenID Connect client managements
2021-12-02 17:23:14 +00:00
# - "manage_users" to allow other users management
# - "manage_groups" to allow group edition and creation
# - "delete_account" allows a user to delete his own account. If used with
2021-12-06 23:07:32 +00:00
# manage_users, the user can delete any account
2021-12-02 17:23:14 +00:00
# - "impersonate_users" to allow a user to take the identity of another user
#
# The 'READ' and 'WRITE' attributes are the LDAP attributes of the user
# object that users will be able to read and/or write.
[ACL.DEFAULT]
PERMISSIONS = ["edit_self", "use_oidc"]
READ = ["user_name", "groups"]
WRITE = [
"photo",
"given_name",
"family_name",
"display_name",
"password",
"phone_number",
"email",
"profile_url",
"formatted_address",
"street",
"postal_code",
"locality",
"region",
"preferred_language",
"employee_number",
"department",
2023-03-11 21:34:29 +00:00
"title",
"organization",
]
2021-12-02 17:23:14 +00:00
[ACL.ADMIN]
FILTER = {groups = "admins"}
2021-12-02 17:23:14 +00:00
PERMISSIONS = [
"manage_users",
"manage_groups",
"manage_oidc",
"delete_account",
"impersonate_users",
]
2021-12-06 23:07:32 +00:00
WRITE = ["groups"]
[OIDC]
# Wether a token is needed for the RFC7591 dynamical client registration.
# If true, no token is needed to register a client.
# If false, dynamical client registration needs a token defined
# in DYNAMIC_CLIENT_REGISTRATION_TOKENS
# DYNAMIC_CLIENT_REGISTRATION_OPEN = false
# A list of tokens that can be used for dynamic client registration
# DYNAMIC_CLIENT_REGISTRATION_TOKENS = [
# "xxxxxxx-yyyyyyy-zzzzzz",
# ]
2020-08-31 12:09:28 +00:00
# The jwt configuration. You can generate a RSA keypair with:
2021-10-12 16:14:09 +00:00
# openssl genrsa -out private.pem 4096
2020-08-31 12:09:28 +00:00
# openssl rsa -in private.pem -pubout -outform PEM -out public.pem
[OIDC.JWT]
2021-12-03 17:37:25 +00:00
# The path to the private key.
2020-10-21 12:04:40 +00:00
PRIVATE_KEY = "canaille/conf/private.pem"
2021-12-03 17:37:25 +00:00
# The path to the public key.
2021-10-12 16:14:09 +00:00
PUBLIC_KEY = "canaille/conf/public.pem"
2022-04-10 14:00:51 +00:00
# The URI of the identity provider
# ISS = "https://auth.mydomain.tld"
2021-12-03 17:37:25 +00:00
# The key type parameter
# KTY = "RSA"
# The key algorithm
# ALG = "RS256"
# The time the JWT will be valid, in seconds
# EXP = 3600
2020-08-24 09:28:15 +00:00
[OIDC.JWT.MAPPING]
2020-08-26 10:03:06 +00:00
# Mapping between JWT fields and LDAP attributes from your
# User objectClass.
# {attribute} will be replaced by the user ldap attribute value.
# Default values fits inetOrgPerson.
# SUB = "{{ user.user_name[0] }}"
# NAME = "{{ user.formatted_name[0] }}"
# PHONE_NUMBER = "{{ user.phone_number[0] }}"
# EMAIL = "{{ user.mail[0] }}"
# GIVEN_NAME = "{{ user.given_name[0] }}"
# FAMILY_NAME = "{{ user.family_name[0] }}"
# PREFERRED_USERNAME = "{{ user.display_name }}"
# LOCALE = "{{ user.preferred_language }}"
# ADDRESS = "{{ user.formatted_address[0] }}"
# PICTURE = "{% if user.photo %}{{ url_for('account.photo', user_name=user.user_name[0], field='photo', _external=True) }}{% endif %}"
# WEBSITE = "{{ user.profile_url[0] }}"
2020-10-22 15:37:01 +00:00
# The SMTP server options. If not set, mail related features such as
# user invitations, and password reset emails, will be disabled.
2021-12-03 17:37:25 +00:00
[SMTP]
# HOST = "localhost"
# PORT = 25
# TLS = false
2023-02-28 08:53:47 +00:00
# SSL = false
# LOGIN = ""
# PASSWORD = ""
# FROM_ADDR = "admin@mydomain.tld"