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.
Save the login tokens in database instead of being macaroons #13841
Copy link
Copy link
Closed
Labels
A-LoginA-ModulesModule API: https://matrix-org.github.io/synapse/latest/modules/index.htmlModule API: https://matrix-org.github.io/synapse/latest/modules/index.htmlA-SSOSingle Sign-On (maybe OIDC)Single Sign-On (maybe OIDC)O-OccasionalAffects or can be seen by some users regularly or most users rarelyAffects or can be seen by some users regularly or most users rarelyS-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.
Description
While implementing #11414 (OIDC Backchannel Logouts), I needed a way to invalidate login tokens, which is not possible because they are macaroons.
A way of solving this would be to save them in database instead.
One problem is that it makes the creation of login tokens async, which impacts the Module API:
complete_sso_login
, which is sync, but was deprecated in Synapse 1.13.0 in favour ofcomplete_sso_login_async
generate_short_term_login_token
, which is also sync.
My plan is to do a first PR which adds a create_login_token
async method and deprecates the generate_short_term_login
method, and then another one for actually saving the login tokens in the database
Metadata
Metadata
Assignees
Labels
A-LoginA-ModulesModule API: https://matrix-org.github.io/synapse/latest/modules/index.htmlModule API: https://matrix-org.github.io/synapse/latest/modules/index.htmlA-SSOSingle Sign-On (maybe OIDC)Single Sign-On (maybe OIDC)O-OccasionalAffects or can be seen by some users regularly or most users rarelyAffects or can be seen by some users regularly or most users rarelyS-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.