Commit Graph
268 Commits
Author SHA1 Message Date
Quentin Gliech e9589ae17e Don't hold database connections open when talking to the homeserver (#4527) 2025-05-09 09:13:42 +02:00
Quentin Gliech 626c9be760 Move the pool acquisition metric logic to the PgRepositoryFactory 2025-05-07 17:09:20 +02:00
Quentin Gliech 03bad37070 Introduce a RepositoryFactory 2025-05-07 17:00:49 +02:00
Quentin Gliech 5d58d9df7c Don't generate and send a nonce for non-OIDC-compliant auth requests 2025-05-07 15:34:27 +02:00
Doug 2d4f24eed4 Update copyright header
sqlx migrate/prepare are both still happy.
2025-05-07 10:26:30 +01:00
Doug 096ce6037d Add a configuration for forwarding the login hint to the upstream provider. 2025-05-06 17:50:33 +01:00
Quentin Gliech 8bfe2d2092 Allow setting custom names on sessions (#4459) 2025-04-30 15:32:25 +02:00
Quentin Gliech 9cfecaf5db Insert client_name when upserting statically registered clients (#4417) 2025-04-30 11:50:49 +02:00
Quentin Gliech 062d554a6f Avoid deadlocks when updating the last activity of sessions 2025-04-28 09:56:30 +02:00
Quentin Gliech 9a660b211a storage: methods to set the sessions human name 2025-04-25 16:55:30 +02:00
Quentin Gliech 3b6581ab3d storage: add a user-provided human name to OAuth 2.0 sessions 2025-04-25 16:55:29 +02:00
Quentin Gliech b708c403e3 Save the locale detected when starting an authorization grant 2025-04-25 12:55:22 +02:00
Quentin Gliech 60a0285d36 storage: allow setting the human_name when creating compat sessions 2025-04-25 12:55:10 +02:00
Quentin Gliech 0cfea60fa0 Don't parse the user agent unless we need to 2025-04-24 13:13:26 +02:00
Adis Veletanlic 8bf25b9d20 Add client_name to static registrations function and generate new query data 2025-04-16 11:44:58 +02:00
Quentin Gliech 150be9b36a Create missing indexes for all the foreign keys in the database. (#4385) 2025-04-14 16:03:28 +02:00
Quentin Gliech 744bb2c372 Lookup usernames case insensitively (#4378) 2025-04-14 15:51:59 +02:00
Quentin Gliech bd737342b9 Always ask for consent, never for reauth (#4386) 2025-04-14 15:51:48 +02:00
Quentin Gliech 58551c9a62 Handle the case where there are multiple users with the same username, but with a different casing. 2025-04-11 15:38:28 +02:00
Quentin Gliech cf732ac8f0 Always ask for consent, never for reauth
Now that we have deduplicated clients, we're in this weird situation
where authorization grants just… go through.

This is because 4 years ago, I designed it to support prompt=consent and
prompt=none, but that never ended up being used/mentioned in the MSCs.

We also had support for max_age, but that required reauthing, which
doesn't work well with upstream providers.

So this removes support for prompt=consent|none and max_age, and makes
sure we always go through the consent page.

Lots of code deleted, yay!
2025-04-10 19:57:45 +02:00
Quentin Gliech 7012fd3855 Also lowercase the username when checking if it exists. 2025-04-10 18:45:13 +02:00
Quentin Gliech b5ed17dbff Lookup usernames case insensitively 2025-04-10 18:36:43 +02:00
Quentin Gliech c861856dff Create missing indexes for all the foreign keys in the database. 2025-04-10 18:32:40 +02:00
mcalinghee f2a47f9a88 add login by email + feature flag 2025-04-10 17:57:58 +02:00
Quentin Gliech 2b81c8a42e Admin API for adding and removing upstream oauth links (#4255) 2025-04-09 13:33:16 +02:00
Tonkku ae2fe1cb3f Separate spans 2025-04-08 16:54:35 +00:00
Quentin Gliech d310f48a7e compat login: support using client-provided device ID (#4342) 2025-04-07 08:52:29 +02:00
Quentin Gliech 31ccd5448e Properly record the queries in two spans 2025-04-07 08:21:36 +02:00
Quentin Gliech e776d652d9 Fix Clippy lints introduced by Rust 1.86 2025-04-06 16:18:27 +02:00
Olivier 'reivilibre a73cb1c2fb UNFINISHED: finish active sessions when replacing a device 2025-04-04 17:52:08 +01:00
Olivier 'reivilibre 1f2eccc645 compat login (sso): support using client-provided device_id 2025-04-04 16:25:01 +01:00
Quentin Gliech 5c13757e1d Deduplicate client registrations by hashing the metadata 2025-03-25 15:00:23 +01:00
MTRNord 850a9ed81b Link removal storage API
From #3245 with changes from review
2025-03-17 18:31:11 +02:00
dependabot[bot] 01792979ee build(deps): bump uuid from 1.15.1 to 1.16.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 12:55:37 +00:00
Quentin Gliech 6a37fdfe30 Merge branch 'main' into quenting/dynamic-policy-data 2025-03-14 10:16:16 +01:00
Quentin Gliech 97d2b757c7 Add a comment on the migration stating that we keep an history of the policy data 2025-03-13 13:27:32 +01:00
Quentin Gliech 847aa027dc Fix missing 'ui_order' field in tests 2025-03-12 11:32:06 +01:00
Quentin Gliech 69bfdb2d5d Order the OAuth providers in the UI by their order in the config file 2025-03-12 11:12:55 +01:00
Quentin Gliech b72b83665e Repository method to deactivate a user. 2025-03-11 17:35:13 +01:00
Quentin Gliech 6519d6c9ea Add a deactivated_at flag on users 2025-03-11 17:35:13 +01:00
Quentin Gliech 10276b05fc Allow removing email addresses in bulk 2025-03-11 17:35:12 +01:00
Quentin Gliech 7834221c22 Stop writing to the old email confirmation-related tables
This will allow to drop those old tables and fields in the next release
2025-03-11 17:35:12 +01:00
dependabot[bot] 35cf30a622 build(deps): bump uuid from 1.14.0 to 1.15.1
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.14.0 to 1.15.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.14.0...v1.15.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 14:05:02 +00:00
Quentin Gliech 7c9bb73f67 Merge remote-tracking branch 'origin/main' into quenting/compat-device-id 2025-03-04 13:33:09 +01:00
Quentin Gliech aa3af157a3 storage: store dynamic policy data in the database 2025-02-25 12:26:22 +01:00
Quentin Gliech a538b50233 Bump most Rust dependencies 2025-02-24 12:12:07 +01:00
Quentin Gliech 3d2b67a0b2 Upgrade to Rust 1.85 and edition 2024 2025-02-21 16:15:02 +01:00
dependabot[bot] ed8067aac5 build(deps): bump uuid from 1.13.2 to 1.14.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.13.2 to 1.14.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.13.2...v1.14.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-21 13:53:19 +00:00
Quentin Gliech 9cdc3b9f37 Allow compat session devices to have spaces 2025-02-19 17:55:18 +01:00
dependabot[bot] 8c8c7c5f06 build(deps): bump uuid from 1.13.1 to 1.13.2
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.13.1 to 1.13.2.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.13.1...v1.13.2)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-19 16:53:29 +00:00