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

62 lines
1.9 KiB
TOML
Raw Normal View History

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-08-17 16:49:05 +00:00
NAME = "MyDomain"
2020-08-31 12:09:28 +00:00
# You can display a logo to be recognized on login screens
2020-08-17 09:53:30 +00:00
# LOGO = "https://path/to/your/organization/logo.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-08-31 09:23:50 +00:00
OAUTH2_METADATA_FILE = "oidc_ldap_bridge/conf/oauth-authorization-server.json"
OIDC_METADATA_FILE = "oidc_ldap_bridge/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"
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"
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
# Filter to match admin users. If your server has memberof
# 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-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-08-31 09:23:50 +00:00
PUBLIC_KEY = "oidc_ldap_bridge/conf/public.pem"
PRIVATE_KEY = "oidc_ldap_bridge/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"
FAMILIY_NAME = "sn"
PREFERRED_USERNAME = "displayName"
LOCALE = "preferredLanguage"
PICTURE = "photo"