Add config for trusted ID servers

This commit is contained in:
Brendan Abolivier 2017-09-01 13:08:32 +01:00
parent 960af3d628
commit 9f3078e32b
No known key found for this signature in database
GPG key ID: 8EF1500759F70623
2 changed files with 13 additions and 0 deletions

View file

@ -12,6 +12,11 @@ matrix:
private_key: "/etc/dendrite/matrix_key.pem" private_key: "/etc/dendrite/matrix_key.pem"
# The x509 certificates used by the federation listeners for this server # The x509 certificates used by the federation listeners for this server
federation_certificates: ["/etc/dendrite/server.pem"] federation_certificates: ["/etc/dendrite/server.pem"]
# The list of identity servers trusted to verify third party identifiers by this server.
trusted_third_party_id_servers:
- vector.im
- matrix.org
- riot.im
# The media repository config # The media repository config
media: media:

View file

@ -70,6 +70,10 @@ type Dendrite struct {
// by remote servers. // by remote servers.
// Defaults to 24 hours. // Defaults to 24 hours.
KeyValidityPeriod time.Duration `yaml:"key_validity_period"` KeyValidityPeriod time.Duration `yaml:"key_validity_period"`
// List of domains that the server will trust as identity servers to
// verify third-party identifiers.
// Defaults to an empty array.
TrustedIDServers []string `yaml:"trusted_third_party_id_servers"`
} `yaml:"matrix"` } `yaml:"matrix"`
// The configuration specific to the media repostitory. // The configuration specific to the media repostitory.
@ -273,6 +277,10 @@ func (config *Dendrite) setDefaults() {
config.Matrix.KeyValidityPeriod = 24 * time.Hour config.Matrix.KeyValidityPeriod = 24 * time.Hour
} }
if config.Matrix.TrustedIDServers == nil {
config.Matrix.TrustedIDServers = []string{}
}
if config.Media.MaxThumbnailGenerators == 0 { if config.Media.MaxThumbnailGenerators == 0 {
config.Media.MaxThumbnailGenerators = 10 config.Media.MaxThumbnailGenerators = 10
} }