Compare commits

...
Author SHA1 Message Date
Ginger 20bc28cd2f chore: News fragment 2026-11-23 15:30:36 +00:00
Ginger 9877464857 feat: Request profile scope from OIDC providers by default 2026-11-23 15:30:36 +00:00
Ginger a6e051fa3b chore: News fragment 2026-11-23 10:10:19 -05:00
Ginger cdda575d4a fix: Return 403 instead of 404 when UIAA is disabled 2026-11-23 10:09:08 -05:00
5 changed files with 15 additions and 7 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
Continuwuity will now request the `profile` OIDC scope from identity providers by default to improve compatibility with identity providers that require it to access users' profile claims, as recommended by the OIDC specification. Contributed by @ginger.
+1
View File
@@ -0,0 +1 @@
Attempting to start a UIAA session on a homeserver with UIAA disabled will now return `403 M_UNAUTHORIZED` instead of `404 M_UNSUPPORTED`. Contributed by @ginger.
+4 -2
View File
@@ -2582,10 +2582,12 @@
# Additional scopes Continuwuity should request from the IDP. This may be
# necessary to access certain claims. Continuwuity always requests the
# `openid` scope.
# `openid` scope, regardless of the contents of this option,
# and will also request the `profile` scope by default if this option is
# not set.
#
# env: CONTINUWUITY_OAUTH__OIDC__ADDITIONAL_SCOPES
#additional_scopes = []
#additional_scopes = ["profile"]
# Additional trusted audiences that Continuwuity will accept in the `aud`
# claim of the OIDC token returned by the IDP. If your identity
+7 -3
View File
@@ -2823,10 +2823,12 @@ pub struct OidcConfig {
/// Additional scopes Continuwuity should request from the IDP. This may be
/// necessary to access certain claims. Continuwuity always requests the
/// `openid` scope.
/// `openid` scope, regardless of the contents of this option,
/// and will also request the `profile` scope by default if this option is
/// not set.
///
/// default: []
#[serde(default)]
/// default: ["profile"]
#[serde(default = "default_additional_scopes")]
pub additional_scopes: Vec<Scope>,
/// Additional trusted audiences that Continuwuity will accept in the `aud`
@@ -3446,6 +3448,8 @@ fn default_unauthenticated_request_ratelimit<K: Hash + Eq + Clone>() -> PerMinut
PerMinuteRatelimiter::new(Quota::per_minute(30.try_into().unwrap()))
}
fn default_additional_scopes() -> Vec<Scope> { vec![Scope::new("profile".to_owned())] }
// NOTE: This must be declared *after* every config struct in this file. The
// example config generator writes sections in macro expansion order, and the
// `global` section truncates the file, so declaring this module any earlier
+2 -2
View File
@@ -348,8 +348,8 @@ impl Service {
.compatibility_mode()
.uiaa_available()
{
return Err!(Request(Unrecognized(
"User-interactive authentication is unavailable on this server"
return Err!(Request(Forbidden(
"User-interactive authentication is not available on this server."
)));
}