Skip to content

Commit

Permalink
Force getting last secret revision in matrix-auth (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
amandahla authored Jan 24, 2025
1 parent eb3a4d3 commit ec9f84a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/charms/synapse/v1/matrix_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _on_config_changed(self, _) -> None:

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 0
LIBPATCH = 4

# pylint: disable=wrong-import-position
import json
Expand Down Expand Up @@ -195,7 +195,7 @@ def get_shared_secret(
return None
try:
secret = model.get_secret(id=shared_secret_id)
password = secret.get_content().get(SHARED_SECRET_CONTENT_LABEL)
password = secret.get_content(refresh=True).get(SHARED_SECRET_CONTENT_LABEL)
if not password:
return None
return SecretStr(password)
Expand Down Expand Up @@ -274,7 +274,7 @@ def get_encryption_key_secret(
secret = model.get_secret(label=ENCRYPTION_KEY_SECRET_LABEL)
else:
secret = model.get_secret(id=encryption_key_secret_id)
encryption_key = secret.get_content().get(ENCRYPTION_KEY_SECRET_CONTENT_LABEL)
encryption_key = secret.get_content(refresh=True).get(ENCRYPTION_KEY_SECRET_CONTENT_LABEL)
if not encryption_key:
return None
return encryption_key.encode('utf-8')
Expand Down

0 comments on commit ec9f84a

Please sign in to comment.