fix(PROJ-55): Tenant-Isolation für Rolle "auditor" + Audit-Log korrigieren
Kritischer Sicherheitsbug: Auditoren mit zugewiesenem Tenant sahen Mails und Audit-Log-Einträge anderer Tenants (DSGVO-relevant). auditor wird jetzt analog zu domain_auditor pro Tenant gescoped, sofern tenant_id gesetzt ist (Abwärtskompatibilität: ohne tenant_id bleibt der bisherige globale Zugriff erhalten). Betrifft Mail-Suche, Mail-Detailzugriff, Export, eDiscovery, Threads, OCR sowie das Audit-Log (DB + tamper-evidentes Flat-File), inkl. Befüllung von tenant_id an allen Audit-Log-Schreibstellen.
This commit is contained in:
@@ -30,6 +30,7 @@ func (s *Server) handleSyncTenantLDAP(w http.ResponseWriter, r *http.Request) {
|
||||
s.audlog.Log(audit.Entry{
|
||||
EventType: "tenant_ldap_sync",
|
||||
Username: sess.Username,
|
||||
TenantID: sess.TenantID,
|
||||
IPAddress: s.remoteIP(r),
|
||||
Success: len(res.Errors) == 0,
|
||||
Detail: fmt.Sprintf("%d Benutzer synchronisiert", res.Synced),
|
||||
@@ -53,6 +54,7 @@ func (s *Server) handleAdminSyncTenantLDAP(w http.ResponseWriter, r *http.Reques
|
||||
s.audlog.Log(audit.Entry{
|
||||
EventType: "tenant_ldap_sync",
|
||||
Username: sess.Username,
|
||||
TenantID: sess.TenantID,
|
||||
IPAddress: s.remoteIP(r),
|
||||
Success: len(res.Errors) == 0,
|
||||
Detail: fmt.Sprintf("%d Benutzer synchronisiert (tenant %d)", res.Synced, id),
|
||||
|
||||
Reference in New Issue
Block a user