diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2022-04-04 18:31:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 17:31:41 +0100 |
commit | 1783496423dcddd33fbbe4dcecdf8162c5cef685 (patch) | |
tree | 67fb8023d98e0d97c8a1ed6960ab4a198b5b76dc | |
parent | f2f9d2916b3a2f23761bbfab98940eb84c36f3b1 (diff) |
remove obsolete config entry "federation_certificates" (#2318)
* Remove all federation_certificates occurencs
This configuration value has not been used since 2019 apparently, and indeed
it is never really used in the code base. So remove all traces of it from
the various configuration files.
Also remove the unused variable FederationCertificatePaths
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* setup/config/config_test.go: remove federation_sender config snippet
The federation_sender: section was folded into the federation_api some
time ago, and this seems to be the only leftover in the code base.
So remove it.
-rw-r--r-- | build/docker/config/dendrite.yaml | 6 | ||||
-rw-r--r-- | dendrite-config.yaml | 6 | ||||
-rw-r--r-- | internal/test/config.go | 2 | ||||
-rw-r--r-- | setup/config/config_federationapi.go | 9 | ||||
-rw-r--r-- | setup/config/config_test.go | 12 |
5 files changed, 0 insertions, 35 deletions
diff --git a/build/docker/config/dendrite.yaml b/build/docker/config/dendrite.yaml index f3d37303..25cbd6d8 100644 --- a/build/docker/config/dendrite.yaml +++ b/build/docker/config/dendrite.yaml @@ -173,12 +173,6 @@ federation_api: max_idle_conns: 2 conn_max_lifetime: -1 - # List of paths to X.509 certificates to be used by the external federation listeners. - # These certificates will be used to calculate the TLS fingerprints and other servers - # will expect the certificate to match these fingerprints. Certificates must be in PEM - # format. - federation_certificates: [] - # How many times we will try to resend a failed transaction to a specific server. The # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. send_max_retries: 16 diff --git a/dendrite-config.yaml b/dendrite-config.yaml index 6e2bc7be..8b4c820a 100644 --- a/dendrite-config.yaml +++ b/dendrite-config.yaml @@ -200,12 +200,6 @@ federation_api: max_idle_conns: 2 conn_max_lifetime: -1 - # List of paths to X.509 certificates to be used by the external federation listeners. - # These certificates will be used to calculate the TLS fingerprints and other servers - # will expect the certificate to match these fingerprints. Certificates must be in PEM - # format. - federation_certificates: [] - # How many times we will try to resend a failed transaction to a specific server. The # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. send_max_retries: 16 diff --git a/internal/test/config.go b/internal/test/config.go index 0b0e897b..d8e0c453 100644 --- a/internal/test/config.go +++ b/internal/test/config.go @@ -78,8 +78,6 @@ func MakeConfig(configDir, kafkaURI, database, host string, startPort int) (*con cfg.Global.ServerName = gomatrixserverlib.ServerName(assignAddress()) cfg.Global.PrivateKeyPath = config.Path(serverKeyPath) - cfg.FederationAPI.FederationCertificatePaths = []config.Path{config.Path(tlsCertPath)} - cfg.MediaAPI.BasePath = config.Path(mediaBasePath) cfg.Global.JetStream.Addresses = []string{kafkaURI} diff --git a/setup/config/config_federationapi.go b/setup/config/config_federationapi.go index 95e70503..176334dd 100644 --- a/setup/config/config_federationapi.go +++ b/setup/config/config_federationapi.go @@ -12,13 +12,6 @@ type FederationAPI struct { // send transactions to remote servers. Database DatabaseOptions `yaml:"database"` - // List of paths to X509 certificates used by the external federation listeners. - // These are used to calculate the TLS fingerprints to publish for this server. - // Other matrix servers talking to this server will expect the x509 certificate - // to match one of these certificates. - // The certificates should be in PEM format. - FederationCertificatePaths []Path `yaml:"federation_certificates"` - // Federation failure threshold. How many consecutive failures that we should // tolerate when sending federation requests to a specific server. The backoff // is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds, etc. @@ -57,8 +50,6 @@ func (c *FederationAPI) Verify(configErrs *ConfigErrors, isMonolith bool) { checkURL(configErrs, "federation_api.external_api.listen", string(c.ExternalAPI.Listen)) } checkNotEmpty(configErrs, "federation_api.database.connection_string", string(c.Database.ConnectionString)) - // TODO: not applicable always, e.g. in demos - //checkNotZero(configErrs, "federation_api.federation_certificates", int64(len(c.FederationCertificatePaths))) } // The config for setting a proxy to use for server->server requests diff --git a/setup/config/config_test.go b/setup/config/config_test.go index 46e973fa..cbc57ad1 100644 --- a/setup/config/config_test.go +++ b/setup/config/config_test.go @@ -107,18 +107,6 @@ federation_api: connect: http://localhost:7772 external_api: listen: http://[::]:8072 - federation_certificates: [] -federation_sender: - internal_api: - listen: http://localhost:7775 - connect: http://localhost:7775 - database: - connection_string: file:federationapi.db - max_open_conns: 100 - max_idle_conns: 2 - conn_max_lifetime: -1 - send_max_retries: 16 - disable_tls_validation: false key_server: internal_api: listen: http://localhost:7779 |