diff --git a/pkg/server/auth/saml_acs_handler.go b/pkg/server/auth/saml_acs_handler.go index 3266ebf0f..72e5ce69f 100644 --- a/pkg/server/auth/saml_acs_handler.go +++ b/pkg/server/auth/saml_acs_handler.go @@ -70,7 +70,7 @@ func SAMLACSHandler(samlSvc *authsvc.SAMLService, authSvc *authsvc.Service, auth user, err := authSvc.CreateOrGetSAMLUser(ctx, userInfo.Email, userInfo.FullName, userInfo.SAMLSubject) if err != nil { - logger.ErrorCtx(ctx, "cannot create or get SAML user", log.Error(err), log.String("email", userInfo.Email)) + logger.ErrorCtx(ctx, "cannot create or get SAML user", log.Error(err)) http.Error(w, "cannot create user", http.StatusInternalServerError) return } diff --git a/pkg/server/auth/saml_check_sso_handler.go b/pkg/server/auth/saml_check_sso_handler.go index 16118790a..c8e940b6e 100644 --- a/pkg/server/auth/saml_check_sso_handler.go +++ b/pkg/server/auth/saml_check_sso_handler.go @@ -54,7 +54,7 @@ func SAMLCheckSSOHandler(authSvc *authsvc.Service, logger *log.Logger) http.Hand configs, err := authSvc.CheckSSOAvailabilityByEmail(ctx, req.Email) if err != nil { - logger.ErrorCtx(ctx, "cannot check SSO availability", log.Error(err), log.String("email", req.Email)) + logger.ErrorCtx(ctx, "cannot check SSO availability", log.Error(err)) httpserver.RenderError(w, http.StatusInternalServerError, fmt.Errorf("cannot check SSO availability")) return } @@ -69,7 +69,7 @@ func SAMLCheckSSOHandler(authSvc *authsvc.Service, logger *log.Logger) http.Hand // Multiple SAML configs found - ambiguous, user must use organization-specific SSO URL if len(configs) > 1 { - logger.WarnCtx(ctx, "multiple SAML configurations found for domain", log.String("email", req.Email), log.Int("count", len(configs))) + logger.WarnCtx(ctx, "multiple SAML configurations found for domain", log.Int("count", len(configs))) httpserver.RenderError(w, http.StatusConflict, fmt.Errorf("multiple SSO configurations found for this domain. Please use your organization-specific SSO login URL")) return } diff --git a/pkg/server/auth/saml_login_handler.go b/pkg/server/auth/saml_login_handler.go index c027cf560..ea325cd23 100644 --- a/pkg/server/auth/saml_login_handler.go +++ b/pkg/server/auth/saml_login_handler.go @@ -53,12 +53,12 @@ func SAMLLoginHandler(samlSvc *authsvc.SAMLService, authSvc *authsvc.Service, lo redirectURL, err := samlSvc.InitiateSAMLLogin(ctx, config.OrganizationID, tenantID, config.EmailDomain) if err != nil { - logger.ErrorCtx(ctx, "cannot initiate SAML login", log.Error(err), log.String("saml_config_id", samlConfigID.String()), log.String("org_id", config.OrganizationID.String()), log.String("email_domain", config.EmailDomain)) + logger.ErrorCtx(ctx, "cannot initiate SAML login", log.Error(err), log.String("saml_config_id", samlConfigID.String()), log.String("org_id", config.OrganizationID.String())) http.Error(w, fmt.Sprintf("SAML login failed: %v", err), http.StatusInternalServerError) return } - logger.InfoCtx(ctx, "SAML login initiated", log.String("saml_config_id", samlConfigID.String()), log.String("org_id", config.OrganizationID.String()), log.String("email_domain", config.EmailDomain)) + logger.InfoCtx(ctx, "SAML login initiated", log.String("saml_config_id", samlConfigID.String()), log.String("org_id", config.OrganizationID.String())) http.Redirect(w, r, redirectURL, http.StatusFound) }