PII Protection
How Aforo automatically masks personal data in API responses — five mask strategies, role-based access, and a regulator-ready PII access audit trail.
Aforo enforces data-minimisation by default (GDPR Article 25). Personal data — email addresses, phone numbers, names, payment identifiers, tax IDs — is automatically masked in API responses and in the operator console based on the role of whoever is looking. There is nothing to configure: protection is on by default, and every time a privileged user views raw PII it is written to an audit trail.
How PII masking works#
Every response that contains personal data passes through Aforo's masking layer before it leaves the platform. The layer inspects the caller's role: privileged roles receive the raw value, everyone else receives a masked value. The same rule applies whether the data is read through the operator console, the customer storefront, or the API — so a developer or support agent never accidentally sees data they are not entitled to.
What gets masked#
Aforo treats the following as personal data and masks it for unprivileged callers:
- Contact details — email addresses and phone numbers.
- Names — customer and contact names.
- Payment identifiers — card and bank-account numbers (last four digits preserved).
- Government identifiers — tax IDs, passport numbers, and similar high-sensitivity fields (fully redacted).
Five mask strategies#
Each field is masked with the strategy best suited to it — enough is preserved for a human to recognise the record without exposing the underlying value:
Role-based access#
Whether a caller sees the raw value or the masked value depends on their role. Aforo's default policy is the most restrictive — only privileged roles see raw PII; everyone else sees masks:
PII access audit trail#
Every time a privileged role views raw PII, Aforo records it in your audit log under the pii.* action namespace. This is the regulator-facing access trail: who saw what personal data, when, and why.