mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 05:24:55 -04:00
Add authentication to replication endpoints. (#8853)
Authentication is done by checking a shared secret provided in the Synapse configuration file.
This commit is contained in:
parent
df4b1e9c74
commit
96358cb424
7 changed files with 184 additions and 15 deletions
|
@ -85,6 +85,9 @@ class WorkerConfig(Config):
|
|||
# The port on the main synapse for HTTP replication endpoint
|
||||
self.worker_replication_http_port = config.get("worker_replication_http_port")
|
||||
|
||||
# The shared secret used for authentication when connecting to the main synapse.
|
||||
self.worker_replication_secret = config.get("worker_replication_secret", None)
|
||||
|
||||
self.worker_name = config.get("worker_name", self.worker_app)
|
||||
|
||||
self.worker_main_http_uri = config.get("worker_main_http_uri", None)
|
||||
|
@ -185,6 +188,13 @@ class WorkerConfig(Config):
|
|||
# data). If not provided this defaults to the main process.
|
||||
#
|
||||
#run_background_tasks_on: worker1
|
||||
|
||||
# A shared secret used by the replication APIs to authenticate HTTP requests
|
||||
# from workers.
|
||||
#
|
||||
# By default this is unused and traffic is not authenticated.
|
||||
#
|
||||
#worker_replication_secret: ""
|
||||
"""
|
||||
|
||||
def read_arguments(self, args):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue