ISO 27001 Control A.8.11: Data Masking

· 7 min read · Lyudmil Arkov

Plenty of people need to work with data without needing to see all of it. A support agent has to confirm a customer’s identity, not read their full card number. A developer needs realistic records to test with, not real patients. An analyst wants trends, not names. Data masking is the family of techniques that lets people do their jobs while the sensitive parts stay hidden. A.8.11 is the eleventh of 34 technological controls in our walk through Annex A, and it is new in the 2022 edition.

The control is easy to overlook because it is not about locking anything away. It is about showing less, on purpose. Done sensibly, masking reduces the number of people and systems that can leak the most sensitive details, without slowing anyone down.

What the control requires

Annex A control 8.11 of ISO 27001:2022 states that data masking shall be used in accordance with the organization’s topic-specific policy on access control and other related topic-specific policies, and business requirements, taking applicable legislation into consideration.

The key elements:

  • Data masking shall be used - techniques that hide or replace sensitive data so that it is not exposed in full
  • In accordance with your policies - masking follows your access control policy and other topic-specific policies, so it is a considered choice, not an afterthought
  • Business requirements - masking must still leave the data useful for its purpose, whether that is support, testing or analytics
  • Applicable legislation - privacy and sector rules may require or encourage masking, and the details depend on your jurisdiction, so check with your legal adviser

In ISO/IEC 27002:2022 this control is attributed as preventive. Annex A states the control; ISO 27002 gives guidance on techniques such as masking, pseudonymization, anonymization, encryption, nulling out and substitution, along with advice on how to preserve data quality and prevent re-identification. It does not require any one technique, and it does not claim that masking removes every risk.

How to implement data masking

Work out where masking would help

Start with the data that would hurt most if exposed: payment details, national identifiers, health information, credentials, personal contact details, confidential commercial data. Then ask who sees it and why. You are looking for places where the answer is “more people than need to”. Common examples include:

  • Customer support screens that show full records to every agent
  • Reports and dashboards that include personal fields nobody uses
  • Development, test and training environments that copy production data
  • Logs and error messages that capture sensitive values
  • Data shared with partners or analysts for research or reporting

Use Classification of information and Inventory of information and other associated assets to find the sensitive datasets, and review them against the rules in Information access restriction. If a role does not need to see a field, the cleanest answer is often to remove it from the view entirely. Masking is for the cases where the field must be present in some form.

Choose the right technique

Different techniques solve different problems, and mixing them up is a common source of false confidence. In plain terms:

  • Masking or redaction replaces part of a value, for example showing only the last four digits of an identifier. Good for screens and reports
  • Substitution swaps real values for realistic fake ones, such as replacing names and addresses in a test database. Good for development and training
  • Pseudonymization replaces identifiers with codes, with the mapping kept separately and protected. The data can be re-linked by someone with the key, so it is still personal data in many legal systems
  • Anonymization aims to remove the possibility of identifying individuals at all. This is hard to do properly, because combinations of apparently harmless fields can identify people
  • Encryption and tokenization protect data at rest or in use and can be paired with masking when systems must handle the real value. Encryption itself is covered under Use of cryptography (A.8.24) later in the series

Be honest about which one you are using. Calling pseudonymized data “anonymous” is a classic mistake with real consequences. We are not lawyers, so check how your regulators treat each technique before relying on it.

Protect test and development data

Using live data in test environments is one of the most common and avoidable exposures. Prefer synthetic data generated for the purpose. When you must derive test data from production, mask it before it leaves the production environment, check the result, and apply the same controls as for production if any real data remains. Our later post on Test information (A.8.33) goes deeper, and Separation of development, test and production environments (A.8.31) helps keep the boundaries clean.

Verify that masked data still works. A test database where every name is “Test User” may fail to catch bugs in text handling, and masked dates that no longer line up can break reports. Good masking preserves format and relationships while hiding the real values.

Build it into systems and policy

Where possible, apply masking in the system rather than relying on people to behave. Many databases, support tools and analytics platforms have built-in field masking or role-based views. Role-based access means a given role sees masked values by default and can request an unmasked view with a reason, which is logged. Record your decisions in the policy documents your ISMS already has, in line with clause 5.2, Policy, and make sure the masking rules appear in the access control approach described in Access control.

Test it and keep evidence

Check that masking works, from the user’s side. Log in as a support agent and look at the screen. Export a report and open the file. Search the logs for card numbers. Ask whether someone could rebuild the original values from what remains, especially for anonymized datasets shared outside the organization. Keep screenshots, configurations and test notes as evidence.

A.5.12 connection. Classification of information identifies what is sensitive enough to mask.

A.5.15 connection. Access control defines the rules that masking should follow.

A.5.34 connection. Privacy and protection of personal identifiable information (PII) explains why personal data deserves careful handling and where masking supports privacy goals.

A.8.3 connection. Information access restriction limits who can see what, and masking is a finer-grained way to do that.

Forward reference. Use of cryptography (A.8.24), Separation of development, test and production environments (A.8.31) and Test information (A.8.33) complement this control and are covered later in the series. Data leakage prevention (A.8.12) follows this post.

What auditors check

Identified sensitive data. Auditors ask which data you consider needs masking and how you decided.

Policy alignment. They check that masking decisions connect to your access control and related policies.

Real examples. Expect to be asked to show masked screens, reports or test datasets, and sometimes to demonstrate an unmasked request being approved.

Test data practice. Auditors look at whether production data is used in non-production environments, and what protections apply if so.

Technique clarity. They want to see that you understand the difference between masking, pseudonymization and anonymization.

Legal awareness. They may ask how masking choices reflect applicable privacy obligations.

Common mistakes to avoid

Masking the screen but not the export. Data hidden in the interface can still appear in downloads, APIs and logs.

Calling pseudonymized data anonymous. If the data can be linked back with extra information, treat it as personal.

Copying production to test and hoping. Real data in weak environments is a frequent source of leaks. Use synthetic or masked data.

Masking that breaks usefulness. If the masked data cannot support the business purpose, people will find workarounds. Test with real users.

One-time masking with no upkeep. New fields and new systems appear all the time. Revisit the list when you change anything significant.

No record of unmasking. If people can lift the mask, log who did and why.

How 27kay can help

We help organizations decide where masking actually reduces risk, pick techniques that fit the use case, and avoid the traps around anonymization claims. As part of ISO 27001 implementation, we align masking with your access control approach and prepare the evidence an auditor will ask for. For the full picture, see our ISO 27001 knowledge hub.

Who in your organization can see a full customer record today, and do they all really need to? Get in touch - we will help you find out and tighten it without slowing anyone down.