Skip to content

Commit b603b32

Browse files
committed
Update the policy documentation
1 parent af569d9 commit b603b32

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

docs/reference/configuration.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,38 @@ policy:
382382
# don't require clients to provide a client_uri. default: false
383383
allow_missing_client_uri: false
384384

385-
# Restrict emails on registration to a specific domain
386-
# Items in this array are evaluated as a glob
387-
allowed_domains:
388-
- *.example.com
389-
# Ban specific domains from registration
390-
banned_domains:
391-
- *.banned.example.com
385+
# Restrict what email addresses can be added to a user
386+
emails:
387+
# If specified, the email address *must* match one of the allowed addresses.
388+
# If unspecified, all email addresses are allowed.
389+
allowed_addresses:
390+
# Exact emails that are allowed
391+
392+
# Regular expressions that match allowed emails
393+
regexes: ["@example\\.com$"]
394+
395+
# If specified, the email address *must not* match one of the banned addresses.
396+
# If unspecified, all email addresses are allowed.
397+
banned_addresses:
398+
# Exact emails that are banned
399+
400+
# Emails that contains those substrings are banned
401+
substrings: ["evil"]
402+
# Regular expressions that match banned emails
403+
regexes: ["@evil\\.corp$"]
404+
405+
requester:
406+
# List of IP addresses and CIDRs that are not allowed to register
407+
banned_ips:
408+
- 192.168.0.1
409+
- 192.168.1.0/24
410+
- fe80::/64
411+
412+
# User agent patterns that are not allowed to register
413+
banned_user_agents:
414+
literals: ["Pretend this is Real;"]
415+
substrings: ["Chrome"]
416+
regexes: ["Chrome 1.*;"]
392417
```
393418
394419
## `rate_limiting`

0 commit comments

Comments
 (0)