Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Failing after 35s
CI / test-python-backend-compliance (push) Successful in 37s
CI / test-python-document-crawler (push) Successful in 27s
CI / test-python-dsms-gateway (push) Successful in 21s
Nach Abschluss von Profil + Scope werden jetzt automatisch die anwendbaren Regulierungen (DSGVO, NIS2, AI Act, DORA) ermittelt und die zustaendigen Aufsichtsbehoerden (Landes-DSB, BSI, BaFin) aus Bundesland + Branche abgeleitet. - Neues scope-to-facts.ts: Mapping CompanyProfile+Scope → Go SDK Payload - Neues supervisory-authority-resolver.ts: 16 Landes-DSB + nationale Behoerden - ScopeDecisionTab: Regulierungs-Report mit Aufsichtsbehoerden-Karten - Obligations-Seite: Echte Daten statt Dummy in handleAutoProfiling() - Neue Types: ApplicableRegulation, RegulationAssessmentResult, SupervisoryAuthorityInfo Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
154 lines
7.0 KiB
TypeScript
154 lines
7.0 KiB
TypeScript
/**
|
|
* Supervisory Authority Resolver
|
|
*
|
|
* Ermittelt automatisch die zustaendigen Aufsichtsbehoerden basierend auf
|
|
* Bundesland/Land des Unternehmens und den anwendbaren Regulierungen.
|
|
*/
|
|
|
|
/**
|
|
* Ergebnis der Aufsichtsbehoerden-Ermittlung
|
|
*/
|
|
export interface SupervisoryAuthorityResult {
|
|
domain: string
|
|
authority: {
|
|
name: string
|
|
abbreviation: string
|
|
url: string
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Mapping: Bundesland-Kuerzel → Landes-Datenschutzbehoerde
|
|
*/
|
|
const DATA_PROTECTION_AUTHORITIES_DE: Record<string, { name: string; abbreviation: string; url: string }> = {
|
|
'BW': { name: 'Landesbeauftragter fuer den Datenschutz und die Informationsfreiheit Baden-Wuerttemberg', abbreviation: 'LfDI BW', url: 'https://www.baden-wuerttemberg.datenschutz.de' },
|
|
'BY': { name: 'Bayerisches Landesamt fuer Datenschutzaufsicht', abbreviation: 'BayLDA', url: 'https://www.lda.bayern.de' },
|
|
'BE': { name: 'Berliner Beauftragte fuer Datenschutz und Informationsfreiheit', abbreviation: 'BlnBDI', url: 'https://www.datenschutz-berlin.de' },
|
|
'BB': { name: 'Landesbeauftragte fuer den Datenschutz und fuer das Recht auf Akteneinsicht Brandenburg', abbreviation: 'LDA BB', url: 'https://www.lda.brandenburg.de' },
|
|
'HB': { name: 'Landesbeauftragte fuer Datenschutz und Informationsfreiheit Bremen', abbreviation: 'LfDI HB', url: 'https://www.datenschutz.bremen.de' },
|
|
'HH': { name: 'Hamburgischer Beauftragter fuer Datenschutz und Informationsfreiheit', abbreviation: 'HmbBfDI', url: 'https://datenschutz-hamburg.de' },
|
|
'HE': { name: 'Hessischer Beauftragter fuer Datenschutz und Informationsfreiheit', abbreviation: 'HBDI', url: 'https://datenschutz.hessen.de' },
|
|
'MV': { name: 'Landesbeauftragter fuer Datenschutz und Informationsfreiheit Mecklenburg-Vorpommern', abbreviation: 'LfDI MV', url: 'https://www.datenschutz-mv.de' },
|
|
'NI': { name: 'Landesbeauftragte fuer den Datenschutz Niedersachsen', abbreviation: 'LfD NI', url: 'https://www.lfd.niedersachsen.de' },
|
|
'NW': { name: 'Landesbeauftragte fuer Datenschutz und Informationsfreiheit Nordrhein-Westfalen', abbreviation: 'LDI NRW', url: 'https://www.ldi.nrw.de' },
|
|
'RP': { name: 'Landesbeauftragter fuer den Datenschutz und die Informationsfreiheit Rheinland-Pfalz', abbreviation: 'LfDI RP', url: 'https://www.datenschutz.rlp.de' },
|
|
'SL': { name: 'Unabhaengiges Datenschutzzentrum Saarland', abbreviation: 'UDZ SL', url: 'https://www.datenschutz.saarland.de' },
|
|
'SN': { name: 'Saechsischer Datenschutz- und Transparenzbeauftragter', abbreviation: 'SDTB', url: 'https://www.saechsdsb.de' },
|
|
'ST': { name: 'Landesbeauftragter fuer den Datenschutz Sachsen-Anhalt', abbreviation: 'LfD ST', url: 'https://datenschutz.sachsen-anhalt.de' },
|
|
'SH': { name: 'Unabhaengiges Landeszentrum fuer Datenschutz Schleswig-Holstein', abbreviation: 'ULD SH', url: 'https://www.datenschutzzentrum.de' },
|
|
'TH': { name: 'Thueringer Landesbeauftragter fuer den Datenschutz und die Informationsfreiheit', abbreviation: 'TLfDI', url: 'https://www.tlfdi.de' },
|
|
}
|
|
|
|
/**
|
|
* Nationale Datenschutzbehoerden fuer Nicht-DE-Laender
|
|
*/
|
|
const DATA_PROTECTION_AUTHORITIES_NATIONAL: Record<string, { name: string; abbreviation: string; url: string }> = {
|
|
'DE': { name: 'Bundesbeauftragter fuer den Datenschutz und die Informationsfreiheit', abbreviation: 'BfDI', url: 'https://www.bfdi.bund.de' },
|
|
'AT': { name: 'Oesterreichische Datenschutzbehoerde', abbreviation: 'DSB AT', url: 'https://www.dsb.gv.at' },
|
|
'CH': { name: 'Eidgenoessischer Datenschutz- und Oeffentlichkeitsbeauftragter', abbreviation: 'EDOEB', url: 'https://www.edoeb.admin.ch' },
|
|
'FR': { name: 'Commission Nationale de l\'Informatique et des Libertes', abbreviation: 'CNIL', url: 'https://www.cnil.fr' },
|
|
'NL': { name: 'Autoriteit Persoonsgegevens', abbreviation: 'AP', url: 'https://www.autoriteitpersoonsgegevens.nl' },
|
|
'IT': { name: 'Garante per la protezione dei dati personali', abbreviation: 'Garante', url: 'https://www.garanteprivacy.it' },
|
|
'ES': { name: 'Agencia Espanola de Proteccion de Datos', abbreviation: 'AEPD', url: 'https://www.aepd.es' },
|
|
'GB': { name: 'Information Commissioner\'s Office', abbreviation: 'ICO', url: 'https://ico.org.uk' },
|
|
}
|
|
|
|
/**
|
|
* Ermittelt die Datenschutz-Aufsichtsbehoerde basierend auf Bundesland und Land.
|
|
*/
|
|
function resolveDataProtectionAuthority(
|
|
state: string | undefined,
|
|
country: string
|
|
): { name: string; abbreviation: string; url: string } {
|
|
// Fuer Deutschland: Landes-Datenschutzbehoerde verwenden
|
|
if (country === 'DE' && state) {
|
|
const stateUpper = state.toUpperCase()
|
|
const landesAuth = DATA_PROTECTION_AUTHORITIES_DE[stateUpper]
|
|
if (landesAuth) return landesAuth
|
|
}
|
|
|
|
// Nationale Behoerde
|
|
const national = DATA_PROTECTION_AUTHORITIES_NATIONAL[country]
|
|
if (national) return national
|
|
|
|
// Fallback fuer EU-Laender
|
|
return { name: 'Nationale Datenschutzbehoerde', abbreviation: 'DSB', url: '' }
|
|
}
|
|
|
|
/**
|
|
* Ermittelt alle zustaendigen Aufsichtsbehoerden basierend auf
|
|
* CompanyProfile-Daten und den anwendbaren Regulierungen.
|
|
*
|
|
* @param headquartersState - Bundesland-Kuerzel (z.B. "BW", "BY")
|
|
* @param headquartersCountry - ISO-Laendercode (z.B. "DE", "AT")
|
|
* @param applicableRegulationIds - IDs der anwendbaren Regulierungen aus dem Go SDK
|
|
*/
|
|
export function resolveAuthorities(
|
|
headquartersState: string | undefined,
|
|
headquartersCountry: string,
|
|
applicableRegulationIds: string[]
|
|
): SupervisoryAuthorityResult[] {
|
|
const results: SupervisoryAuthorityResult[] = []
|
|
|
|
// Datenschutz-Aufsichtsbehoerde (DSGVO gilt fuer fast alle)
|
|
if (applicableRegulationIds.includes('dsgvo')) {
|
|
results.push({
|
|
domain: 'Datenschutz',
|
|
authority: resolveDataProtectionAuthority(headquartersState, headquartersCountry),
|
|
})
|
|
}
|
|
|
|
// NIS2 → BSI (fuer Deutschland)
|
|
if (applicableRegulationIds.includes('nis2')) {
|
|
if (headquartersCountry === 'DE') {
|
|
results.push({
|
|
domain: 'IT-Sicherheit (NIS2)',
|
|
authority: {
|
|
name: 'Bundesamt fuer Sicherheit in der Informationstechnik',
|
|
abbreviation: 'BSI',
|
|
url: 'https://www.bsi.bund.de',
|
|
},
|
|
})
|
|
} else {
|
|
results.push({
|
|
domain: 'IT-Sicherheit (NIS2)',
|
|
authority: {
|
|
name: 'Nationale Cybersicherheitsbehoerde',
|
|
abbreviation: 'NCSA',
|
|
url: '',
|
|
},
|
|
})
|
|
}
|
|
}
|
|
|
|
// Finanzaufsicht → BaFin
|
|
if (applicableRegulationIds.includes('financial_policy')) {
|
|
if (headquartersCountry === 'DE') {
|
|
results.push({
|
|
domain: 'Finanzaufsicht (DORA/MaRisk)',
|
|
authority: {
|
|
name: 'Bundesanstalt fuer Finanzdienstleistungsaufsicht',
|
|
abbreviation: 'BaFin',
|
|
url: 'https://www.bafin.de',
|
|
},
|
|
})
|
|
}
|
|
}
|
|
|
|
// AI Act → Marktueberwachung
|
|
if (applicableRegulationIds.includes('ai_act')) {
|
|
if (headquartersCountry === 'DE') {
|
|
results.push({
|
|
domain: 'KI-Aufsicht (AI Act)',
|
|
authority: {
|
|
name: 'Bundesnetzagentur (voraussichtlich)',
|
|
abbreviation: 'BNetzA',
|
|
url: 'https://www.bundesnetzagentur.de',
|
|
},
|
|
})
|
|
}
|
|
}
|
|
|
|
return results
|
|
}
|