With the cost calculated, Hortalia's management asked the question any company should ask itself before signing with a cloud provider: are we complying with the law with our customers' and employees' data across all these services? You already know, from The Shared Responsibility Model, that security is split between provider and customer according to the model. In this lesson we will go down from that general split to the specific controls the customer applies in IaaS, PaaS and SaaS, and you will get to know the regulatory framework that affects a Spanish company in the cloud: the GDPR (with the processing agreement, international transfers and the impact assessment), the Esquema Nacional de Seguridad, the NIS2 directive and the DORA regulation. You will learn to verify a provider's certifications, to tell data residency from data sovereignty and to decide on encryption, logging, data subjects' rights and retention. You will finish with Hortalia's simplified record of processing activities, the per-provider checklist and the compliance decisions Laura presents to management.
Important warning: the content of this lesson is for guidance and teaching purposes; it does not constitute legal advice. The rules cited are interpreted, amended and transposed differently in each country, and how they apply depends on each organisation's particular circumstances. Before making decisions, always validate with your data protection officer (DPO), your legal advisers or your compliance officer, and consult the current text of each rule and the guidance of the competent authority (in Spain, the Agencia Española de Protección de Datos and the Centro Criptológico Nacional, among others).
- Security by model: the controls the customer applies
The table in 01-05 said who is responsible for each layer. This one says what the customer does in practice, control by control, in each model:
| Control | IaaS (ERP on a VM) | PaaS (store on App Service) | SaaS (Microsoft 365, CRM) |
|---|---|---|---|
| Identity and MFA | Azure accounts, Windows and SQL administrators, VPN | Azure accounts, the app's managed identity | SaaS users, SSO, Conditional Access |
| Least privilege | Azure roles, SQL Server permissions, service accounts | Azure roles, database permissions | SaaS administrator roles, per-team permissions |
| Networking | VNet, NSG, VPN, no public IP | VNet integration, private endpoints, access restrictions | Restrictions by location or device (if the SaaS product allows it) |
| Patching | OS, SQL Server and ERP: customer | Code dependencies and runtime version | None (provider) |
| Malware protection | Antivirus/EDR on the VM | Dependency and image scanning | Configuring the included protections (antispam, antiphishing) |
| Encryption | Disks, TDE in SQL, TLS on connections | TLS enforced, database encryption, secrets in Key Vault | SaaS options (normally on by default) |
| Backups | Full + log, immutable, tested restore | Backups of the managed database (configurable retention) | Retention and, if needed, third-party backup |
| Logs | Windows, SQL and Azure activity logs | Application logs and Azure activity logs | SaaS audit logs |
| Secure configuration | OS baselines, firewall | HTTPS enforced, security headers, disabling FTP | External sharing, authorised third-party apps |
| Data and privacy | Classification, access, retention | The same, plus application protection (injection, sessions) | Classification, retention, export |
What you can see at a glance: as you move up the stack the low-level technical controls disappear (patching, networking, antivirus), but identity, configuration and data controls always stay in-house. And they are precisely the ones the regulatory framework requires you to demonstrate.
- The GDPR in the cloud
The General Data Protection Regulation (GDPR, Regulation (EU) 2016/679), supplemented in Spain by Ley Orgánica 3/2018, on the protection of personal data and the safeguarding of digital rights (LOPDGDD), applies to any processing of personal data, whether it sits in a cabinet or in the cloud. What changes in the cloud is who else processes the data.
2.1 Data controller and data processor
- Data controller: whoever decides why and how the data is processed. Hortalia is the controller for its customers', employees' and suppliers' data.
- Data processor: whoever processes the data on behalf of the controller. Microsoft, HubSpot or the payment gateway act, for most services, as Hortalia's processors.
- Sub-processors: the third parties the processor uses in turn (other data centers, support, subcontractors). The processor must disclose them and allow you to object to changes.
Using the cloud does not transfer responsibility: Hortalia still answers to its customers and to the authority. What the GDPR requires is to choose processors that offer sufficient guarantees (art. 28) and to put it in writing.
2.2 The processing agreement (DPA, art. 28)
Article 28 requires a contract (or other legal act) with minimum content: subject matter, duration, nature and purpose of the processing, types of data, the processor's obligations (process only on instructions, confidentiality, security, sub-processors, assistance with rights, breach notification, return or deletion at the end, audits). In the cloud, this contract is usually called a DPA (Data Processing Agreement, or data protection addendum):
- With the large providers it is part of the product terms and is accepted when you sign up; it is worth downloading it, reading it and filing it with the date.
- With smaller SaaS products you sometimes have to request it or accept it explicitly on a separate page. Without a DPA, real personal data should not be uploaded.
2.3 International transfers
If data leaves the European Economic Area (or a provider from outside can access it, for example from its support team), there is an international transfer, which is only lawful with one of the safeguards in chapter V of the GDPR:
| Safeguard | What it is | Comment |
|---|---|---|
| Adequacy decision | The European Commission declares that a country offers an adequate level of protection | For the US there is the EU-US Data Privacy Framework (2023), which covers American companies that have signed up to it |
| Standard contractual clauses (SCCs) | Model contracts approved by the Commission (2021 version) | Widely used by providers as a complementary or alternative safeguard |
| Binding corporate rules | Internal rules approved for multinational groups | Of little relevance to an SME as a customer |
On the Data Privacy Framework, a word of caution: its predecessors (Safe Harbor and Privacy Shield) were annulled by the Court of Justice of the EU in 2015 and 2020. The current one survived a first challenge before the EU General Court in 2025, but it may be the subject of further challenges. That is why many organisations combine things: data hosted in the EU, a provider signed up to the framework and standard contractual clauses in the DPA. Check each provider's membership on the programme's official list.
2.4 Security, breaches and impact assessment
- Security appropriate to the risk (art. 32): encryption, confidentiality, resilience, the ability to restore and periodic verification. The tested backups and recovery drills from module 2 are regulatory compliance too.
- Breach notification (arts. 33 and 34): a security breach affecting personal data must be notified to the authority without undue delay and, where feasible, within 72 hours, unless it is unlikely to result in a risk; and communicated to those affected if the risk is high. The DPA must oblige the provider to inform Hortalia without delay.
- Impact assessment (DPIA, art. 35): mandatory when processing is likely to result in a high risk (for example, sensitive data on a large scale, systematic monitoring or new technologies with an impact). The AEPD publishes indicative lists of processing activities that require one. For Hortalia's current systems it is probably not mandatory, but a documented risk analysis is still advisable.
- Record of processing activities (art. 30): an inventory of processing activities with their purpose, data, recipients, transfers, time limits and measures. We will build one for Hortalia in section 9.
- Other rules: ENS, NIS2, DORA and PCI DSS
| Rule | Who it applies to | What it requires, in essence | Does it apply to Hortalia? |
|---|---|---|---|
| ENS (Esquema Nacional de Seguridad, Real Decreto 311/2022) | The Spanish public sector and private providers supplying it with technology services or solutions | Security measures according to the system's category (basic, medium, high) and, where applicable, a conformity certification | No, unless it provides technology services to public administration. It is useful, though, for its providers to be certified |
| NIS2 (Directive (EU) 2022/2555) | Medium and large entities in "essential" and "important" sectors; among the important ones is the production, processing and distribution of food | Cybersecurity risk management, supply chain security, notification of significant incidents within short deadlines, management accountability and training | Possibly, as a medium-sized wholesale food distributor. It depends on the Spanish transposing law: to be confirmed with legal advisers |
| DORA (Regulation (EU) 2022/2554) | Financial entities (banks, insurers, investment firms...) and ICT providers critical to them | Digital operational resilience, management of third-party ICT risk, testing and incident notification | No |
| PCI DSS (a private card industry standard) | Anyone who stores, processes or transmits card data | Technical and organisational requirements; the scope depends on how much you touch card data | Yes, in the online store, reduced to a minimum if payment is delegated |
Some clarifications:
- NIS2 is a directive: it binds through the national law that transposes it. The transposition deadline expired in October 2024 and the Spanish law has been going through parliament; check its current status and the exact scope criteria (size, sector and activity) with your legal advisers. If Hortalia falls within scope, the cloud is not a problem, but supply chain security (assessing Microsoft, HubSpot or the gateway) and incident response plans go from being good practice to being obligations.
- ENS: the large cloud providers hold high-category ENS certifications for many of their services; it is a good indicator of maturity even if Hortalia is not required to comply.
- PCI DSS: if the store redirects the customer to the gateway's payment page (or embeds one hosted by the gateway), card data never passes through Hortalia's servers. The merchant still has obligations (protecting the store so that nobody tampers with the redirect, an annual self-assessment questionnaire), but far fewer than if it processed cards. Which questionnaire applies is indicated by the gateway or the acquiring bank.
- Provider certifications and how to verify them
You cannot audit a Microsoft data center. What you can do is check that an independent auditor has. The most common certifications and reports:
| Certification / report | What it demonstrates |
|---|---|
| ISO/IEC 27001 | An information security management system |
| ISO/IEC 27017 | Security controls specific to cloud services |
| ISO/IEC 27018 | Protection of personal data in public clouds (as a processor) |
| ISO/IEC 27701 | An extension of 27001 for privacy management |
| SOC 2 (Type II) | An auditor's report on security, availability, confidentiality... controls over a period (Type II) and not just at a point in time (Type I) |
| ENS (medium/high category) | Conformity with the Spanish Esquema Nacional de Seguridad |
| C5 (BSI, Germany) | The German federal office's very detailed cloud security criteria catalogue |
| PCI DSS (service provider) | For payment gateways and services that handle cards |
How to verify them:
- The providers' trust portals: Microsoft Service Trust Portal, AWS Artifact, Google Cloud Compliance Reports Manager and the Trust Centers of the SaaS providers (HubSpot, for example) publish certificates and reports, sometimes after signing in and accepting a confidentiality agreement.
- Check the scope: an ISO 27001 certificate may cover only some services or regions. Verify that it includes the services you are going to use.
- Check the dates: certificates expire and SOC 2 reports cover specific periods.
- For the ENS, the Centro Criptológico Nacional publishes a list of certified entities and services.
- Keep the evidence alongside the DPA: it is the proof that Hortalia chose processors with sufficient guarantees.
- Data residency versus data sovereignty
We already flagged this in Popular SaaS Providers: data residency is not the same as sovereignty.
| Concept | Question it answers | How it is achieved | Example |
|---|---|---|---|
| Residency | Where is the data physically located? | Choosing a region and contractual location commitments | A VM in spaincentral, a HubSpot account in its EU data center |
| Sovereignty | Which laws can compel disclosure of or access to the data, and who controls the service? | A provider subject only to European jurisdiction, local operation, control of keys | A European provider or "sovereign" offerings operated by local partners |
A provider headquartered in the US can have the data in Madrid and still be subject to American laws that, in certain circumstances, require it to hand over information (the CLOUD Act is the most cited example). Providers respond with contractual commitments, EU data boundaries (such as Microsoft's EU Data Boundary), transparency about government requests and, in some countries, offerings operated by local partners.
What does Hortalia need? For fruit customers' and CRM data, EU residency, a DPA and transfer safeguards are enough according to its risk analysis. A strict sovereignty requirement would make sense for defence data, sensitive health data or data belonging to certain public authorities; if Hortalia ever needed it, the sovereignty criterion would start to weigh in the matrix from 05-01.
- Encryption: at rest, in transit and with your own keys
| Type | What it protects | In the cloud, by default | What the customer decides |
|---|---|---|---|
| At rest | Data on disks, databases, backups | The large providers encrypt storage with keys they manage | Enabling additional database encryption (TDE), using your own keys |
| In transit | Data travelling over the network | TLS on managed services | Requiring TLS 1.2 or higher, disabling old protocols, encrypting the VPN |
| In use | Data while it is being processed in memory | Not by default | Confidential computing (advanced cases, outside the scope of this course) |
Provider-managed keys versus customer-managed keys (CMK): with CMK, the keys live in a customer vault (Azure Key Vault, AWS KMS, Cloud KMS) and the customer controls their rotation and can revoke them. It brings control and helps with demanding audits, but if the key is lost or deleted, the data is lost, and it adds work. For an SME, provider keys are usually enough, unless there is a contractual or regulatory requirement.
On the ERP, which is IaaS, encrypting the database is Laura's responsibility. SQL Server 2022 Standard supports TDE (Transparent Data Encryption), which encrypts the data and log files and therefore the backups:
USE master;
-- 1. Instance master key (protected with a strong password)
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<long-password-stored-in-Key-Vault>';
-- 2. Certificate that will protect the database encryption key
CREATE CERTIFICATE cert_tde_erp WITH SUBJECT = 'Hortalia ERP TDE certificate';
-- 3. Backup of the certificate and its private key, OFF the server (essential)
BACKUP CERTIFICATE cert_tde_erp
TO FILE = 'F:\tde\cert_tde_erp.cer'
WITH PRIVATE KEY (FILE = 'F:\tde\cert_tde_erp.pvk',
ENCRYPTION BY PASSWORD = '<another-long-password>');
-- 4. Encryption key in the ERP database and switch it on
USE ERP_Hortalia;
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_256
ENCRYPTION BY SERVER CERTIFICATE cert_tde_erp;
ALTER DATABASE ERP_Hortalia SET ENCRYPTION ON;
-- 5. Check the status (3 = encrypted)
SELECT DB_NAME(database_id) AS database_name, encryption_state
FROM sys.dm_database_encryption_keys;Explanation:
- Step 1: the master key in
masteris the root of the instance's encryption hierarchy. - Step 2: the certificate protects the key used to encrypt the database.
- Step 3, the most important one: without the certificate and its private key, no backup of the database can be restored on another server, not even in
francecentralduring a disaster. Laura uploads the.cerand.pvkfiles to Key Vault (as secrets) and deletes them from disk; the passwords go to Key Vault too. - Step 4: creates the database encryption key (256-bit AES) and switches encryption on. SQL Server encrypts the data in the background; it is best done during a quiet period.
- Step 5:
encryption_state = 3means the database is encrypted. - Mandatory test: after enabling TDE, Laura repeats the test restore on the test VM (restoring the certificate first) to check that the recovery procedure from 02-04 still works.
ERP_Hortaliais a fictitious name.
- Logging and auditing
Complying is not just doing things right: it is being able to prove it. That takes logs that answer "who did what, when and from where?":
| Source | What it records | Default retention (indicative) | Decision at Hortalia |
|---|---|---|---|
| Azure activity log | Operations on resources (create, delete, change configuration) | Around 90 days | Send to a Log Analytics workspace and keep for 1 year |
| Entra ID sign-in logs | Who signs in, from where, with what MFA result | Days or weeks, depending on the license | Send to Log Analytics |
| Microsoft 365 auditing (Purview) | Mailbox access, shared files, administrative changes | Depends on the license | Enable it and review the retention included in Business Premium |
| CRM audit logs | Sign-ins, exports, permission changes | Depends on the plan | Review bulk exports quarterly |
| Windows and SQL Server logs (ERP) | Access, errors, database changes | Depends on the configuration | Send security events to Log Analytics |
Default retention periods change with licenses and over time: check them in each service's current documentation. And remember that logs also contain personal data (IP addresses, usernames): their retention must be proportionate and documented.
- Data subjects' rights and retention
8.1 Rights
Hortalia's customers, employees and contacts can exercise the rights of access, rectification, erasure, objection, restriction of processing and portability, and Hortalia must respond, as a general rule, within one month. With the data spread across several systems, the practical question is: do we know which systems a person is in? That is why the record of processing activities must state, for each system, how a data subject is located, exported and deleted:
- CRM: search by email; export the record; delete the contact (SaaS products usually have specific privacy functions).
- Online store: search in the PostgreSQL database; Marc prepares an export query and an anonymisation procedure for orders that have to be kept for tax reasons.
- ERP: customer data linked to invoices cannot be deleted while there is a legal obligation to keep it.
- Email: content search using the suite's compliance tools.
8.2 Retention
The principle of storage limitation requires you not to keep data for longer than necessary, but other laws require some of it to be kept for years. As a common reference in Spain, the Código de Comercio (the commercial code) requires commercial documentation to be kept for six years, and there are separate tax and employment periods. When the purpose ends but a legal obligation continues, the LOPDGDD provides for the blocking of the data: it is kept aside, unused, available only to courts and authorities, until liabilities lapse. The specific periods must be set by the legal advisers for each type of data.
- Hortalia: record of processing activities, checklist and decisions
Hortalia is not, in principle, required to appoint a DPO (to be confirmed with its legal advisers), but it works with an external data protection consultancy, with whom Laura reviews everything that follows.
9.1 Simplified record of processing activities by system
Laura keeps the record in a YAML file inside the infrastructure repository, so that it is versioned along with the rest of the technical documentation:
# Record of processing activities (simplified, illustrative)
controller: Hortalia S.L.
reviewed: 2026-10-15
processing_activities:
- system: ERP
purpose: Order management, invoicing and logistics for retail customers
data_subjects: [contacts at retail customers, suppliers]
data: [identification, contact, billing details]
legal_basis: performance of a contract; legal obligation (invoicing)
processors: [Microsoft (Azure)]
location: Azure spaincentral; backups in francecentral (EU)
transfers: none foreseen (DPA safeguards if support were to access)
retention: 6 years from the close of the financial year (commercial), then blocking
measures: [VPN, no public IP, MFA, TDE, immutable backups, logs 1 year]
- system: hortalia-shop online store
purpose: Online sales to consumers and home delivery
data_subjects: [consumer customers]
data: [identification, contact, delivery address, order history]
excluded_data: [card number] # handled by the gateway
legal_basis: performance of a contract; consent (marketing newsletter)
processors: [Microsoft (Azure), payment gateway, Azure Communication Services]
location: Azure spaincentral (EU)
retention: active account + 3 years without activity; orders per commercial period
measures: [HTTPS, private DB, secrets in Key Vault, payment by redirect]
- system: Email and collaboration (Microsoft 365)
purpose: Internal communication and communication with customers and suppliers
data_subjects: [employees, customers, suppliers]
data: [identification, contact, content of communications]
legal_basis: performance of a contract; legitimate interest
processors: [Microsoft]
location: EU (EU Data Boundary)
retention: pedidos@ mailbox 7 years; personal mailboxes per policy
measures: [MFA, Conditional Access, antiphishing, retention, third-party backup]
- system: CRM
purpose: Sales management for shops and service for consumers
data_subjects: [shop contacts, consumer customers]
data: [identification, contact, sales activity]
legal_basis: legitimate interest (shops); performance of a contract (consumers)
processors: [HubSpot (account in an EU data center)]
location: EU
transfers: possible support access from outside the EEA, covered by the DPA
retention: annual review; contacts with no activity for 3 years are deleted
measures: [MFA required, per-team roles, weekly immutable export]How to read it:
- Each item under
processing_activitiesis a system with the fields art. 30 asks for (purpose, categories of data subjects and data, recipients/processors, transfers, time limits, measures). excluded_dataon the store documents a design decision with legal consequences: Hortalia does not process card numbers. That is why the PCI DSS scope is minimal.reviewedrecords the last review; Laura updates it at the quarterly governance review from 04-04.- The legal bases and retention periods are illustrative: the consultancy must validate them. For example, the 7 years on the
pedidos@mailbox are set that way to cover with some margin the 6-year commercial period counted from the close of the financial year, and the consultancy has approved it.
9.2 Per-provider checklist
| Check | Azure | Microsoft 365 | HubSpot (EU account) | Payment gateway |
|---|---|---|---|---|
| DPA reviewed, downloaded and filed | Yes (product terms) | Yes (the same Microsoft DPA) | Accept its DPA explicitly | Yes, in the merchant contract |
| Sub-processor list reviewed and subscribed to changes | Yes | Yes | Yes | Yes |
| Data located in the EU | spaincentral and francecentral |
Check in the admin center (data location) | EU data center chosen when creating the account | Confirm with the provider |
| Transfer safeguards (adequacy and/or SCCs) | In the DPA | In the DPA | In the DPA | In the contract |
| Certifications verified (ISO 27001/27017/27018, SOC 2, ENS) | Service Trust Portal | Service Trust Portal | HubSpot Trust Center | PCI DSS certificate as a service provider |
| MFA required for everyone | Yes | Yes (Conditional Access) | Required of all users | Yes, in the merchant portal |
| Audit logs enabled and retention defined | Log Analytics 1 year | Purview auditing | Quarterly review | Merchant portal |
| Data export tested | Backups and IaC templates | Mailbox and file export | Weekly export through the API (04-05) | Transaction reports |
| Breach notification covered in the contract | Yes | Yes | Yes | Yes |
9.3 Compliance decisions
Laura presents these decisions to management, validated with the consultancy:
- Spain/EU region for everything. Azure only in
spaincentral(production) andfrancecentral(recovery). So that nobody creates resources in another region by mistake, she enforces it with the built-in Azure Policy definition "Allowed locations":
az policy assignment create \
--name solo-regiones-ue \
--display-name "Hortalia: only spaincentral and francecentral" \
--policy e56962a6-4747-49cd-b67b-bf8b01975c4c \
--scope "/subscriptions/<subscription-id>" \
--params '{"listOfAllowedLocations": {"value": ["spaincentral", "francecentral"]}}'--policyis the identifier of the built-in "Allowed locations" definition (check it withaz policy definition list --query "[?displayName=='Allowed locations']"before using it).--scopeapplies the policy to the whole subscription.--paramspasses the list of allowed regions. Any attempt to create a resource in another region is denied. Some global resources (with locationglobal) are out of scope; check the definition to see what it excludes.- Recommendation: try it first on the test subscription.
- DPAs signed and filed for Azure, Microsoft 365, HubSpot and the gateway, with their certifications downloaded, in a compliance folder with a review date.
- MFA for every account, no exceptions, with the Conditional Access policies from 04-04 and emergency accounts kept under lock and key.
- Encryption: provider-managed keys on storage and managed services; TDE on the ERP database with the certificate held in Key Vault; TLS 1.2 or higher on every service. Customer-managed keys are ruled out for now: they add operational risk with no requirement demanding them.
- Payments delegated to a gateway with a hosted payment page: Hortalia does not store, process or transmit card numbers.
- Retention: activity and sign-in logs 1 year;
pedidos@7 years; commercial documentation from the ERP 6 years from the close of the financial year with blocking thereafter; CRM contacts with no activity for 3 years, deleted at the annual review. - NIS2: the consultancy will analyse whether Hortalia falls within scope once the Spanish law is passed. In the meantime, Laura drafts an incident response procedure (who decides, who is notified and within what deadlines, including the GDPR's 72 hours), useful in any case.
- Impact assessment: not considered necessary for the current systems; it will be reassessed for the delivery app if it includes geolocation of delivery drivers.
Common Mistakes and Tips
- Thinking that "the provider complies, so I comply". Their certifications cover their part; the configuration, the identities and the data are still yours.
- Not reading or filing the DPA. Accepting it with one click is not enough: you must know what it says about sub-processors, breaches and the return of data, and be able to show it.
- Confusing residency with sovereignty. Data being in Madrid does not answer which laws the provider is subject to.
- Encrypting without keeping the key. A lost TDE certificate turns your backups into noise. Keep it off the server and test the restore.
- Keeping everything "just in case". Retaining data without needing to increases risk and contradicts the GDPR; define time limits and stick to them.
- Touching card data without needing to. Delegating payment to a gateway drastically reduces the PCI DSS scope.
- Assuming a rule does not apply to you. NIS2, for example, reaches sectors that were not considered "technological", such as food distribution. Ask your legal advisers.
- Tip: document every compliance decision with its date, its owner and who validated it. Faced with an inspection or an incident, the documentation is half the answer.
Exercises
Exercise 1. For each situation, say whether there is an international transfer and what you would check: a) the store uses a transactional email service with servers only in Ireland; b) the CRM keeps the data in its EU data center, but its technical support can access it from the US; c) Marc uploads a copy of the store database to a personal account on a cloud storage service with servers in the US to "run some tests at home".
Exercise 2. A consumer customer writes to Hortalia asking for all their data to be deleted. They have orders in the store from two years ago, they are in the CRM and they have sent emails to pedidos@. Describe what you would do in each system and which data you could not delete, and why.
Exercise 3. Laura wants to enable TDE on the ERP on a Friday afternoon and go home. List three risks of doing it that way and how to plan it properly.
Solutions
Solution 1. a) No, there is no international transfer if the data stays in Ireland (EEA) and the provider does not access it from outside; I would check the DPA, the sub-processors and the declared location. b) Yes, remote access from the US is a transfer; I would check that the DPA includes standard contractual clauses and/or that the provider has signed up to the Data Privacy Framework, and that support access is limited and logged. c) Yes, and it is also a serious breach of the rules: it is a transfer without safeguards, to a service with no DPA with Hortalia, using real customer data for a purpose (testing at home) that was never foreseen. The copy would have to be deleted, assessed with the consultancy as a possible data breach, and Marc given anonymised or fictitious test data. Common mistake: thinking that "inside the company" there is no problem; what counts is the destination and the absence of a contract.
Solution 2. First, verify the requester's identity and log the request (general deadline: one month). CRM: delete the contact and their activities using the SaaS privacy function. Online store: delete the account and the profile data; the orders linked to invoices are not deleted while the legal obligation to keep them lasts, they are blocked instead (or the data that is not needed is anonymised). Email: locate the messages with content search; those that form part of the commercial documentation for orders are subject to the retention on pedidos@ and are kept blocked; the rest are deleted. Reply to the customer explaining what has been deleted and what is being kept, on what legal basis and for how long. Tip: the record of processing activities in section 9.1 is the map that stops you forgetting a system.
Solution 3. Risks: 1) not keeping the certificate off the server and losing the ability to restore backups; 2) performance impact during the initial encryption, which could affect overnight processes or Monday morning; 3) not testing the restore, so that on Monday the recovery plan might not work and nobody would know. Planning: take a full backup first; rehearse on the test VM; enable it in a window agreed with operations and with Laura present until encryption_state is 3; keep the certificate and passwords in Key Vault; and repeat the test restore (including restoring the certificate) before signing the change off. Common mistake: thinking that because TDE is "transparent", it needs no planning.
Conclusion
In this lesson you have seen that, as you move up the stack, the low-level technical controls pass to the provider, but identity, configuration and data always stay in-house, and they are the ones the rules ask you to demonstrate. You have gone through the GDPR in the cloud (controller and processor, the art. 28 processing agreement, sub-processors, international transfers with the Data Privacy Framework and the standard contractual clauses, breaches within 72 hours, impact assessment and the record of processing activities), the other relevant rules (ENS, NIS2 with its possible reach over food distribution, DORA for the financial sector and PCI DSS for payments), the certifications worth verifying on the trust portals, the difference between residency and sovereignty, encryption with TDE and key custody, the audit logs and the handling of rights and retention. Hortalia now has its record of processing activities by system, a per-provider checklist and eight decisions: everything in Spain/the EU enforced by policy, DPAs filed, MFA with no exceptions, TDE on the ERP, payments delegated to a gateway, defined retention periods and an incident procedure while it confirms the scope of NIS2.
One last big technical question remains: how to take all this into production without interrupting the business, and what happens if one day you have to change provider. In the next lesson, Cloud Migration: Strategies and Vendor Lock-in, we will study the phases and strategies of migration, plan Hortalia's waves around the Christmas peak season, analyse vendor lock-in and settle the outstanding decisions on the ERP, email and the CRM.
