Commit Graph
150 Commits
Author SHA1 Message Date
Quentin Gliech 3d2b67a0b2 Upgrade to Rust 1.85 and edition 2024 2025-02-21 16:15:02 +01:00
Quentin Gliech dab640aa51 Allow filtering sessions by client kind (dynamic or static) 2025-02-12 17:31:21 +01:00
Quentin Gliech 917f4d1817 Allow filtering OAuth sessions with any/no user 2025-02-12 13:00:22 +01:00
Quentin Gliech 0e3d10ee45 storage: allow filtering upstream OAuth links by subject 2025-02-12 11:01:53 +01:00
Olivier 'reivilibre 1a6932214f Introduce optional human_name column on compat_sessions 2025-02-05 11:36:51 +01:00
Olivier 'reivilibre 0f3b2d2d89 When consuming a compat refresh token, consume others in the session 2025-02-05 11:36:27 +01:00
reivilibreandQuentin Gliech 0c26dd859a Support compatibility sessions that do not have devices (#3801)
Co-authored-by: Quentin Gliech <quenting@element.io>
2025-01-27 14:50:31 +00:00
Quentin Gliech 244ec18898 Merge remote-tracking branch 'origin/main' into quenting/optional-email 2025-01-23 18:28:33 +01:00
Quentin Gliech 154e42af6b Upgrade Rust to 1.84 and fix new clippy lints 2025-01-23 17:55:22 +01:00
Quentin Gliech dbb53160b6 Data model and storage layer for storing user registrations 2025-01-14 16:30:43 +01:00
Quentin Gliech 0513f198d8 Rip out the email verification codes
This considers all user_emails as confirmed, and removes the verification code.
It will be replaced by a new email authentication code flow
2025-01-14 15:46:45 +01:00
Quentin Gliech 75526ff0c4 storage: new email authentication codes 2025-01-13 17:00:30 +01:00
Quentin Gliech ee33e9c0fb Remove the primary email address concept 2025-01-13 17:00:30 +01:00
Mathieu Velten af1282b510 Allow response_mode to be null and if so do not add the query param (#3700) 2024-12-18 18:18:39 +01:00
Quentin Gliech a97d2daa3d Make the issue optional on upstream OAuth 2.0 providers 2024-12-17 13:40:34 +01:00
Mathieu Velten 80903ed629 Add id_token_signed_response_alg and userinfo_signed_response_alg (#3664) 2024-12-17 11:54:16 +01:00
Quentin Gliech 177a0f42bd Allow revoking refresh tokens
This lets us track 'revoked' tokens separately from 'consumed' tokens.
2024-12-11 14:15:01 +01:00
Quentin Gliech 0360427adf Cleanup revoked tokens instead of expired ones
If we continue deleting expired tokens, we might not record whether the
token was used or not, and not know what to do in case of
a double-refresh.

Revoked tokens are safe to delete.

This also reduces the frequency of the cleanup job to once an hour.
2024-12-11 14:15:01 +01:00
Quentin Gliech 23c73cf191 Record when access tokens are first used 2024-12-11 14:15:01 +01:00
Quentin Gliech 56cb293fbb Record the next refresh token ID when refreshing
This will help us determine whether we had a double-refresh happening
2024-12-11 14:15:01 +01:00
Quentin Gliech 2345685b92 Remove the schedule_expression from the database & other fixes 2024-12-06 16:24:26 +01:00
Quentin Gliech 186860b10f Cron-like recurring jobs 2024-12-06 16:24:26 +01:00
Quentin Gliech cb07af5008 Allow scheduling jobs in the future
Also retries jobs with an exponential backoff.
2024-12-06 16:24:26 +01:00
Quentin Gliech 358186187d Retry failed jobs 2024-12-06 16:24:26 +01:00
Quentin Gliech 89856576cb Actually consume jobs 2024-12-06 16:24:26 +01:00
Quentin Gliech b689554909 Schedule jobs through the new queue 2024-12-06 16:24:26 +01:00
Quentin Gliech 1bcfd3b8f8 Move the jobs types in the queue module 2024-12-06 16:24:26 +01:00
Quentin Gliech 01695269bf WIP jobs 2024-12-06 16:24:26 +01:00
Quentin Gliech df670811b1 Use the database time for leader election 2024-12-06 16:24:26 +01:00
Quentin Gliech 15f589a22a Graceful shutdown 2024-12-06 16:24:26 +01:00
Quentin Gliech 19a2d15c9c Make the worker heartbeat take a worker reference 2024-12-06 16:24:26 +01:00
Quentin Gliech a80077907b New job queue: worker registration and leader election 2024-12-06 16:24:26 +01:00
Quentin Gliech 9021ebee22 Upgrade to Rust 1.83.0 and fix new warnings 2024-12-05 17:32:49 +01:00
Quentin Gliech 2e3b8bdd86 Allow setting an explicit upstream account name (#3600) 2024-11-29 12:30:18 +01:00
Mathieu Velten 56edcb4e52 Add fetch_userinfo to upstream SSO provider (#3363) 2024-11-26 15:01:03 +00:00
Quentin Gliech 98f13004bc Record extra query parameters during upstream callback
And make them available in the templates.
This is useful to get the user display name for Sign-in with Apple
2024-11-22 08:48:00 +01:00
Quentin Gliech 6efe8bf45a Allow setting the response_mode on upstream OAuth 2.0 providers 2024-11-22 08:48:00 +01:00
Quentin Gliech ab4f438464 Support Sign in with Apple 2024-11-22 08:48:00 +01:00
Tonkku c017dd0840 Implement login_hint 2024-11-18 11:42:43 +01:00
Quentin Gliech 87f34522c8 Output the registered client metadata in the registration endpoint
Fixes #2848
2024-09-20 20:39:04 +02:00
Quentin Gliech 21fb01d961 Remove contacts from the data model 2024-09-20 20:39:04 +02:00
Quentin Gliech ed4b6c42a7 Remove (C) 2024-09-10 14:28:55 +02:00
Quentin Gliech f6bb100c0a License headers change 2024-09-05 13:25:42 +02:00
Quentin Gliech 6e32addcfd Update redirect URIs when syncing clients from the config
Fixes #3143
2024-08-30 18:21:33 +02:00
Quentin Gliech 144de0deb2 storage: freeze the error type on BoxRepository
This avoids having to deal with traits bounds everywhere. It also moves
the `boxed()` method to the PgRepository, because it was unnecessary to
keep it on the `Repository` trait
2024-07-26 11:36:55 +02:00
Quentin Gliech d1b9a4980c Update opentelemetry to 0.24.0 2024-07-25 11:01:43 +02:00
Quentin Gliech cef4645286 storage: add a filter by last active time on app sessions 2024-07-19 13:40:27 +02:00
Quentin Gliech 62c2af5e6a storage: add a filter by last active time on OAuth 2.0 sessions 2024-07-19 13:40:27 +02:00
Quentin Gliech 8bc1ef151f storage: add a filter by last active time on compatibility sessions 2024-07-19 13:40:27 +02:00
Quentin Gliech c6b759c56d storage: add a filter by last active time on browser sessions 2024-07-19 13:40:27 +02:00