Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Save the login tokens in database instead of being macaroons #13841

Closed
sandhose opened this issue Sep 19, 2022 · 0 comments · Fixed by #13844
Closed

Save the login tokens in database instead of being macaroons #13841

sandhose opened this issue Sep 19, 2022 · 0 comments · Fixed by #13844
Labels
A-Login A-Modules Module API: https://matrix-org.github.io/synapse/latest/modules/index.html A-SSO Single Sign-On (maybe OIDC) O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@sandhose
Copy link
Member

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 of complete_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

@DMRobertson DMRobertson added A-SSO Single Sign-On (maybe OIDC) T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. A-Modules Module API: https://matrix-org.github.io/synapse/latest/modules/index.html A-Login S-Minor Blocks non-critical functionality, workarounds exist. O-Occasional Affects or can be seen by some users regularly or most users rarely labels Sep 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Login A-Modules Module API: https://matrix-org.github.io/synapse/latest/modules/index.html A-SSO Single Sign-On (maybe OIDC) O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants