@@ -382,6 +382,35 @@ policy:
382382 # don't require clients to provide a client_uri. default: false
383383 allow_missing_client_uri : false
384384
385+ # Restrictions on user registration
386+ registration :
387+ # If specified, the username (localpart) *must* match one of the allowed
388+ # usernames. If unspecified, all usernames are allowed.
389+ allowed_usernames :
390+ # Exact usernames that are allowed
391+ literals : ["alice", "bob"]
392+ # Substrings that match allowed usernames
393+ substrings : ["user"]
394+ # Regular expressions that match allowed usernames
395+ regexes : ["^[a-z]+$"]
396+ # Prefixes that match allowed usernames
397+ prefixes : ["user-"]
398+ # Suffixes that match allowed usernames
399+ suffixes : ["-corp"]
400+ # If specified, the username (localpart) *must not* match one of the
401+ # banned usernames. If unspecified, all usernames are allowed.
402+ banned_usernames :
403+ # Exact usernames that are banned
404+ literals : ["admin", "root"]
405+ # Substrings that match banned usernames
406+ substrings : ["admin", "root"]
407+ # Regular expressions that match banned usernames
408+ regexes : ["^admin$", "^root$"]
409+ # Prefixes that match banned usernames
410+ prefixes : ["admin-", "root-"]
411+ # Suffixes that match banned usernames
412+ suffixes : ["-admin", "-root"]
413+
385414 # Restrict what email addresses can be added to a user
386415 emails :
387416 # If specified, the email address *must* match one of the allowed addresses.
0 commit comments