Ticket pseudonymization
Case study 1. Planned duration of 25 minutes, in two parts.
This is the entry point of the pipeline. The goal is to turn real incident tickets into material that can feed AI models and be shared between teams without exposing people or the infrastructure of the reporting organization. The central question is not only how much is protected, but at what analytical cost.
Part 1: AnonShield in operation
10 minA demonstration over a batch of synthetic tickets, from the public repository or from the Docker image in its CPU and GPU variants. The goal is to see the production tool solving the problem at scale.
- Setting the operator's HMAC key, which is never versioned or shared.
- Running with the available detection strategies, which trade coverage for processing cost. The short course base uses the standalone strategy, which fully replaces every recognized person name, because leaving the surname in the clear next to the pseudonym is the worst possible mistake in this task.
- Inspection of the generated SQLite mapping database.
- A controlled re-identification operation, with the corresponding entry in the audit trail.
Part 2: the notebook notebooks/01-anonimizacao.ipynb
15 min
About a hundred lines of Python, with no dependency on the production tool and no need for a GPU. Five steps, each one with a question to answer.
- Reading and inspection. Load the synthetic tickets and visually mark which entities a human analyst would consider sensitive. This step produces the informal ground truth against which the code will be evaluated.
- Detection in isolation. Run only the detection stage, with no replacement, and list the entities found with their type and position.
- NER ablation. Disable named entity recognition, keeping only the regular expressions, and compare again. This is the pedagogically most important step, because it shows in real time which entities only the NER captures, typically names of people and of organizations.
- Determinism and correlation. Verify that the same entity receives the same pseudonym across different tickets, and that changing the HMAC key changes every pseudonym, breaking the correlation with earlier material.
- Re-identification and auditing. Inspect the SQLite mapping database, run a reversal and observe the corresponding entry in the audit trail.
Questions that drive the analysis
- What does the detector see that I did not see, and what did I see that it did not?
- Which entities drop out of protection when the NER is turned off?
- Why is preserving the entity type inside the pseudonym a design decision, and not a cosmetic detail?
What the tool found in the real base
Running AnonShield over the 182 tickets, the census comes to 5,256 replacements, roughly 29 per ticket, a volume that on its own rules out manual treatment. They correspond to only 531 distinct entities, that is, each one reappears ten times on average, and it is that repetition that deterministic pseudonymization turns into correlation.
Inspecting the mapping is more instructive than the total. Entities with a fixed format come out intact: all 130 IP addresses are valid and the 116 email addresses are well formed. Those without a fixed format concentrate the false positives: of the 99 distinct organizations, a little over half are real names, and the rest are protocol acronyms read as institutions, such as DNS, NTP and BGP. None of these errors leaves sensitive data exposed, but all of them reduce readability. That is the price of the safe side of the trade-off.
saida/tickets_pseudonimizados.csv, which feeds Practice
2 directly, plus a mapping database that concretely illustrates the
controlled re-identification mechanism.