![Anselme, Schubbert (sa246v)](/assets/img/avatar_default.png)
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com> Change-Id: I4b5a5f6a7e21d790cce13a5ccff9819f517cad64
21 lines
907 B
Diff
21 lines
907 B
Diff
diff --git a/src/maasserver/security.py b/src/maasserver/security.py
|
|
index f92529265..542970009 100644
|
|
--- a/src/maasserver/security.py
|
|
+++ b/src/maasserver/security.py
|
|
@@ -97,11 +97,11 @@ def get_shared_secret_txn():
|
|
elif secret_in_db == secret_on_fs:
|
|
secret = secret_in_db # or secret_on_fs.
|
|
else:
|
|
- raise AssertionError(
|
|
- "The secret stored in the database does not match the secret "
|
|
- "stored on the filesystem at %s. Please investigate."
|
|
- % get_shared_secret_filesystem_path()
|
|
- )
|
|
+ # (nk613n): When we rotate secrets we only update the filesystem
|
|
+ # so if the secrets don't match we will default to the FS
|
|
+ # secret and set it in the database (set_config function)
|
|
+ secret = secret_on_fs
|
|
+ Config.objects.set_config("rpc_shared_secret", to_hex(secret))
|
|
|
|
return secret
|