summary refs log tree commit diff
path: root/synapse/config/registration.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-20 16:57:51 +0100
committerErik Johnston <erik@matrix.org>2015-10-20 16:57:51 +0100
commit44e2933bf87d278ef0d860ee04e61ecac9744480 (patch)
treec6a15fc8843f99a9f9ce0e47ab2b4254f5d285e4 /synapse/config/registration.py
parentExplicitly check for Sqlite3Engine (diff)
parentDocstring (diff)
downloadsynapse-44e2933bf87d278ef0d860ee04e61ecac9744480.tar.xz
Merge branch 'erikj/filter_refactor' into erikj/search
Diffstat (limited to 'synapse/config/registration.py')
-rw-r--r--synapse/config/registration.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index fa98eced34..f5ef36a9f4 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -33,6 +33,7 @@ class RegistrationConfig(Config):
 
         self.registration_shared_secret = config.get("registration_shared_secret")
         self.macaroon_secret_key = config.get("macaroon_secret_key")
+        self.bcrypt_rounds = config.get("bcrypt_rounds", 12)
 
     def default_config(self, **kwargs):
         registration_shared_secret = random_string_with_symbols(50)
@@ -48,6 +49,11 @@ class RegistrationConfig(Config):
         registration_shared_secret: "%(registration_shared_secret)s"
 
         macaroon_secret_key: "%(macaroon_secret_key)s"
+
+        # Set the number of bcrypt rounds used to generate password hash.
+        # Larger numbers increase the work factor needed to generate the hash.
+        # The default number of rounds is 12.
+        bcrypt_rounds: 12
         """ % locals()
 
     def add_arguments(self, parser):