Commit Graph

215 Commits

Author SHA1 Message Date
Quentin Gliech e080932906 Make the SiteConfig available in the GraphQL context 2024-04-30 13:33:47 +02:00
Quentin Gliech aa2e2229bc Finish moving the site config 2024-04-30 13:33:47 +02:00
Quentin Gliech f0899f17bd Move the SiteConfig to the data-model crate 2024-04-30 13:33:47 +02:00
Quentin Gliech 90080235da Introduce config to restrict user capabilities 2024-04-30 13:33:47 +02:00
Quentin Gliech 4d1b6aeded Prompt for all parameters interactively 2024-04-30 12:15:10 +02:00
Quentin Gliech 8c402a1f50 Prompt for username and confirm user creation 2024-04-30 12:15:10 +02:00
Quentin Gliech 1cb48b8026 Add a manage register-user utility to the CLI 2024-04-30 12:15:10 +02:00
Quentin Gliech cd0ec35d2f Soft-delete upstream OAuth 2.0 providers on config sync 2024-04-03 09:51:22 +02:00
Quentin Gliech 4e3823fe4f Add a soft-deletion column on upstream OAuth 2.0 providers 2024-04-03 09:51:22 +02:00
Quentin Gliech 58fd6ab4c1 Allow disabling registrations (#2553) 2024-04-03 09:27:14 +02:00
Quentin Gliech fc7489c5f8 Flatten the upstream_oauth2 config section 2024-03-22 13:33:09 +01:00
Quentin Gliech aa6178abe6 Flatten the telemetry config section 2024-03-22 13:33:09 +01:00
Quentin Gliech 156dc08280 Clean up the default policy config data 2024-03-22 13:33:09 +01:00
Quentin Gliech f5b34b5b18 Flatten the passwords config section 2024-03-22 13:33:09 +01:00
Quentin Gliech 8bc35f63d8 Flatten the http config
Also properly remove the `spa` resource
2024-03-22 13:33:09 +01:00
Quentin Gliech 6d77d0ed25 Flatten the email config 2024-03-22 13:33:09 +01:00
Quentin Gliech bf50469da1 Flatten the database config 2024-03-22 13:33:09 +01:00
Quentin Gliech cba431d20e Flatten the clients config 2024-03-22 13:33:09 +01:00
Quentin Gliech 1cf283337b Load the configuration from a common Figment instance
This should avoid loading the same files multiple times.
It should also make it easier to do post-processing on the
configuration, like validation.

This does deprecate one undocumented feature: the ability to override
some fields during the configuration generation using environment
variables.
2024-03-22 13:33:09 +01:00
Quentin Gliech dde907758e Use OTEL semantic conventions constants for most attributes 2024-03-19 17:15:14 +01:00
Quentin Gliech eb950151af Upgrade OTEL and remove support for Jaeger and Zipkin exporters 2024-03-18 17:26:40 +01:00
Quentin Gliech e4cf2cdaf5 Make the mas-cli manage verify-email mark the email as primary 2024-03-08 17:25:39 +01:00
Quentin Gliech 6eb6209bd8 Use rustls-platform-verifier for cert validation
This simplifies by removing the mutually exclusive `native-roots` and
`webpki-roots` features with something that is suitable for all
platforms.
2024-03-06 14:03:59 +01:00
Quentin Gliech c0a9d27e34 Automatically sync the configuration on server startup 2024-03-01 18:14:05 +01:00
Quentin Gliech 25fbbf96b9 Load the additional OAuth parameters from the config 2024-03-01 14:36:37 +01:00
Quentin Gliech 1821136e3f Additional parameters from upstream OAuth2 providers in the data model 2024-03-01 14:36:37 +01:00
Quentin Gliech 4aeb446061 Make the HomeserverConnection available in handlers 2024-02-29 11:21:24 +01:00
Quentin Gliech ed5893eb20 Save which user session created a compat session
This also exposes the user session in the GraphQL API, and allow
filtering on browser session ID on the app session list.
2024-02-21 11:55:58 +01:00
Quentin Gliech 293150894b Introduce mas-cli doctor, a simple diagnostic tool
This should help users to diagnose common issues with their setup.
2024-02-08 15:28:43 +01:00
Quentin Gliech 0beb842195 Make the user agree to T&C during registration 2024-02-07 17:21:22 +01:00
Quentin Gliech d3e5f1b101 Automatically run migrations on service startup 2024-02-07 16:31:36 +01:00
Dirk Klimpel 979062d40e allow config dump to file 2024-02-02 18:32:07 +01:00
Quentin Gliech aeca03a120 Upgrade rustls 2024-02-02 11:45:20 +01:00
Quentin Gliech a0f5f3c642 Enable clippy lints on a workspace level
This enables a lot more lints than before in some crates, so this fixed a lot of warnings as well.
2023-12-05 17:20:42 +01:00
Quentin Gliech df3ca5ae66 Upgrade clippy lints to 1.74.0 & fix warnings 2023-12-05 17:20:42 +01:00
Quentin Gliech cc10270ede Allow config generate to generate to a file directly instead of stdout 2023-11-24 11:52:31 +01:00
Quentin Gliech 5126d36b2e Add upstream OAuth 2.0 providers name and branding 2023-11-20 17:23:02 +01:00
Quentin Gliech 7315dd9a7a Allow endpoints and discovery mode override for upstream oauth2 providers
This time, at the configuration and database level
2023-11-17 16:18:39 +01:00
Quentin Gliech 6ded397977 Use minijinja templates to map OIDC claims to user attributes 2023-11-08 12:05:58 +01:00
Quentin Gliech 5ab0e880ff Upgrade opentelemetry to 0.21.0 2023-11-08 11:49:03 +01:00
Quentin Gliech 8984cc703b Add instance privacy policy, TOS and imprint, and loads of design cleanups 2023-10-30 15:55:15 +01:00
Quentin Gliech 9b5c8fb44b Allow running the authentication service on a different base path 2023-10-06 14:07:55 +02:00
Quentin Gliech 1feafc1d13 handlers/templates: infer the language from the Accept-Language browser header 2023-10-05 19:29:23 +02:00
Quentin Gliech 15ad89aa82 templates: add translations function 2023-10-05 19:29:23 +02:00
Quentin Gliech 995bdfc13b templates: replace tera with minijinja 2023-10-05 19:29:23 +02:00
Quentin Gliech f20c8d8ef3 Infer client IP address from the peer address and the X-Forwarded-Proxy header 2023-09-20 20:24:30 +02:00
Quentin Gliech b85655b944 Save the session activity in the database 2023-09-19 21:57:54 +02:00
Quentin Gliech cf5510a1a2 Add an ActivityTracker which tracks session activity and regularly flush them to the database 2023-09-19 21:57:54 +02:00
Quentin Gliech 54071c4969 Make the HTTP client factory reuse the underlying client
This avoids duplicating clients, and makes it so that they all share the same connection pool.
2023-09-14 16:52:01 +02:00
Quentin Gliech f29e4adcfa Always initialize a metric reader to avoid crashes
Fix #1552
2023-09-14 16:52:01 +02:00