2019-04-25 04:52:08 +07:00
|
|
|
###############################################################
|
|
|
|
# Authelia configuration #
|
|
|
|
###############################################################
|
|
|
|
|
2020-01-22 03:56:44 +07:00
|
|
|
host: 127.0.0.1
|
2019-04-25 04:52:08 +07:00
|
|
|
port: 9091
|
|
|
|
|
2020-03-10 02:57:53 +07:00
|
|
|
log_level: debug
|
2019-04-25 04:52:08 +07:00
|
|
|
default_redirection_url: https://home.example.com:8080/
|
|
|
|
|
|
|
|
totp:
|
|
|
|
issuer: authelia.com
|
|
|
|
|
|
|
|
duo_api:
|
|
|
|
hostname: api-123456789.example.com
|
|
|
|
integration_key: ABCDEF
|
|
|
|
|
|
|
|
authentication_backend:
|
|
|
|
ldap:
|
|
|
|
url: ldap://127.0.0.1
|
|
|
|
base_dn: dc=example,dc=com
|
2020-03-15 14:10:25 +07:00
|
|
|
username_attribute: uid
|
2019-04-25 04:52:08 +07:00
|
|
|
additional_users_dn: ou=users
|
2020-03-31 05:36:04 +07:00
|
|
|
users_filter: (&({username_attribute}={input})(objectCategory=person)(objectClass=user))
|
2019-04-25 04:52:08 +07:00
|
|
|
additional_groups_dn: ou=groups
|
|
|
|
groups_filter: (&(member={dn})(objectclass=groupOfNames))
|
|
|
|
group_name_attribute: cn
|
|
|
|
mail_attribute: mail
|
|
|
|
user: cn=admin,dc=example,dc=com
|
|
|
|
|
|
|
|
access_control:
|
|
|
|
default_policy: deny
|
|
|
|
|
|
|
|
rules:
|
|
|
|
# Rules applied to everyone
|
|
|
|
- domain: public.example.com
|
|
|
|
policy: bypass
|
|
|
|
|
|
|
|
- domain: secure.example.com
|
|
|
|
policy: one_factor
|
|
|
|
# Network based rule, if not provided any network matches.
|
|
|
|
networks:
|
|
|
|
- 192.168.1.0/24
|
|
|
|
- domain: secure.example.com
|
|
|
|
policy: two_factor
|
|
|
|
|
2020-04-16 07:18:11 +07:00
|
|
|
- domain: [singlefactor.example.com, onefactor.example.com]
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: one_factor
|
|
|
|
|
2019-11-30 23:49:52 +07:00
|
|
|
# Rules applied to 'admins' group
|
|
|
|
- domain: "mx2.mail.example.com"
|
2019-12-04 14:46:49 +07:00
|
|
|
subject: "group:admins"
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: deny
|
2019-11-30 23:49:52 +07:00
|
|
|
- domain: "*.example.com"
|
2019-12-04 14:46:49 +07:00
|
|
|
subject: "group:admins"
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
# Rules applied to 'dev' group
|
|
|
|
- domain: dev.example.com
|
|
|
|
resources:
|
2019-11-30 23:49:52 +07:00
|
|
|
- "^/groups/dev/.*$"
|
|
|
|
subject: "group:dev"
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
# Rules applied to user 'john'
|
|
|
|
- domain: dev.example.com
|
|
|
|
resources:
|
2019-11-30 23:49:52 +07:00
|
|
|
- "^/users/john/.*$"
|
|
|
|
subject: "user:john"
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: two_factor
|
|
|
|
|
2020-04-16 07:18:11 +07:00
|
|
|
# Rules applied to 'dev' group and user 'john'
|
|
|
|
- domain: dev.example.com
|
|
|
|
resources:
|
|
|
|
- "^/deny-all.*$"
|
|
|
|
subject: ["group:dev", "user:john"]
|
2021-01-04 17:55:23 +07:00
|
|
|
policy: deny
|
2020-04-16 07:18:11 +07:00
|
|
|
|
2019-04-25 04:52:08 +07:00
|
|
|
# Rules applied to user 'harry'
|
|
|
|
- domain: dev.example.com
|
|
|
|
resources:
|
2019-11-30 23:49:52 +07:00
|
|
|
- "^/users/harry/.*$"
|
|
|
|
subject: "user:harry"
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
# Rules applied to user 'bob'
|
2019-11-30 23:49:52 +07:00
|
|
|
- domain: "*.mail.example.com"
|
|
|
|
subject: "user:bob"
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: two_factor
|
2019-11-30 23:49:52 +07:00
|
|
|
- domain: "dev.example.com"
|
2019-04-25 04:52:08 +07:00
|
|
|
resources:
|
2019-11-30 23:49:52 +07:00
|
|
|
- "^/users/bob/.*$"
|
|
|
|
subject: "user:bob"
|
2019-04-25 04:52:08 +07:00
|
|
|
policy: two_factor
|
|
|
|
|
|
|
|
session:
|
|
|
|
name: authelia_session
|
|
|
|
expiration: 3600000 # 1 hour
|
|
|
|
inactivity: 300000 # 5 minutes
|
|
|
|
domain: example.com
|
|
|
|
redis:
|
|
|
|
host: 127.0.0.1
|
|
|
|
port: 6379
|
2021-03-22 16:04:09 +07:00
|
|
|
high_availability:
|
|
|
|
sentinel_name: test
|
2019-04-25 04:52:08 +07:00
|
|
|
|
|
|
|
regulation:
|
|
|
|
max_retries: 3
|
|
|
|
find_time: 120
|
|
|
|
ban_time: 300
|
|
|
|
|
|
|
|
storage:
|
2019-11-17 02:50:58 +07:00
|
|
|
mysql:
|
2019-11-16 17:38:21 +07:00
|
|
|
host: 127.0.0.1
|
|
|
|
port: 3306
|
2019-04-25 04:52:08 +07:00
|
|
|
database: authelia
|
2019-11-16 17:38:21 +07:00
|
|
|
username: authelia
|
2019-04-25 04:52:08 +07:00
|
|
|
|
|
|
|
notifier:
|
|
|
|
smtp:
|
|
|
|
username: test
|
|
|
|
host: 127.0.0.1
|
|
|
|
port: 1025
|
|
|
|
sender: admin@example.com
|
2019-12-30 09:03:51 +07:00
|
|
|
disable_require_tls: true
|