Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(sso): preserve oidc/saml sub-config when toggle sends flat update payload

rcourtman97aee77ae76e
diff --git a/internal/api/sso_handlers.go b/internal/api/sso_handlers.go
index 095356fc46..ee1653a505 100644
--- a/internal/api/sso_handlers.go
+++ b/internal/api/sso_handlers.go
@@ -366,6 +366,17 @@ func (r *Router) handleUpdateSSOProvider(w http.ResponseWriter, req *http.Reques
return
}
+ // Preserve provider-specific configs when the update payload omits nested objects
+ // (e.g. when the frontend sends back the flat list-response shape).
+ if updated.OIDC == nil && existing.OIDC != nil {
+ oidcCopy := *existing.OIDC
+ updated.OIDC = &oidcCopy
+ }
+ if updated.SAML == nil && existing.SAML != nil {
+ samlCopy := *existing.SAML
+ updated.SAML = &samlCopy
+ }
+
// Preserve secrets if not provided in update
if updated.Type == config.SSOProviderTypeOIDC && updated.OIDC != nil && existing.OIDC != nil {
if updated.OIDC.ClientSecret == "" && existing.OIDC.ClientSecretSet {