diff --git a/dashboard/src/oidc.rs b/dashboard/src/oidc.rs index 90439f5a8192dc6f96da9d64deda923100dc2d90..2866ba36b316995a939abb09c7c1fe6c1f0b1834 100644 --- a/dashboard/src/oidc.rs +++ b/dashboard/src/oidc.rs @@ -156,11 +156,13 @@ pub fn provision(auth: &auth::Store, input: Value) -> Result { .unwrap() .strip_prefix("snowglobe.") .unwrap_or_default(); - if uri.scheme() != "https" - || site.is_empty() - || !uri - .host_str() - .is_some_and(|h| h.ends_with(&format!(".{site}"))) + let host = uri.host_str().unwrap_or_default(); + let allowed = match uri.scheme() { + "https" => !site.is_empty() && host.ends_with(&format!(".{site}")), + "http" => host.ends_with(".localhost"), + _ => false, + }; + if !allowed || !uri.username().is_empty() || uri.password().is_some() || uri.fragment().is_some() diff --git a/service/shale/service.pkl b/service/shale/service.pkl index 0fdfe0fb269db7badba13f01f645b683b91d68f4..dbdb537322551e9b1bb15efa2e5b011b3815b3ac 100644 --- a/service/shale/service.pkl +++ b/service/shale/service.pkl @@ -8,7 +8,10 @@ requirements { new sso.Client { clientId = module.id name = module.name - redirectUris { "https://\(module.container.http.hostname)/-/callback" } + redirectUris { + "https://\(module.container.http.hostname)/-/callback" + "http://git1.localhost/-/callback" + } usernameAliases { ["snow"] = "clover" } allowGuests = true usernameRequired = true