Cyber Security
Mini-SIEM Log Correlation & Alert-Triage Lab for a College Lab Network (Python/MySQL)
Turn the logs your college lab already writes into one correlated alert queue you can defend line by line
- Python 3
- MySQL 8
- Flask
- +3
Keep the 180-day CERT-In log trail without keeping your students' personal data inside it
Mapped to your syllabusAnna University MCA Regulation 2021 · Project Work · Semester 4PrivLog: a Privacy-Preserving Log Anonymisation Pipeline sits between a college web server and its log archive, and solves a problem every Indian campus now has: the logs the law requires you to keep are the same logs that hold your students' personal data.
Since CERT-In's Directions of 28 April 2022, organisations must retain computer logs for a rolling 180 days (and report incidents within six hours). Since the Digital Personal Data Protection Act, 2023, students are data principals whose roll numbers, email addresses and device identifiers in those logs deserve minimisation and protection. Most college servers simply keep raw logs — IP addresses, /results/<roll-number> URLs, email addresses in query strings — on a badly protected folder.
This project builds the missing layer: a Python pipeline that tails the web server's access log, detects identifiers (IPv4 addresses, emails, phone numbers, the college's roll-number pattern, high-cardinality user agents), and transforms them — keyed HMAC-SHA256 pseudonyms with the key held outside the database, IP-address truncation, user-agent generalisation — before anything is stored long-term. A verification gate re-scans the output for leaked identifiers and enforces a k-anonymity threshold on analyst exports. A Flask dashboard shows before/after utility metrics, proving the anonymised logs still answer operational questions (top pages, hourly load, error rates) while carrying no direct identifiers.
Python and MySQL come straight from the Anna University R2021 MCA curriculum (MC4103, MC4202); Flask and Chart.js are clearly-labelled industry-standard extras. Two students can complete it in one semester, with clean per-member module boundaries.
Syllabus alignment
Indian colleges must keep web-server logs for 180 days under CERT-In's Directions of April 2022, yet the same logs embed students' personal data — device IP addresses, user agents precise enough to fingerprint a device, and roll numbers or email addresses embedded in URLs. Retained raw, the log archive becomes the single most sensitive file on campus: an unencrypted, months-long record of which student accessed which result or fee page, from where and when. The Digital Personal Data Protection Act, 2023 makes such casual retention of identifiable data hard to justify, while deleting logs early would break incident response and CERT-In's six-hour reporting expectation.
There is no tooling in a typical college for this: no inventory of what identifiers the logs contain, no separation between the audit purpose (incident investigation) and the analyst purpose (student projects, capacity planning), and no measurable guarantee that shared datasets are actually de-identified. What is needed is a pipeline that anonymises at ingestion time, retains the operational value of the log trail, proves the transformation with automated verification, and gives the college two defensible profiles — audit-grade and analyst-grade — for its two distinct purposes.
A college web server's access log is simultaneously a security record and a personal-data liability. CERT-In's Directions of 28 April 2022 require a rolling 180-day log retention, while the Digital Personal Data Protection Act, 2023 imposes purpose-limitation and storage-minimisation duties on anyone processing students' personal data. This project builds a pipeline that keeps the operational and forensic value of web-server logs while stripping the personal data out: it detects direct and quasi-identifiers, transforms them (keyed pseudonyms, truncation, generalisation), verifies the output with a leakage scan and a k-anonymity gate, and stores only anonymised events in MySQL, with a dashboard measuring surviving analytical utility.
A typical affiliated-college results portal serves thousands of requests a day. Every request line records the device's IP address, a fingerprintable user-agent string, and URLs embedding roll numbers (/results/2021cs1042.pdf) or occasional email addresses. Retained raw for 180 days, it is an unencrypted dossier of who checked which result, from where and when. The college cannot stop logging — incident response depends on it — so the data must be transformed before storage.
In scope
Out of scope (v1)
The project follows an incremental SDLC model with fortnightly increments, so a working pipeline exists from week 3 and each review adds capability. Both members develop against the same MySQL schema from week 2.
| Phase | Weeks | Activities | Deliverable |
|---|---|---|---|
| Requirement & data study | 1–2 | Sample the college server's log formats, inventory identifier types with the IT section, finalise the two profiles and the roll-number pattern | SRS + identifier inventory |
| Design | 2–3 | Schema design, ER and DFD diagrams, detector interface, transformation spec, dashboard wireframes | Design document |
| Increment 1 | 4–6 | Ingestion, parsing, staging table, synthetic log generator (Member 1); detector framework with first detectors (Member 2) | Raw-to-staging pipeline with findings recorded |
| Increment 2 | 7–9 | Transformation engine: HMAC pseudonyms, IP truncation, UA generalisation; verification gate with leakage scan | First anonymised batches passing the gate |
| Increment 3 | 10–11 | k-anonymity export check, utility metrics recomputation and baseline comparison, dashboard | End-to-end system with before/after charts |
| Testing & tuning | 12 | Property tests, utility regression, performance run on one million lines | Test report |
| Documentation & viva prep | 13–14 | Consolidated report, PPT, demo rehearsal | Final submission |
Testing approach: pytest unit tests per detector and transformer; a property-based test asserting that no detector ever matches on pipeline output, whatever the input; a utility regression comparing aggregate reports before and after anonymisation on the same synthetic day; and a performance run confirming one million log lines process in under ten minutes on the college's existing server.
PrivLog is a batch pipeline with a hard verification gate, deliberately placed so that raw events never reach long-term storage:
flowchart LR
L["access.log on college web server"] --> T[Tailer]
T --> P[Parser and stager]
P --> S[(Staging table - purged per run)]
S --> D[Detector framework]
D --> F[(Findings)]
D --> X[Transformation engine]
K[("Keystore file (HMAC key)")] --> X
X --> G{Verification gate}
G -->|identifier found| B[Block batch and raise error]
G -->|clean| A[(MySQL - anonymised events)]
A --> U[Utility metrics]
U --> DB2[(Dashboard - Flask)]
A --> E["Analyst export (k-anonymity checked)"]erDiagram
PIPELINE_RUN ||--o{ EVENT : produces
PIPELINE_RUN ||--o{ FINDING : records
PIPELINE_RUN ||--o{ METRIC : computes
CONFIG_PROFILE ||--o{ PIPELINE_RUN : "configures"
EVENT ||--o{ EXPORT_ROW : "feeds"
EVENT {
bigint id PK
datetime ts
string ip_prefix
string ip_pseudonym
string ua_family
string path_pseudonymised
int status
string method
}
FINDING {
bigint id PK
bigint run_id FK
string id_type
string field
int count
}
PIPELINE_RUN {
bigint id PK
datetime started_at
string profile
string status
int lines_in
}
CONFIG_PROFILE {
string name PK
string pseudonym_mode
bool k_check
int k_value
}
METRIC {
bigint id PK
bigint run_id FK
string metric_name
decimal raw_value
decimal anon_value
}
EXPORT_ROW {
bigint id PK
bigint event_id FK
string export_id
}The key design decision is purpose separation: audit-grade pseudonyms are reversible only by whoever holds the keystore (for incident response), while analyst-grade data is one-way, generalised and k-checked. One pipeline, two lawful purposes, nothing shared by accident.
Module 01
Tails the college web server's access.log, parses Common Log Format and combined-format lines into structured events, lands them in a short-lived staging table purged after each run, and tracks parse failures with sample lines for pattern fixes.
Module 02
A pluggable detector framework — IPv4, email, phone, the college's configurable roll-number pattern, user agents — that scans every field, records type, position and count per run in a findings table, and exposes an interface so the college can add patterns like fee-receipt numbers.
Module 03
Applies profile-driven transforms: keyed HMAC-SHA256 pseudonyms for roll numbers and IP addresses with the key loaded from a separate keystore file, last-octet IP truncation in analyst mode, user-agent generalisation to browser-and-OS family, and redaction for free-text identifiers.
Module 04
Re-runs every detector over the transformed batch and blocks it if any identifier survives; applies the k-anonymity check (k at least 5) to analyst-grade exports; raises a run error with the offending sample so the detector or transformer can be fixed before the next run.
Module 05
The MySQL schema for anonymised events, runs, findings and metrics; recomputes top-page, hourly-volume and error-rate reports on anonymised data and compares them with the raw baseline from staging, producing the utility-retention percentages for the report.
Module 06
A Flask and Chart.js dashboard showing run history, findings by identifier type, before/after utility charts, profile configuration and CSV export; includes the synthetic-log generator controls so the demo can run without touching real student data.
Slide 1
PrivLog — Privacy-Preserving Log Anonymisation Pipeline
Slide 2
Two Laws, One Log File
Slide 3
Problem Statement
Slide 4
Proposed System
Slide 5
Objectives
Slide 6
Technology Stack
Slide 7
System Architecture
Slide 8
Database Design
Slide 9
Member-wise Modules
Slide 10
Demo — Synthetic Day Through the Pipeline
Slide 11
Testing & Results
Slide 12
Conclusion & Future Scope
Bullets, speaker notes and the .pptx · ₹2,000
Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.
NIST SP 800-122 for PII identification and minimisation practice, RFC 6973 for the correlation and profiling risks of identifiers, the Sweeney 2002 paper for k-anonymity, RFC 2104 for HMAC, and CERT-In's 2022 Directions plus the DPDP Act 2023 for the Indian compliance framing. Each is cited in the literature chapter with what we took from it.
Pseudonymisation replaces identifiers with tokens but allows reversal by whoever holds the key; anonymisation aims to remove identifiability irreversibly. We use both, deliberately: audit-grade output is pseudonymised (reversible with the keystore for incident response), while analyst-grade output is one-way, generalised and k-checked, approaching true anonymisation for released datasets.
A dataset is k-anonymous when every combination of quasi-identifiers appears at least k times, so no individual is unique. We chose k = 5 as a defensible small-cohort threshold — with synthetic classes of dozens of students it keeps groups meaningful without making exports useless — and the value is a single config field, so the college can raise it.
+11 more questions, with answers
Unlocks with the project · ₹2,000
Unlock for ₹2,000What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.
Unlocks with the project · ₹2,000
Unlock for ₹2,000How to study it, adapt it and walk your examiner through it, step by step.
Unlocks with the project · ₹2,000
Unlock for ₹2,000OnlyProjects. (2026). Privacy-Preserving Log Anonymisation Pipeline for a College Web Server (Python/MySQL): MCA Cyber Security project bundle [Educational resource]. https://onlyprojects.online/projects/mca-cyber-privacy-log-anonymisation-pipeline
Keep browsing
Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.
Cyber Security
Turn the logs your college lab already writes into one correlated alert queue you can defend line by line
Cyber Security
Find committed API keys and tokens in repository history, then drive every one to verified rotation
Web Development
Booking, zone-weight rating, AWB tracking, delivery run sheets and cash-on-delivery reconciliation for a tier-2 courier franchise
AI & Machine Learning
Turn Agmarknet's daily wholesale prices into a seven-day forecast and a when-and-where-to-sell advisory
Blockchain
Every hall ticket and marksheet carries a SHA-256 fingerprint anchored in a signed hash registry that verifiers can check without internet
Blockchain
A tamper-evident, hash-linked event ledger that runs the MSMED 45-day clock, computes s.16 interest and tracks disputes to MSEFC referral