Rakuten Securities reported that on November 11, an unauthorized party reached its test environment and may have taken customer data. Around 4.47 million accounts had names, contact details, employer, withdrawal-account details, annual income, and asset information exposed. Another 11.25 million accounts lost branch/customer codes and login IDs. The company said passwords and PINs weren't taken, and that over 90% of its customers already log in with passkeys.
That's strong authentication hygiene, but it doesn't address this exposure. Passkeys protect the login. They don't protect a spreadsheet of incomes and withdrawal accounts sitting in a test system. This playbook walks you through closing that gap.
The Problem
Privacy programs usually map controls to production. Test, staging, and development environments get treated as engineering territory. Production data gets copied in "just for realism," access is looser, logging is thinner, and nobody tracks the copies.
Security expert John Strand put the standard plainly: separate development, testing, and staging environments, each with clearly defined security controls. Under GDPR Article 5(1)(c) (data minimization) and Article 32 (security of processing), production personal data in a test environment needs a justification you can defend. Most teams can't produce one.
What You Need Before Starting
- A data inventory that includes nonproduction systems. If Data Discovery has only run against production, your inventory is incomplete.
- Named owners: the Chief Privacy Officer (CPO) for policy, engineering for implementation, security for monitoring, procurement for vendor terms.
- Access to CI/CD pipelines, database snapshot tooling, and cloud account structure. You'll audit all three.
- A masking or synthetic-data tool approved by engineering. Options include native database masking features, open-source generators, or commercial test-data platforms. Choose based on your stack, not a vendor pitch.
- A list of vendors and contractors with access to any nonproduction environment.
Step-by-Step Implementation
1. Write the standard. One page. Default rule: nonproduction environments use synthetic or masked data only. Production data is allowed by documented exception. State who approves exceptions (we suggest the CPO and the system's security owner, jointly), the maximum duration, and the required controls.
2. Find where production data already lives. Run Data Discovery against every nonproduction database, object store, and file share. Look for patterns: national IDs, account numbers, email addresses, dates of birth. Also check backups and snapshots restored into test accounts. Log each finding in a register with owner and purpose.
3. Block the pipeline at the source. A common leak path is a refresh job. Audit every script, ETL job, and snapshot-restore process that targets a nonproduction destination. Require masking as a mandatory stage before load, not an optional one. In cloud environments, use separate accounts or subscriptions for production and nonproduction, and deny cross-environment snapshot sharing through service control policies or equivalent guardrails.
4. Apply masking correctly. Use deterministic masking where you need referential integrity across tables. Use Column-Level Security to restrict any sensitive columns that must remain. Pay attention to fields people forget: free-text notes, employer names, and income bands can re-identify a person even after names are scrubbed. Masked data that can be reversed or joined back to a person is still personal data.
5. Tighten access. Apply least privilege through Role-Based Access Control or Policy-Based Access Control. Require MFA, ideally phishing-resistant, for every nonproduction console and database. Remove standing admin rights. Where emergency access is needed, use Break-Glass Access with logging and review. Run Deprovisioning checks for departed staff and expired vendor engagements.
6. Flow requirements down to vendors. Update contracts and Technical and Organisational Measures schedules so processors must follow the same nonproduction rules. Require them to attest that they hold no unmasked production data outside approved exceptions, and to notify you before creating copies.
7. Set retention and monitoring. Assign a Retention Period and Time-to-Live (TTL) to any approved exception dataset. Schedule Secure Deletion when it expires. Enable logging on nonproduction databases and storage, and alert on bulk reads, unusual egress, and new external access paths. Test environments are often internet-reachable by design; confirm network exposure is deliberate.
8. Prepare the incident messaging. Write templates that separate two risks. Credential compromise: were passwords, PINs, or authentication secrets taken? Exposure of personal data: what categories, which populations, what follow-on harm? Rakuten's disclosure shows why these risks need separate treatment. Reduced takeover risk doesn't mean reduced harm when income and withdrawal-account details are exposed. Your templates should distinguish both risks and state what the exposed data could enable. Pre-draft the information needed for a notification under GDPR Article 33 so scoping questions are answered before you need them.
Validation
Don't accept a policy as proof. Test it.
- Seed canary records into production (fake customers with unique email addresses and IDs). Run your normal refresh process, then search nonproduction for the canaries. If they appear unmasked, the control failed.
- Rerun Data Discovery quarterly against nonproduction and compare to your exception register. Anything found but not registered is a finding.
- Attempt cross-environment access from a test account to production snapshots. It should fail.
- Sample vendor environments. Request evidence or run a contractual audit on a rotating basis.
- Review alerting. Trigger a bulk read in a test database and confirm someone is notified.
Maintenance and Evidence
Keep an evidence file you could hand to a Supervisory Authority: the signed standard, the exception register with approvals and expiry dates, Data Discovery scan results, access reviews, vendor attestations, and canary test outcomes. This supports your accountability obligation under GDPR Article 5(2) and your Technical and Organisational Measures documentation.
Ongoing tasks:
- Review the exception register monthly; purge expired datasets.
- Re-run canary tests after any pipeline or tooling change.
- Include nonproduction environments in every privacy impact assessment under ISO/IEC 29134 and in High-Risk Processing reviews.
- Report nonproduction findings to the same governance forum that reviews production incidents.
Accountability here is cross-functional. Privacy sets the rule and verifies it. Engineering builds it. Security watches it. Start by naming the policy owner and requiring an inventory of every nonproduction copy. If only one of those groups owns the test environment, you're one refresh job away from a disclosure letter.





