This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Recurring MacaroonInitException: Must supply serialized macaroon.
in sentry #12707
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-LoggingSynapse's logs (structured or otherwise). Not metrics.Synapse's logs (structured or otherwise). Not metrics.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Description
Internal users: https://sentry.matrix.org/sentry/synapse-matrixorg/issues/219508/?query=is%3Aunresolved
First seen in 1.32.2, according to sentry.
Invalid session for OIDC callback
MacaroonInitException: Must supply serialized macaroon.
File "synapse/handlers/oidc.py", line 220, in handle_oidc_callback
session, state
File "synapse/handlers/oidc.py", line 1186, in verify_oidc_session_token
macaroon = pymacaroons.Macaroon.deserialize(session)
File "pymacaroons/macaroon.py", line 50, in deserialize
'Must supply serialized macaroon.'
Judging from the source code below, it looks like these are errors that we expect to encounter from time to time. Maybe logger.execption
-> logger.warning
?
synapse/synapse/handlers/oidc.py
Lines 217 to 229 in 6463244
# Deserialize the session token and verify it. | |
try: | |
session_data = self._token_generator.verify_oidc_session_token( | |
session, state | |
) | |
except (MacaroonInitException, MacaroonDeserializationException, KeyError) as e: | |
logger.exception("Invalid session for OIDC callback") | |
self._sso_handler.render_error(request, "invalid_session", str(e)) | |
return | |
except MacaroonInvalidSignatureException as e: | |
logger.exception("Could not verify session for OIDC callback") | |
self._sso_handler.render_error(request, "mismatching_session", str(e)) | |
return |
Metadata
Metadata
Assignees
Labels
A-LoggingSynapse's logs (structured or otherwise). Not metrics.Synapse's logs (structured or otherwise). Not metrics.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.