1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-21 23:00:50 +03:00
Commit Graph

2125 Commits

Author SHA1 Message Date
Quentin Gliech
bac4125d8c Load environment variables from .env files
This allows to properly set the OAuth 2.0 Issuer base in the Codespace
2021-08-15 09:21:15 +00:00
Quentin Gliech
2361791951 Setup GitHub Codespaces 2021-08-14 20:50:07 +00:00
Quentin Gliech
c4950318dd Commit transaction after exchanging the auth code 2021-08-14 14:35:52 +02:00
Quentin Gliech
d5d9cfe337 ci: Download deps with MSRV 2021-08-14 13:28:03 +02:00
Quentin Gliech
69035e4fb8 Set MSRV and let beta & nightly fail in CI 2021-08-14 13:18:08 +02:00
Quentin Gliech
b5adc80838 Implement code exchange endpoint
Also implement proper client authentication and fix introspection
endpoint
2021-08-14 12:31:19 +02:00
Quentin Gliech
3bdfd68f9d Rework warp top-filters to get proper 404 errors
Before, some had `warp::get().and(warp::path!("foo"))`, which resulted
to a `405 Method not allowed` instead of a 404.

It also uses the `wrap::path!` macro instead of the function to ensure
we're not setting a prefix
2021-08-13 16:20:09 +02:00
Quentin Gliech
787ff192fe Implement basic token introspection endpoint 2021-08-13 15:45:51 +02:00
Quentin Gliech
0596b65f12 Implement proper access token generation 2021-08-13 14:15:20 +02:00
Quentin Gliech
da13e24789 Acquire DB conns and txns on filter level
This avoids having the pool everywhere and instead have connections and
transactions as parameters
2021-08-13 09:38:41 +02:00
Quentin Gliech
4eb1b5d4f8 allow completing an oauth2 session after login 2021-08-06 16:57:49 +02:00
Quentin Gliech
274251ceda wrap HTML responses with warp::reply::html
This sets the Content-Type in responses
2021-08-06 13:57:51 +02:00
Quentin Gliech
66f0605c15 set the response_{modes,types}_supported fields in the discovery document 2021-08-06 13:55:45 +02:00
Quentin Gliech
0e68061f7f support the form_post response mode
also clarify the `register_templates` macro
2021-08-06 12:17:19 +02:00
Quentin Gliech
88c0a80f64 Continue implementing the authorization code grant 2021-08-05 23:44:35 +02:00
Quentin Gliech
bbeef9151d Document some of the templates related structures 2021-08-05 17:48:41 +02:00
Quentin Gliech
f5333da0d2 Remove unnecessary boxing of filters
This might help with error handling, knowing what filter are fallible or not
2021-08-05 17:46:46 +02:00
Quentin Gliech
7a3bcd210d Strongly-typed templates 2021-08-05 14:43:42 +02:00
Quentin Gliech
dcc84e1083 starting the oauth2 authorization flow
also enable compile-time validation of queries
2021-07-31 23:22:41 +02:00
Quentin Gliech
1cfd74dae5 move all IDs in DB to 64bit integers 2021-07-31 15:11:35 +02:00
Quentin Gliech
95677fea03 remove old sessions migrations 2021-07-31 14:51:30 +02:00
Quentin Gliech
f079229abd better CSRF form handling 2021-07-31 14:47:54 +02:00
Quentin Gliech
9b6eae17ea better logging and http handling 2021-07-30 23:07:29 +02:00
Quentin Gliech
dcc4cee6b4 better enforcement of auth and csrf protection 2021-07-30 18:02:05 +02:00
Quentin Gliech
40aa7fcd01 fix clippy errors 2021-07-30 15:36:01 +02:00
Quentin Gliech
0eddd715c8 move the CSRF save filter to crate::filters::csrf 2021-07-30 15:31:34 +02:00
Quentin Gliech
490f97abb7 update dependencies 2021-07-30 15:21:11 +02:00
Quentin Gliech
0499d1a47f migrate to warp, last part 2021-07-30 15:19:30 +02:00
Quentin Gliech
d36069e0fe WIP: migrate to warp, part 3 2021-07-29 16:58:26 +02:00
Quentin Gliech
dc049e96a8 WIP: migrate to warp, part 2 2021-07-29 14:56:33 +02:00
Quentin Gliech
df68f0e2c0 WIP: migrate to warp 2021-07-27 19:20:24 +02:00
Quentin Gliech
69797c711e reimplement CSRF logic 2021-07-27 14:25:15 +02:00
Quentin Gliech
865d5851db oauth2-types: PKCE-related types 2021-07-25 20:11:09 +02:00
Quentin Gliech
b149760455 properly save session with multiple auth
This will help knowing when the user last authed, support MFA & other
login types, support acr_values & max_time, etc.
2021-07-25 14:42:48 +02:00
Quentin Gliech
e907b99db7 rework OIDC metadata endpoint 2021-07-22 16:01:55 +02:00
Quentin Gliech
1b3784840c replace custom serde types with serde_with in oauth2-types 2021-07-22 14:38:14 +02:00
Quentin Gliech
f8184f4026 enable std feature in password-hash to avoid manually building errors 2021-07-17 11:21:58 +02:00
Quentin Gliech
d9806e35b1 store users in database 2021-07-17 00:49:25 +02:00
Quentin Gliech
0abb8b9505 fix CI by removing the --offline flag from rustfmt 2021-07-16 23:22:17 +02:00
Quentin Gliech
36333ae0ab fix dependencies fetching in CI 2021-07-16 23:19:03 +02:00
Quentin Gliech
219b2eea06 cache Cargo dependencies per OS in CI 2021-07-16 23:16:21 +02:00
Quentin Gliech
e8f8c1e7f0 run Cargo in offline mode in CI 2021-07-16 23:04:13 +02:00
Quentin Gliech
444d356000 Retry downloading dependencies twice in CI 2021-07-16 22:55:26 +02:00
Quentin Gliech
3664190ae4 better caching and dependencies fetching in CI 2021-07-16 22:52:00 +02:00
Quentin Gliech
e472dd3692 add a subcommand to generate a config file 2021-07-16 18:55:33 +02:00
Quentin Gliech
4208fa725f make client storage read-only 2021-07-16 18:04:43 +02:00
Quentin Gliech
44718c64a8 fix some license headers 2021-07-16 18:04:04 +02:00
Quentin Gliech
563255e103 reorganize dependencies and upgrade them 2021-07-16 17:47:44 +02:00
Quentin Gliech
758fcd4f4b partial config load & tests 2021-07-16 17:33:16 +02:00
Quentin Gliech
a3b9e3861a split CLI in multiple commands
- `config` to view & check config files
 - `database` for DB-related ops
 - `server` to run the server
2021-07-16 14:34:18 +02:00