| author | |
| committer | |
| log | 6ea9559d597852c84d29e625b048170ec1826660 |
| tree | e5ed274b5e397f5a609324ab7173914d5517865c |
| parent | 0701dbcf4c737821b522372cdf8419a1cf3a085d |
| signature | Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU |
Add http://git1.localhost/-/callback to the Shale OIDC client and let first-party client provisioning accept http redirects on *.localhost.
Assisted-by: claude-sonnet-5.52 files changed, 11 insertions(+), 6 deletions(-)
dashboard/src/oidc.rs+7-5| ... | ... | @@ -156,11 +156,13 @@ pub fn provision(auth: &auth::Store, input: Value) -> Result<Value> { |
| 156 | 156 | .unwrap() |
| 157 | 157 | .strip_prefix("snowglobe.") |
| 158 | 158 | .unwrap_or_default(); |
| 159 | if uri.scheme() != "https" | |
| 160 | || site.is_empty() | |
| 161 | || !uri | |
| 162 | .host_str() | |
| 163 | .is_some_and(|h| h.ends_with(&format!(".{site}"))) | |
| 159 | let host = uri.host_str().unwrap_or_default(); | |
| 160 | let allowed = match uri.scheme() { | |
| 161 | "https" => !site.is_empty() && host.ends_with(&format!(".{site}")), | |
| 162 | "http" => host.ends_with(".localhost"), | |
| 163 | _ => false, | |
| 164 | }; | |
| 165 | if !allowed | |
| 164 | 166 | || !uri.username().is_empty() |
| 165 | 167 | || uri.password().is_some() |
| 166 | 168 | || uri.fragment().is_some() |
service/shale/service.pkl+4-1| ... | ... | @@ -8,7 +8,10 @@ requirements { |
| 8 | 8 | new sso.Client { |
| 9 | 9 | clientId = module.id |
| 10 | 10 | name = module.name |
| 11 | redirectUris { "https://\(module.container.http.hostname)/-/callback" } | |
| 11 | redirectUris { | |
| 12 | "https://\(module.container.http.hostname)/-/callback" | |
| 13 | "http://git1.localhost/-/callback" | |
| 14 | } | |
| 12 | 15 | usernameAliases { ["snow"] = "clover" } |
| 13 | 16 | allowGuests = true |
| 14 | 17 | usernameRequired = true |