Breach Notification System
NDPR-compliant system for managing and reporting data breaches
Overview
The Breach Notification System provides a complete solution for detecting, managing, and reporting data breaches in compliance with the Nigeria Data Protection Regulation (NDPR). It includes components for breach reporting, risk assessment, notification management, and regulatory reporting.
NDPR Breach Notification Requirements
Under the NDPR, organizations must report data breaches to the National Information Technology Development Agency (NITDA) within 72 hours of becoming aware of the breach. Organizations must also notify affected data subjects without undue delay.
Installation
Install the NDPR Toolkit package which includes the Breach Notification components:
npm install @tantainnovative/ndpr-toolkit
Or if you're using yarn:
yarn add @tantainnovative/ndpr-toolkit
Components
The Breach Notification system includes several components that work together:
BreachReportForm
A form for internal staff to report suspected data breaches, capturing essential details.
import { BreachReportForm } from '@tantainnovative/ndpr-toolkit';
<BreachReportForm
onSubmit={handleSubmitBreachReport}
categories={[
{ id: 'unauthorized-access', label: 'Unauthorized Access' },
{ id: 'data-loss', label: 'Data Loss' },
{ id: 'system-compromise', label: 'System Compromise' },
{ id: 'phishing', label: 'Phishing Attack' },
{ id: 'other', label: 'Other' }
]}
/>
BreachRiskAssessment
A tool for assessing the risk level of a data breach and determining notification requirements.
import { BreachRiskAssessment } from '@tantainnovative/ndpr-toolkit';
<BreachRiskAssessment
breachData={breachData}
onComplete={handleRiskAssessmentComplete}
/>
BreachNotificationManager
A dashboard for managing breach notifications, including tracking notification status and deadlines.
import { BreachNotificationManager } from '@tantainnovative/ndpr-toolkit';
<BreachNotificationManager
breaches={breaches}
onUpdateStatus={handleUpdateStatus}
onSendNotification={handleSendNotification}
/>
RegulatoryReportGenerator
A tool for generating NDPR-compliant breach notification reports for submission to NITDA.
import { RegulatoryReportGenerator } from '@tantainnovative/ndpr-toolkit';
<RegulatoryReportGenerator
breachData={breachData}
organizationInfo={organizationInfo}
onGenerate={handleGenerateReport}
/>
Usage
Here's a complete example of how to implement the Breach Notification system in your application:
import { useState, useEffect } from 'react';
import {
BreachReportForm,
BreachRiskAssessment,
BreachNotificationManager,
RegulatoryReportGenerator
} from '@tantainnovative/ndpr-toolkit';
// Define breach categories
const breachCategories = [
{ id: 'unauthorized-access', label: 'Unauthorized Access' },
{ id: 'data-loss', label: 'Data Loss' },
{ id: 'system-compromise', label: 'System Compromise' },
{ id: 'phishing', label: 'Phishing Attack' },
{ id: 'other', label: 'Other' }
];
// Organization information
const organizationInfo = {
name: 'Example Company Ltd.',
address: '123 Main Street, Lagos, Nigeria',
dpoName: 'John Doe',
dpoEmail: 'dpo@example.com',
dpoPhone: '+234 123 456 7890'
};
// Sample breach service (replace with your actual data service)
const breachService = {
breaches: [],
reportBreach: (breachData) => {
const newBreach = {
...breachData,
id: `breach-${Date.now()}`,
status: 'reported',
reportedAt: new Date(),
riskAssessment: null,
notifications: [],
regulatoryReport: null
};
breachService.breaches.push(newBreach);
return newBreach;
},
getBreaches: () => {
return breachService.breaches;
},
getBreachById: (id) => {
return breachService.breaches.find(breach => breach.id === id);
},
updateBreachStatus: (id, status) => {
const breach = breachService.breaches.find(breach => breach.id === id);
if (breach) {
breach.status = status;
breach.updatedAt = new Date();
}
return breach;
},
saveRiskAssessment: (id, assessment) => {
const breach = breachService.breaches.find(breach => breach.id === id);
if (breach) {
breach.riskAssessment = assessment;
breach.updatedAt = new Date();
// Update status based on risk level
if (assessment.riskLevel === 'high') {
breach.status = 'high-risk';
} else if (assessment.riskLevel === 'medium') {
breach.status = 'medium-risk';
} else {
breach.status = 'low-risk';
}
}
return breach;
},
recordNotification: (id, notification) => {
const breach = breachService.breaches.find(breach => breach.id === id);
if (breach) {
breach.notifications.push({
...notification,
id: `notification-${Date.now()}`,
sentAt: new Date()
});
breach.updatedAt = new Date();
// Update status if all required notifications are sent
if (breach.notifications.length >= breach.riskAssessment.requiredNotifications.length) {
breach.status = 'notifications-complete';
}
}
return breach;
},
saveRegulatoryReport: (id, report) => {
const breach = breachService.breaches.find(breach => breach.id === id);
if (breach) {
breach.regulatoryReport = {
...report,
generatedAt: new Date()
};
breach.status = 'report-generated';
breach.updatedAt = new Date();
}
return breach;
}
};
// Breach reporting form component
function BreachReportingPage() {
const [submitted, setSubmitted] = useState(false);
const [currentBreach, setCurrentBreach] = useState(null);
const handleSubmitBreachReport = (breachData) => {
const newBreach = breachService.reportBreach(breachData);
setCurrentBreach(newBreach);
setSubmitted(true);
};
const handleRiskAssessmentComplete = (assessment) => {
const updatedBreach = breachService.saveRiskAssessment(currentBreach.id, assessment);
setCurrentBreach(updatedBreach);
};
return (
<div>
<h1>Data Breach Reporting</h1>
{!submitted ? (
<>
<p>
Use this form to report a suspected data breach. All breaches must be
reported internally within 24 hours of discovery.
</p>
<BreachReportForm
onSubmit={handleSubmitBreachReport}
categories={breachCategories}
/>
</>
) : (
<div>
<h2>Breach Reported</h2>
<p>
The breach has been reported successfully. Reference number: <strong>{currentBreach.id}</strong>
</p>
<h3>Risk Assessment</h3>
<p>
Please complete the risk assessment to determine notification requirements.
</p>
<BreachRiskAssessment
breachData={currentBreach}
onComplete={handleRiskAssessmentComplete}
/>
{currentBreach.riskAssessment && (
<div>
<h3>Risk Assessment Complete</h3>
<p>
Risk Level: <strong>{currentBreach.riskAssessment.riskLevel}</strong>
</p>
<p>
{currentBreach.riskAssessment.requiresNitdaNotification
? 'NITDA notification is required within 72 hours.'
: 'NITDA notification is not required.'}
</p>
<p>
{currentBreach.riskAssessment.requiresDataSubjectNotification
? 'Data subject notification is required without undue delay.'
: 'Data subject notification is not required.'}
</p>
</div>
)}
</div>
)}
</div>
);
}
// Breach management dashboard component
function BreachManagementDashboard() {
const [breaches, setBreaches] = useState([]);
const [selectedBreach, setSelectedBreach] = useState(null);
useEffect(() => {
// Load breaches from service
setBreaches(breachService.getBreaches());
}, []);
const handleUpdateStatus = (id, status) => {
const updatedBreach = breachService.updateBreachStatus(id, status);
setBreaches(breachService.getBreaches());
};
const handleSendNotification = (id, notification) => {
const updatedBreach = breachService.recordNotification(id, notification);
setBreaches(breachService.getBreaches());
};
const handleGenerateReport = (id, report) => {
const updatedBreach = breachService.saveRegulatoryReport(id, report);
setBreaches(breachService.getBreaches());
setSelectedBreach(updatedBreach);
};
return (
<div>
<h1>Breach Management Dashboard</h1>
<BreachNotificationManager
breaches={breaches}
onUpdateStatus={handleUpdateStatus}
onSendNotification={handleSendNotification}
onSelectBreach={setSelectedBreach}
/>
{selectedBreach && selectedBreach.riskAssessment &&
selectedBreach.riskAssessment.requiresNitdaNotification && (
<div>
<h2>Regulatory Report Generator</h2>
<p>
Generate a NITDA breach notification report for submission.
</p>
<RegulatoryReportGenerator
breachData={selectedBreach}
organizationInfo={organizationInfo}
onGenerate={(report) => handleGenerateReport(selectedBreach.id, report)}
/>
</div>
)}
</div>
);
}
Props
BreachReportForm Props
Name | Type | Required | Description |
---|---|---|---|
onSubmit | (data: BreachReport) => void | Yes | Callback function when user submits a breach report |
categories | { id: string, label: string }[] | Yes | Array of breach categories to display |
initialValues | Partial<BreachReport> | No | Initial values for the form fields |
BreachReport Type
type BreachReport = {
id?: string;
title: string;
category: string;
description: string;
discoveredAt: Date;
reportedBy: {
name: string;
email: string;
department: string;
};
affectedSystems: string[];
affectedDataTypes: string[];
estimatedImpact: string;
initialActions: string;
status?: string;
reportedAt?: Date;
updatedAt?: Date;
};
72-Hour Notification Timeline
The NDPR requires organizations to notify NITDA of data breaches within 72 hours of becoming aware of the breach. Here's a recommended timeline for handling breaches:
Hour 0-4: Initial Response
- Report the breach internally using the BreachReportForm
- Assemble the response team
- Begin containment measures
- Preserve evidence
Hour 4-24: Risk Assessment
- Complete the BreachRiskAssessment
- Determine notification requirements
- Continue containment and investigation
- Begin preparing notification drafts
Hour 24-48: Notification Preparation
- Use the RegulatoryReportGenerator to prepare NITDA notification
- Draft data subject notifications if required
- Review and approve notifications
- Continue investigation and remediation
Hour 48-72: Notification Submission
- Submit notification to NITDA
- Begin notifying affected data subjects if required
- Document all notification activities
- Continue remediation efforts
API Reference
BreachReport Interface
export interface BreachReport {
/**
* Unique identifier for the breach report
*/
id: string;
/**
* Title/summary of the breach
*/
title: string;
/**
* Detailed description of the breach
*/
description: string;
/**
* Category of the breach
*/
category: string;
/**
* Timestamp when the breach was discovered
*/
discoveredAt: number;
/**
* Timestamp when the breach occurred (if known)
*/
occurredAt?: number;
/**
* Timestamp when the breach was reported internally
*/
reportedAt: number;
/**
* Person who reported the breach
*/
reporter: {
name: string;
email: string;
department: string;
phone?: string;
};
/**
* Systems or data affected by the breach
*/
affectedSystems: string[];
/**
* Types of data involved in the breach
*/
dataTypes: string[];
/**
* Estimated number of data subjects affected
*/
estimatedAffectedSubjects?: number;
/**
* Whether the breach is ongoing or contained
*/
status: 'ongoing' | 'contained' | 'resolved';
}
RiskAssessment Interface
export interface RiskAssessment {
/**
* Unique identifier for the risk assessment
*/
id: string;
/**
* ID of the breach this assessment is for
*/
breachId: string;
/**
* Timestamp when the assessment was conducted
*/
assessedAt: number;
/**
* Person who conducted the assessment
*/
assessor: {
name: string;
role: string;
email: string;
};
/**
* Confidentiality impact (1-5)
*/
confidentialityImpact: number;
/**
* Integrity impact (1-5)
*/
integrityImpact: number;
/**
* Availability impact (1-5)
*/
availabilityImpact: number;
/**
* Likelihood of harm to data subjects (1-5)
*/
harmLikelihood: number;
/**
* Severity of potential harm to data subjects (1-5)
*/
harmSeverity: number;
/**
* Overall risk score
*/
overallRiskScore: number;
/**
* Risk level based on the overall score
*/
riskLevel: 'low' | 'medium' | 'high' | 'critical';
/**
* Whether the breach is likely to result in a risk to the rights and freedoms of data subjects
*/
risksToRightsAndFreedoms: boolean;
}
NotificationRequirement Interface
export interface NotificationRequirement {
/**
* Whether NITDA notification is required
*/
nitdaNotificationRequired: boolean;
/**
* Deadline for NITDA notification (72 hours from discovery)
*/
nitdaNotificationDeadline: number;
/**
* Whether data subject notification is required
*/
dataSubjectNotificationRequired: boolean;
/**
* Justification for the notification decision
*/
justification: string;
}
useBreach Hook
// Import the hook
import { useBreach } from '@tantainnovative/ndpr-toolkit';
// Use the hook in your component
const {
breaches, // Array of all breach reports
submitBreachReport, // Function to submit a new breach report
updateBreachReport, // Function to update an existing breach report
performRiskAssessment, // Function to perform a risk assessment
determineNotificationRequirements, // Function to determine notification requirements
generateRegulatoryReport, // Function to generate a report for NITDA
getBreachById, // Function to get a breach by ID
} = useBreach();
// Submit a new breach report
const newBreachReport = submitBreachReport({
title: 'Unauthorized Database Access',
description: 'An unauthorized IP address accessed our customer database.',
category: 'unauthorized-access',
discoveredAt: Date.now(),
occurredAt: Date.now() - 3600000, // 1 hour ago
reporter: {
name: 'John Doe',
email: 'john@example.com',
department: 'IT Security',
phone: '1234567890'
},
affectedSystems: ['customer-database'],
dataTypes: ['personal-information', 'contact-details'],
estimatedAffectedSubjects: 500,
status: 'contained'
});
// Perform a risk assessment
const riskAssessment = performRiskAssessment({
breachId: newBreachReport.id,
assessor: {
name: 'Jane Smith',
role: 'Data Protection Officer',
email: 'jane@example.com'
},
confidentialityImpact: 4,
integrityImpact: 3,
availabilityImpact: 2,
harmLikelihood: 3,
harmSeverity: 4
});
// Determine notification requirements
const requirements = determineNotificationRequirements({
breachId: newBreachReport.id,
riskAssessmentId: riskAssessment.id
});
// Generate a regulatory report for NITDA
if (requirements.nitdaNotificationRequired) {
const report = generateRegulatoryReport({
breachId: newBreachReport.id,
riskAssessmentId: riskAssessment.id
});
}
Best Practices
- Breach Response Plan: Develop a comprehensive breach response plan that includes roles, responsibilities, and procedures.
- Regular Training: Conduct regular training for staff on breach identification, reporting, and response procedures.
- Documentation: Maintain detailed documentation of all breach-related activities, including containment, investigation, and notification.
- Testing: Regularly test your breach response procedures through tabletop exercises or simulations.
- Post-Breach Review: Conduct a thorough review after each breach to identify lessons learned and improve your response procedures.
Need Help?
If you have questions about implementing the Breach Notification system or need assistance with NDPR compliance, check out these resources: