Personal data protection has a legal side and a technical side, and the two need to move together. The LGPD (Brazil's General Data Protection Law) sets principles and obligations, but it is information security that puts those principles to work day to day: it controls who accesses what, protects data at rest and in transit, logs access and reduces exposure to the minimum necessary. The subject here is only the technical layer, as support, and this text does not offer legal advice.
The idea is to show which technical security controls support data protection and produce evidence for the team in charge. We do not promise absolute legal compliance, because it depends on legal and organizational decisions that go beyond any technical control.
This guide covers the technical security layer that supports personal data protection. It is informational content, not legal advice, and it does not replace guidance from your company's DPO or legal team.
Least privilege and segregation
The principle where security and data protection overlap the most is least privilege: each person and each system accesses only the personal data strictly necessary for their role. This reduces the exposure surface and limits the damage a compromised credential can cause. Combine least privilege with environment segregation and keep production data separate from staging and testing.
A common mistake is filling test environments with real production data. Personal data then exists in many more places, often with weaker controls. Outside production, prefer synthetic or anonymized data.
Least privilege as an ongoing decision
Least privilege needs to be reviewed from time to time. People change roles, projects end, new integrations are created, and the natural tendency is for access to keep piling up (someone who moves to another department, for example, usually takes their old permissions along). Periodically review who can see personal data and why, remove what is no longer used and grant access by role rather than person by person. For especially sensitive data, it pays to require a second approval or temporary access that expires on its own, instead of a permanent permission.
Encryption, logs and retention
Encrypt personal data at rest and in transit and control the keys so that only those who should can decrypt it. Log access to sensitive data, because traceability is both a security control and evidence. And define retention: personal data that no longer needs to exist brings only risk, with no benefit at all.
- Least-privilege access to personal data per person and per system
- Segregation of production, staging and testing
- Synthetic or anonymized data outside production
- Encryption at rest and in transit with key control
- Access logging for sensitive data
- A retention and disposal policy for what is no longer needed
The access log as evidence
A personal data access log is only worth something if it answers the questions that come up in an incident: who accessed it, which record, when and from where. Keep enough to rebuild the timeline and protect this log against tampering by people who have access to the data. Note that the personal data itself should not go into the log, because that only creates one more copy to protect. The log exists to provide traceability, not to become a duplicate of the database. The fields below give an idea of what to record.
# Log enough to investigate, without copying the data itselfwho: authenticated identity (user or system)what: record type and internal identifier (not the data)when: date and time with time zonesource: request origin (network, application)operation: read, update, export or deleteAnonymization, pseudonymization and minimization
Reducing the amount of data, and how much it identifies someone, is one of the controls with the highest return, for the simplest reason: what doesn't exist can't leak. Minimization starts at collection. Ask only for what the purpose requires, not everything that would be convenient to have on hand. Then, for each use, ask whether the data really needs to identify the person or whether a reduced version is enough.
Pseudonymization replaces direct identifiers with references and keeps the table that allows re-identification separately, under its own access control. Because it was designed to be reversible, the data is still personal data and requires protection, but day-to-day work with the records involves less exposure. Anonymization, when effective, breaks the link to the person to the point where re-identification is no longer reasonable, considering the means available. Do not confuse the two: calling data anonymous when it still allows re-identification with modest effort creates a false sense of security.
- Collect only the data the purpose requires
- Pseudonymize direct identifiers and protect the re-identification table
- Reserve anonymization for cases where re-identification is no longer reasonable
- Use reduced or masked data in reports and screens that do not need the full data
- Review whether sensitive fields really need to be displayed in full
Security measures and response to data incidents
At the level of principle, the LGPD addresses technical and administrative security measures able to protect personal data from unauthorized access and from accidental or unlawful destruction, loss, alteration or disclosure. The controls described here (least privilege, encryption, access logging, segregation and retention) are the technical way to meet that obligation. What to apply, and to what extent, should be proportional to the risk and the nature of the data, and the people who guide that sizing are the legal team and the DPO (called encarregado under the LGPD).
Data security also means being prepared for the day something goes wrong. An incident involving personal data has a technical side, of containment and fact-finding, and a communication and decision side, which belongs to the DPO and the legal team. The technical side needs to establish the facts quickly: what was accessed, which categories of data and of data subjects, for how long and through which path.
- Detect anomalous access to personal data by volume or unusual pattern
- Preserve logs and evidence before they are overwritten
- Determine which categories of data and of data subjects were affected
- Estimate the exposure window from the access logs
- Hand these facts to the DPO and the legal team for the notification decisions
Decisions about notifying the authority and the data subjects, and on what timeline and in what form, are legal and organizational and fall outside the technical scope. Security's role is to give those decisions a reliable evidence base, without taking the place of the people who decide.
Mapping and evidence
You can't protect what you don't know you have. Technical mapping of where personal data is stored, processed and transmitted is what lets you apply the controls in the right places. Together with the logs and the documentation of the controls, this mapping gives the team in charge and the DPO the technical evidence to make privacy decisions based on facts.
Pay attention to the copies that escape the inventory: spreadsheet exports, old backups, analytics databases, attachments in messaging tools. It is common for data to be well protected in the main system and exposed in a forgotten copy, such as the spreadsheet exported for a meeting and never deleted. Mapping only does its job if it follows these secondary paths as well as the official repository.
Technical security does not replace the legal team's work or the DPO's. What it does is complement that work with the concrete basis on which compliance decisions rest. Full compliance involves legal and organizational aspects that fall outside the technical scope.
Practical checklist
- Map where personal data is stored and where it travels
- Track secondary copies: exports, backups, analytics databases, attachments
- Apply least privilege per person and per system
- Periodically review who accesses personal data and remove unused access
- Segregate production, staging and testing
- Use synthetic or anonymized data outside production
- Collect only the data the purpose requires (minimization)
- Pseudonymize identifiers and protect the re-identification table
- Encrypt data at rest and in transit
- Control who can decrypt (key management)
- Log access to sensitive data without duplicating the data in the log
- Protect the access log against tampering
- Define retention and disposal of what is no longer needed
- Have a technical containment and fact-finding procedure for data incidents
- Document the controls as technical evidence
- Bring facts to the DPO and the legal team, without making promises
Best practices
- Treat least privilege as the principle that joins security and privacy
- Never use real production data in tests
- Prefer minimizing and pseudonymizing to having to protect one more copy
- Keep access to sensitive data traceable
- Shrink the data surface with retention and minimization
- Size the controls to the risk and the nature of the data
- Provide technical evidence for privacy decisions
- Make clear where technical support ends and legal opinion begins
Common mistakes
- Real production data in test environments
- Personal data spreads to places with weaker controls.
- Broad access to personal data
- Any compromised credential exposes a lot of data at once.
- Calling data anonymous when it still allows re-identification
- It creates a false sense of security, and personal data ends up being handled improperly.
- Copies outside the inventory: forgotten exports and backups
- Data protected in the main system leaks through an uncontrolled copy.
- No access logging for sensitive data
- In a data incident, it becomes impossible to trace who accessed what.
- No retention policy
- Data that should already have been disposed of is still there, as a risk.
- Confusing technical controls with legal compliance
- It gives a false sense of compliance, and the legal decisions are left uncovered.
Further study: recommended courses
These free courses from Valor Final are taught in Portuguese. They help you take the subject of this guide from theory to practice at your own pace.
Curso de LGPD Essencial
FreeFree LGPD course for people who work at a company. In plain language and based on official sources, it shows in practice what can and cannot be done with the data of customers, coworkers and suppliers. Course in Portuguese.
Valor Final View courseCursos do Valor Final
With certificateA portal of free online courses that issues a certificate when you complete a course. The privacy and data protection track starts with the LGPD course and adds new courses over time. Courses in Portuguese.
Valor Final View course
Authorship and review
Cesar Gargiulo
CEO and founder of GUARDIASEC. Technical and editorial lead for the content published in this library.
Published on . Found a technical error? Write to [email protected] and we will correct it and keep a record of the change.