summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-06-02 17:21:31 +0100
committerDavid Baker <dave@matrix.org>2016-06-02 17:21:31 +0100
commit1f31cc37f8611f9ae5612ef5be82e63735fbdf34 (patch)
tree20ac10037b1e13b61ed709ae665925fe53df6e46 /synapse/app
parentMerge remote-tracking branch 'origin/dbkr/email_notif_string_fmt_error' into ... (diff)
downloadsynapse-1f31cc37f8611f9ae5612ef5be82e63735fbdf34.tar.xz
Working unsubscribe links going straight to the HS
and authed by macaroons that let you delete pushers and nothing else
Diffstat (limited to 'synapse/app')
-rw-r--r--synapse/app/pusher.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/synapse/app/pusher.py b/synapse/app/pusher.py
index 135dd58c15..f1de1e7ce9 100644
--- a/synapse/app/pusher.py
+++ b/synapse/app/pusher.py
@@ -21,6 +21,7 @@ from synapse.config._base import ConfigError
 from synapse.config.database import DatabaseConfig
 from synapse.config.logger import LoggingConfig
 from synapse.config.emailconfig import EmailConfig
+from synapse.config.key import KeyConfig
 from synapse.http.site import SynapseSite
 from synapse.metrics.resource import MetricsResource, METRICS_PREFIX
 from synapse.storage.roommember import RoomMemberStore
@@ -63,6 +64,26 @@ class SlaveConfig(DatabaseConfig):
         self.pid_file = self.abspath(config.get("pid_file"))
         self.public_baseurl = config["public_baseurl"]
 
+        # some things used by the auth handler but not actually used in the
+        # pusher codebase
+        self.bcrypt_rounds = None
+        self.ldap_enabled = None
+        self.ldap_server = None
+        self.ldap_port = None
+        self.ldap_tls = None
+        self.ldap_search_base = None
+        self.ldap_search_property = None
+        self.ldap_email_property = None
+        self.ldap_full_name_property = None
+
+        # We would otherwise try to use the registration shared secret as the
+        # macaroon shared secret if there was no macaroon_shared_secret, but
+        # that means pulling in RegistrationConfig too. We don't need to be
+        # backwards compaitible in the pusher codebase so just make people set
+        # macaroon_shared_secret. We set this to None to prevent it referencing
+        # an undefined key.
+        self.registration_shared_secret = None
+
     def default_config(self, server_name, **kwargs):
         pid_file = self.abspath("pusher.pid")
         return """\
@@ -95,7 +116,7 @@ class SlaveConfig(DatabaseConfig):
         """ % locals()
 
 
-class PusherSlaveConfig(SlaveConfig, LoggingConfig, EmailConfig):
+class PusherSlaveConfig(SlaveConfig, LoggingConfig, EmailConfig, KeyConfig):
     pass