sample_config.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. # Configuration file for Sydent.
  2. #
  3. # This is a YAML file: see [1] for a quick introduction. Note in particular
  4. # that *indentation is important*: all the elements of a list or dictionary
  5. # should have the same indentation.
  6. #
  7. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  8. ## General ##
  9. # The name of the server. Required.
  10. #
  11. server_name: SERVER_NAME
  12. # Settings for configuring logging.
  13. #
  14. logging:
  15. # The path of the file to write the logs to OR 'stderr' to
  16. # log to stderr. Defaults to 'stderr'.
  17. #
  18. #log_path: sydent.log
  19. # The log level to use. This can be set to any level used by the python
  20. # 'logging' module. Note: it should be in all caps. Defaults to 'INFO'
  21. #
  22. #log_level: DEBUG
  23. # The file to save Sydent's process ID (PID) to. Required.
  24. #
  25. pid_file: sydent.pid
  26. # The file where the terms and conditions are configured for Sydent.
  27. # Defaults to empty.
  28. #
  29. #terms_file: terms_and_conditions.yaml
  30. # The maximum number of addresses that someone can query in a single
  31. # /lookup request. Defaults to 10000.
  32. #
  33. #address_lookup_limit: 100
  34. # Whether clients and homeservers can register an association using v1
  35. # API endpoints. Defaults to 'true'.
  36. #
  37. #enable_v1_associations: false
  38. # Whether to delete invite tokens after successful binding has taken
  39. # place. Defaults to 'true'.
  40. #
  41. #delete_tokens_on_bind: false
  42. # Templating options. Sending a value for 'brand' to some API endpoints
  43. # allows for different email and http templates to be used. These
  44. # templates should be stored in a file structure like this:
  45. #
  46. # root_template_dir/
  47. # brand1/
  48. # invite_template.eml
  49. # verification_template.eml
  50. # verify_response_template.html
  51. # brand2/
  52. # invite_template.eml
  53. # verification_template.eml
  54. # verify_response_template.html
  55. #
  56. templates:
  57. # The path of the root directory where template files are kept.
  58. # Required.
  59. #
  60. root_directory: TEMPLATE_DIR
  61. # TThe brand directory to use if no brand (or an invalid brand)
  62. # is provided by the request. Defaults to 'matrix-org'.
  63. #
  64. #default_brand: awesome-brand-name
  65. # Settings for the prometheus metrics client
  66. #
  67. prometheus:
  68. # Whether or not to enable prometheus. Defaults to 'false'.
  69. #
  70. #enabled: true
  71. # The local IPv4 or IPv6 address to which to bind. Empty string
  72. # means bind to all. Defaults to empty.
  73. #
  74. #bind_address: 192.168.0.18
  75. # The port number on which to listen. Defaults to 8080.
  76. #
  77. #port: 8079
  78. # Settings for Sentry integration
  79. #
  80. sentry:
  81. # Whether of not to enable Sentry. Defaults to 'false'.
  82. #
  83. #enabled: true
  84. # The Sentry Data Source Name (DSN) to use. Defaults to empty.
  85. #
  86. #dsn: https://public_key@sentry.example.com/1
  87. # Settings for filtering outgoing requests based on the destination
  88. # IP address.
  89. #
  90. ip_filtering:
  91. # A list of CIDR IP address ranges to block outbound requests to.
  92. # Defaults to a list of private IP ranges to prevent DNS rebinding
  93. # attacks. This list can be found in 'sydent/util/ip_range.py'.
  94. #
  95. #blacklist:
  96. # - "::1/128"
  97. # - "fe80::/10"
  98. # - "fc00::/7"
  99. # - "2001:db8::/32"
  100. # - "ff00::/8"
  101. # - "fec0::/10"
  102. # List of IP address CIDR ranges that should be allowed for outbound
  103. # requests. This is useful for specifying exceptions to wide-ranging
  104. # blacklisted target IP ranges. This list overrides the blaclist.
  105. # Defaults to empty.
  106. #
  107. #whitelist:
  108. # - 192.168.0.23
  109. # - 202.31.555.2
  110. ## Database ##
  111. # The path to the SQLite database file for Sydent to use.
  112. # It can be set to ':memory:' to use a temporary database
  113. # in RAM instead of on disk. Required.
  114. #
  115. database_path: sydent.db
  116. ## Crypto ##
  117. # The key used to sign JSON sent by this server. A new key can
  118. # be generated by running the generate-key script. Required.
  119. #
  120. ed25519_signing_key:
  121. ## SMS ##
  122. # Settings to do with sending SMS validation texts
  123. #
  124. sms:
  125. # The template to use for SMS validation texts. The string '{token}'
  126. # will get replaced with the validation code.
  127. # Defaults to 'Your code is {token}'.
  128. #
  129. #SMS_template: Your validation code is {token}
  130. # Settings to connect to the OpenMarket SMS sender at
  131. # https://smsc.openmarket.com/sms/v4/mt
  132. #
  133. openmarket_SMS_API:
  134. # Username for the service. Defaults to empty.
  135. #
  136. #username: myusername
  137. # Password for the service. Defaults to empty.
  138. #
  139. #password: mypassword
  140. # Settings for the SMS originators based on country code
  141. # An originator should be of the form '<long|short|alpha>:<originator>'
  142. # e.g 'alpha:Matrix' or 'short:012345'
  143. #
  144. sms_originator:
  145. # The list of originators to use by country code of the SMS
  146. # recipient. The originator is chosend deterministically from
  147. # this list so if someone requests multiple codes, they come
  148. # from a consistent number. Defaults to empty.
  149. #
  150. #country_code:
  151. # - 1: # US/Canada
  152. # - long:12125552368
  153. # - long:12125552369
  154. # - 44: # UK
  155. # - short:12345
  156. # The default originator to use if nothing has been set for
  157. # the country code of the SMS recipient. Defaults to 'alpha:Sydent'
  158. #
  159. #default: alpha:Matrix
  160. # A blacklist of SMS recipient country codes. Verification texts
  161. # to numbers in these countries will not be sent. Default to empty.
  162. #
  163. #country_code_blacklist:
  164. # - 44 # UK
  165. # - 33 # France
  166. # - 276 # Germany
  167. ## Emails ##
  168. # Email settings
  169. #
  170. email:
  171. # SMTP server settings
  172. #
  173. SMTP:
  174. # The address of the SMTP server. Defaults to 'localhost'.
  175. #
  176. #server: smtp.myemailsender.com
  177. # The port to connect to the server on. Defaults to 25.
  178. #
  179. #port: 587
  180. # The username for the SMTP server. Defaults to empty.
  181. #
  182. #username: sydent@myemailsender.com
  183. # The password for the SMTP server. Defaults to empty.
  184. #
  185. #password: mypassword
  186. # The security mode to use. This can take one of the following
  187. # options:
  188. #
  189. # - None [Default]
  190. # - TLS
  191. # - SSL
  192. # - STARTTLS
  193. #
  194. #tls_mode: TLS
  195. # The fully qualified domain name (FQDN) to use with HELO/EHLO
  196. # command. Defaults to domain name configured for local host.
  197. #
  198. #host_name: sydent.myserver.com
  199. # Settings that affect the contents of Sydent's emails.
  200. #
  201. # Some of these settings are string templates and can take advantage
  202. # of Sydent's string substitutions. Any parameters set in the body of
  203. # a request to `/_matrix/identity/v2/store-invite` can be used. These
  204. # may include the following:
  205. #
  206. # room_name - The name of the room to which the user is
  207. # invited.
  208. #
  209. # room_alias - The cannonical room alias for the room to
  210. # which the user is invited.
  211. #
  212. # sender_display_name - The display name of the user ID initiating
  213. # the invite.
  214. #
  215. # For more options see https://matrix.org/docs/spec/identity_service/latest
  216. #
  217. # For example '%(room_alias)s' in a string template will be replaced by
  218. # the value set for room_alias
  219. #
  220. contents:
  221. # The email address that should appear to have been sent from. This
  222. # should take the form: 'Display Name Here <actual.email@example.com>'
  223. #
  224. # Defaults to 'Sydent <noreply@example.com>'.
  225. #
  226. #sender: Server Name <noreply@example.com>
  227. # The subject line of emails that invite someone to a room. This is
  228. # a string template.
  229. #
  230. # Defaults to '%(sender_display_name)s has invited you to chat'.
  231. #
  232. #room_invite_subject: Invitation to %(room_alias)s
  233. # The subject line of emails that invite someone to a space. This is
  234. # a string template.
  235. #
  236. # Defaults to '%(sender_display_name)s has invited you to a space'.
  237. #
  238. #space_invite_subject: Invitation to %(room_alias)s
  239. # The web client location which will be used if one is not provided by
  240. # the homeserver. This should be of the form 'scheme://base.url.com/here'
  241. #
  242. # A homeserver can provide a default client by sending a value for
  243. # 'org.matrix.web_client_location' in the request to '/store-invite'.
  244. #
  245. # Defaults to 'https://app.element.io'.
  246. #
  247. #default_matrix_client: https://fluffychat.im/web
  248. # When a user is invited to a room via their email address, that invite is
  249. # displayed in the room list using an obfuscated version of the user's email
  250. # address. These config options determine how much of the email address to
  251. # obfuscate. Note that the '@' sign is always included.
  252. #
  253. # If the string is longer than a configured limit below, it is truncated to
  254. # that limit with '...' added. For shorter strings, the following rules are
  255. # used:
  256. #
  257. # * If the string has more than 5 characters, it is truncated to 3 characters
  258. # + '...' (e.g. 'username' would become 'use...')
  259. #
  260. # * If the string has between 2 and 5 characters inclusive, it is truncated
  261. # to 1 character + '...' (e.g. 'user' would become 'u...')
  262. #
  263. # * If the string is 1 character long, it is converted to just '...'
  264. # (e.g. 'a' would become '...')
  265. #
  266. # This ensures that a full email address is never shown, even if it is extremely
  267. # short.
  268. #
  269. obfuscation_amounts:
  270. # The number of characters from the beginning to reveal of the email's username
  271. # portion (left of the '@' sign). Defaults to 3.
  272. #
  273. #username: 5
  274. # The number of characters from the beginning to reveal of the email's domain
  275. # portion (right of the '@' sign). Defaults to 3.
  276. #
  277. #domain: 5
  278. ## HTTP ##
  279. # The base url of Sydent. This should be of the form
  280. # `scheme://base.url.com/here`. Required.
  281. #
  282. server_base_url: https://SERVER_NAME
  283. # Settings for the listening points for the various APIs
  284. #
  285. http_servers:
  286. # Settings for the client API.
  287. #
  288. client_api:
  289. # The local IPv4 or IPv6 address to which to bind. Defaults to '::1'.
  290. #
  291. #bind_address: 120.243.0.12
  292. # The port number on which to listen. Defaults to 8090.
  293. #
  294. #port: 8089
  295. # Settings for the replication API.
  296. #
  297. replication_api:
  298. # The local IPv4 or IPv6 address to which to bind.
  299. # Defaults to '::1'.
  300. #
  301. #bind_address: 120.243.0.12
  302. # The port number on which to listen. Defaults to 4434.
  303. #
  304. #port: 4433
  305. # The file path to a certificate and private key.
  306. #
  307. # This file should contain both the public certificate and the
  308. # private key used to generate it. Defaults to empty.
  309. #
  310. #cert_file: sydent_priv_key_and_cert.pem
  311. # A file containing root CA certificate. If this is specified then
  312. # certificates of other Sydent servers signed by this CA will be
  313. # trusted.
  314. #
  315. # This is useful for testing or when it's not practical to get the
  316. # client cert signed by a real root CA but should never be used on
  317. # a production server. Defaults to empty.
  318. #
  319. #ca_cert: my_local_ca.crt
  320. # Settings for the internal API.
  321. #
  322. # Enabling this allows for binding and unbinding between identifiers
  323. # and matrix IDs without any validation. This is open to abuse, so is
  324. # disabled by default, and when it is enabled, is available only on a
  325. # separate socket which is bound to `localhost` by default.
  326. #
  327. internal_api:
  328. # Whether or not to enable internal API. Defaults to 'false'.
  329. #
  330. #enabled: true
  331. # The local IPv4 or IPv6 address to which to bind.
  332. # Defaults to '::1'.
  333. #
  334. #bind_address: 192.168.0.18
  335. # The port number on which to listen. Defaults to 9090.
  336. #
  337. #port: 8091
  338. # Whether or not Sydent should pay attention to X-Forwarded-For
  339. # headers. Defaults to 'true'.
  340. #
  341. #obey_x_forwarded_for: false
  342. # Whether or not Sydent should verify the TLS certificates of
  343. # homeservers it communicates with. Defaults to 'true'.
  344. #
  345. #verify_homeserver_certs: false