Webinar replay: The migration takes 2 weeks. Deciding to do it takes 6 months.

What Spain's ENS Actually Requires From Cloud Platforms Selling to the Public Sector

Spain's Esquema Nacional de Seguridad (Royal Decree 311/2022) requires certified security categorisation, 73 security measures, and third-party conformity certification for any cloud platform touching Spanish public sector data. Here is what that means in practice for your architecture and your procurement paperwork.

Morgan Perry
Co-founder
OCT 28, 2026 · 10 MIN
What Spain's ENS Actually Requires From Cloud Platforms Selling to the Public Sector

Key points:

  • Spain's ENS (Esquema Nacional de Seguridad) is mandatory. Real Decreto 311/2022 applies to the whole Spanish public sector and, under Article 2.3, to private companies that provide services or solutions to public bodies. Tender documents must require proof: a declaration or certification of conformity.
  • Every system gets a category: BÁSICA, MEDIA or ALTA. The category comes from the impact rating across five dimensions (confidentiality, integrity, availability, authenticity, traceability), and the highest single rating wins. Under Article 38, MEDIA and ALTA systems need a certification audit; BÁSICA systems can self-assess.
  • Annex II lists 73 security measures: 4 organisational (org), 33 operational (op) and 36 protection measures (mp). For a deployment platform, the ones that bite are access control and segregation of duties, activity logging, change management, external service management, backups, and the dedicated cloud measure op.nub.1.
  • ENS has no blanket "data must stay in Spain" rule. It does make you control and assess where processing happens: op.nub.1 explicitly lists data jurisdiction, encryption and key management. Many tenders then add EU or Spanish residency clauses on top.
  • The public body stays responsible for its own system's conformity, even on a third-party cloud. Running your platform inside your own AWS, GCP, Azure, Scaleway or existing Kubernetes cluster keeps the logs, keys and region choice in your name. That is the model Qovery uses.

Qovery · Agentic Infrastructure Platform
A control plane for platform teams and their coding agents
Learn more

Many SaaS vendors first meet ENS deep inside a Spanish tender's pliego de prescripciones técnicas (technical specifications), a few weeks before the bid deadline. The decree designs it that way. Article 2.3 of RD 311/2022 instructs public bodies to write ENS requirements into their contract documents, including "la presentación de las correspondientes Declaraciones o Certificaciones de Conformidad con el ENS", and to extend that to the contractor's supply chain where the risk analysis calls for it.

If you sell a cloud platform, or software running on one, to a Spanish ministry, regional government, city council or public hospital, ENS is your entry ticket. Below is what the decree actually says and what it changes in your architecture, with every legal claim linked to the BOE text or the CCN's ENS portal.

What is Spain's ENS (Esquema Nacional de Seguridad) and who does it legally bind?

The Esquema Nacional de Seguridad (National Security Framework) is Spain's mandatory security framework for public sector information systems. It is set out in Real Decreto 311/2022, de 3 de mayo (BOE núm. 106, 4 May 2022, in force since 5 May 2022, reference BOE-A-2022-7191), which replaced the original Real Decreto 3/2010. Its legal basis is Article 156.2 of Ley 40/2015.

Article 2 sets the scope:

  • Article 2.1: the entire public sector as defined in Article 2 of Ley 40/2015. That covers central, regional and local administrations plus their public bodies.
  • Article 2.3: the information systems of private sector entities that, under a contract, "presten servicios o provean soluciones a las entidades del sector público". These suppliers must also adopt a security policy (Article 12), approved by their top executive body.

The Centro Criptológico Nacional (CCN), part of Spain's CNI intelligence service, runs the scheme day to day. It publishes the CCN-STIC guides that turn the decree into implementation and audit practice. The 800 series is the one dedicated to ENS. Do not confuse ENS with its sibling, the ENI (Esquema Nacional de Interoperabilidad), which covers interoperability rather than security.

ENS overlaps with GDPR (personal data), ISO/IEC 27001 (a voluntary management-system standard) and NIS2 (the EU directive on essential and important entities), but replaces none of them. Many controls rhyme. The legal obligation and the evidence format belong to ENS alone.

How does ENS categorise a system as BASIC, MEDIUM or HIGH?

ENS starts with categorisation: before you pick a single control, you rate the impact a security incident would have on five dimensions. These are confidencialidad (confidentiality), integridad (integrity), disponibilidad (availability), autenticidad (authenticity) and trazabilidad (traceability). Each dimension gets a level of BAJO, MEDIO or ALTO (low, medium, high), following the procedure in Annex I.

The rule in Annex I is simple: a system is categoría ALTA if any dimension reaches ALTO, MEDIA if any reaches MEDIO and none is higher, and BÁSICA otherwise. A small informational portal with public content usually lands in BÁSICA. A system holding citizen identity, health or tax data can easily hit MEDIA or ALTA on confidentiality or integrity alone.

Under Article 41, the people responsible for the information and the service rate each dimension, and the security officer sets the category. If you are the vendor, that means you inherit the buyer's category. Ask for it before you scope anything, because it decides which measures apply and what paperwork you will need.

ENS categoryConformity evidence (Art. 38)Review cadence (Art. 31)What it means for a cloud platform hosting the system
BÁSICADeclaración de conformidad based on a self-assessment (a certification audit is optional)Reassessed at least every two years, plus after substantial changesBaseline measures: logging, backups, patching, basic access control. op.nub.1 applies at baseline level
MEDIACertificación de conformidad after an audit by an accredited certification bodyFormal audit at least every two years, plus extraordinary audits after substantial changesAdds change management (op.exp.5), segregation of duties (op.acc.3), external-service SLAs (op.ext.1, op.ext.2), and third-party cloud services certified under op.nub.1 R1
ALTACertificación de conformidad after an audit by an accredited certification bodySame two-year cycle, with the strictest reinforcementsAdds supply-chain protection (op.ext.3), continuity plans and tests (op.cont.2, op.cont.3), CCN-STIC specific security configurations for cloud (op.nub.1 R2)

Under Article 38.2, entities must also publish their declarations and certifications on their websites or sedes electrónicas. The CCN issues the matching conformity seals (distintivos) and keeps a public register of certificates.

Which ENS security measures does a cloud platform actually have to implement?

The concrete obligations sit in Annex II of RD 311/2022, which lists 73 measures. I counted them in the BOE text: 4 in the organisational framework (org), 33 in the operational framework (op) and 36 in protection measures (mp). Each measure states which dimension or category triggers it, and whether it simply applies ("aplica") or comes with numbered reinforcements (R1, R2, ...) at higher levels.

  • Organisational framework (org.1 to org.4): security policy, security regulations, security procedures, authorisation process.
  • Operational framework (op): planning (op.pl), access control (op.acc), operations (op.exp), external resources (op.ext), cloud services (op.nub.1), service continuity (op.cont) and system monitoring (op.mon).
  • Protection measures (mp): facilities (mp.if), personnel (mp.per), equipment (mp.eq), communications (mp.com), information media (mp.si), applications (mp.sw), information (mp.info) and services (mp.s).

Article 28 adds two rules auditors care about. Your chosen measures go into a signed Declaración de Aplicabilidad (statement of applicability). And you may replace an Annex II measure with a compensating measure if you document that it protects at least as well.

Here is what the families mean when the system in question is the platform that builds, deploys and runs your applications:

Annex II measureWhat it requires (summary)What a deployment platform must demonstrate
op.acc.1 to op.acc.6Identification, access requirements, segregation of duties, access rights management, authenticationNamed identities (no shared deploy keys), per-environment RBAC, SSO/MFA, production access separated from development
op.exp.5Change management: every change request logged with a reference number and planned to limit impactA traceable link from commit to deployed version, with who approved and who triggered it
op.exp.8Activity logging: user, timestamp, object, event type and result for each eventExportable audit logs of deployments, config and secret changes, owned by the operator
op.exp.4, op.exp.10Security maintenance and updates; cryptographic key protectionA patch cadence for clusters and base images; keys in a KMS the operator controls
op.ext.1 to op.ext.3Contracts and SLAs with external providers; day-to-day management; supply-chain risk (ALTA)A clear list of sub-processors and the evidence each one provides
op.nub.1Cloud services protection, by SaaS/PaaS/IaaS model; certified third-party cloud services from MEDIAENS certification of the underlying cloud for the target category, and control over jurisdiction, encryption and keys
mp.info.6, op.cont.*Backups with defined frequency and retention; continuity plan and tests (ALTA availability)Backups that can be shown per environment, and restore tests that actually happened

One numbering detail trips people up: guides written for RD 3/2010 refer to backups as mp.info.9. In RD 311/2022 the measure is mp.info.6, and op.nub.1 is new. If a consultant's spreadsheet still uses the old codes, ask for an update before your audit.

How do you prove ENS conformity - certification, declaration, or an auditor?

You prove ENS conformity with a formal document. For BÁSICA systems that is a declaración de conformidad (declaration of conformity) backed by a self-assessment. For MEDIA and ALTA systems it is a certificación de conformidad (certification of conformity), issued after an audit by an accredited certification body. That rule is in Article 38.1, nearly word for word.

Article 31 sets the clock: an ordinary audit at least every two years, and an extraordinary audit whenever substantial modifications could affect the required measures. The extraordinary audit restarts the two-year count, and force majeure can extend the deadline by three months. Annex III specifies what the auditor checks: roles and responsibilities, an annually reviewed risk analysis, the Annex II measures, and a documented security management system built on the Declaración de Aplicabilidad.

Who can certify? The CCN publishes the list of certification bodies: firms accredited by ENAC (Spain's national accreditation body) under ISO/IEC 17065, firms still going through accreditation, and some public audit bodies. The auditors work from the CCN-STIC 800 series and the CCN's published certification criteria.

What about ISO 27001 and SOC 2? They help, because a lot of controls overlap, and Microsoft's own ENS page notes that many ENS controls "align directly with ISO/IEC 27001". But an ISO 27001 certificate or a SOC 2 report is not an ENS certificate, and a Spanish buyer cannot hand either one to their ENS auditor as a substitute.

In practice, a public buyer asks a cloud vendor for one of two things:

  1. The vendor's own ENS certificate, at a category equal to or higher than the buyer's system.
  2. Evidence the buyer can use to certify its own system running on the vendor's platform: logs, configurations, access records, backup reports.

The second point matters more than most vendors realise. The public body categorises and gets audited on its own system, so whatever runs underneath has to produce evidence the body can actually get its hands on.

Ship faster on infrastructure you control.
Qovery gives your team self-service deployments on your own AWS, GCP, Azure, or Scaleway account - or your existing Kubernetes cluster. Start deploying in under 10 minutes.

Does ENS require Spanish or EU data residency - and what about EU sovereignty rules?

No. ENS contains no blanket legal requirement to keep data physically in Spain. It requires you to know and control where processing happens. The cloud measure op.nub.1.2 says that when you use third-party cloud services, they must be ENS-conformant or meet a CCN-STIC guide covering, among other things, penetration testing, transparency, "cifrado y gestión de claves" and "jurisdicción de los datos". From MEDIA upwards, R1 requires those cloud services to be certified under a methodology recognised by the CCN's certification body.

Residency usually comes from somewhere else. Individual tenders often specify EU or Spanish hosting, and GDPR Chapter V already restricts personal data transfers outside the EU. The EU Data Act has applied since September 2025 and adds switching and international access safeguards for cloud services. The EU cloud certification scheme (EUCS) is still a proposal, so do not cite its "sovereignty" levels as law.

Region choice therefore becomes an architecture decision. Here is what the main providers publish:

ProviderSpanish / nearby EU regionsPublished ENS scope
AWSEurope (Spain), eu-south-2, opened November 2022 with three AZs; also eu-west-3 (Paris), eu-central-1 (Frankfurt)ENS High, covering 31 Regions including Spain; the service list is in the certificate
Google Cloudeurope-southwest1 (Madrid)ENS "High" level for Google Cloud and Workspace, with an in-scope services list
Microsoft AzureSpain Central (spaincentral, Madrid)ENS High, audited by BDO, covering Azure services including AKS, Key Vault and Azure Monitor
Scalewayfr-par (Paris), nl-ams (Amsterdam), pl-waw (Warsaw)I found no ENS page published by Scaleway; check the CCN certificate register before relying on it
OVHcloudEU regions including France and GermanyCheck the CCN certificate register and OVHcloud's compliance pages for current ENS scope

Certified infrastructure only gets you part of the way. The questions that decide an audit are practical ones: who holds the cloud account, who holds the encryption keys, and who can produce the logs on audit day.

Where do most cloud platforms fail an ENS review?

In my experience, cloud platforms rarely fail an ENS review on cryptography. They fail on evidence. The usual gaps:

  • Logs locked in a shared tenant. The buyer cannot export activity records for their own system, so op.exp.8 evidence does not exist on their side.
  • One deploy credential shared by the whole team. For systems where op.acc.3 applies, nobody can show that critical tasks need more than one person.
  • Deployments that leave no trail. A push goes live, but nothing links the change request, the commit, the approver and the running version (op.exp.5).
  • Backups that are claimed, not shown. The vendor says "we back up everything" but cannot produce per-environment retention or a restore test (mp.info.6, op.cont.*).
  • Opaque sub-processors. Nobody knows which clouds and services sit under the vendor, so op.ext.* and op.nub.1 cannot be assessed.
  • A vendor-owned cloud account. The public body cannot pull evidence for its own audit without going through the vendor.

How does running on your own cloud account change the ENS conversation?

When the public body or its supplier owns the cloud account, conformity gets much easier to prove. The region, the keys, the audit logs and the infrastructure configuration all sit under the entity's control. This is the "bring your own cloud" (BYOC) model: the platform orchestrates deployments inside your AWS, GCP, Azure or Scaleway account, or your existing Kubernetes cluster, and the account and the cloud bill stay in your name.

Mapped to ENS, that looks like this:

  • Location and jurisdiction (op.nub.1): you pick eu-south-2, europe-southwest1 or spaincentral, on a provider whose ENS certificate you can link.
  • Traceability (op.exp.8): AWS CloudTrail, Google Cloud Audit Logs or Azure Monitor record activity in your own account, under your retention policy.
  • Keys (op.exp.10): encryption keys live in your KMS or Key Vault.
  • Backups (mp.info.6): snapshots land in your storage, and you can show them to your auditor.

This is where we built Qovery. It runs in your own AWS, GCP, Azure, Scaleway, or existing Kubernetes cluster and gives developers self-service deployments without anyone managing Kubernetes by hand. The pieces that matter for ENS: per-environment RBAC, git-driven deployments with a deployment history and audit logs, preview environments isolated from production, managed cluster upgrades for patch hygiene, and databases backed by your cloud's managed services.

To be clear about the limits: Qovery is not an ENS certification, and installing Qovery does not make your system ENS-conformant. You still need the policy, the risk analysis, the Declaración de Aplicabilidad and the audit. What changes is who holds the evidence, and how many operational controls your team has to build and run itself.

ApproachWho owns the cloud accountWho holds audit logs and keysRegion controlENS evidence burden on the buyer
Vendor-hosted PaaS (Heroku, Vercel, Render, Platform.sh)The vendorThe vendor; exports vary by product and planLimited to the vendor's region listHigh: depends on the vendor's own certifications and what they will share
Hyperscaler PaaS (AWS App Runner, Elastic Beanstalk)YouYou (CloudTrail, KMS)Full, within that providerModerate, but tied to a single cloud
BYOC platform (Qovery)YouYou (native cloud logs and KMS), plus Qovery deployment audit logsFull, on AWS, GCP, Azure, Scaleway or your own clusterLower: evidence sits in your account; the platform covers much of the operational toil
DIY Kubernetes + Terraform (EKS, GKE, AKS)YouYouFullLow on access, very high on effort: you build and run every control yourself
EU sovereign host (e.g. OVHcloud, Scaleway, Spanish providers)You or the host, depending on serviceDepends on the service modelEU-only by designDepends on the host's ENS certificate and what evidence it exposes

Heroku, Vercel and Render are excellent products for a lot of teams, and I would happily recommend them for a startup MVP. The friction with ENS has nothing to do with quality. In a vendor-held multi-tenant account, the public body can only show what the vendor chooses to show.

There is also a staffing reality. ENS operational measures assume someone handles patching, log review, change records and restore tests. Plenty of public-sector IT teams and small govtech vendors do not have a dedicated DevOps engineer for that. A platform layer on your own cloud account is how a small team meets those measures without hiring one.

How do I set this up with Qovery from Claude Code or Cursor?

You can set this up from your coding agent: install the Qovery Agent Skills once and ask in plain language. The Skills handle onboarding, deployment and troubleshooting. The MCP Server operates what already exists.

BASH|Install the Qovery Agent Skills globally (Claude Code, Cursor, Codex, OpenCode, Gemini CLI, ...)
curl -fsSL https://skill.qovery.com/install.sh | bash

# Or scope them to the current project only
curl -fsSL https://skill.qovery.com/install.sh | bash -s -- --project

# Add the Qovery MCP Server to Claude Code (OAuth, read-only by default)
claude mcp add --transport http qovery https://mcp.qovery.com/mcp --callback-port 4242

# Enable write access only when you explicitly want it
# (write access must also be enabled in the Qovery Console)
claude mcp add --transport http qovery "https://mcp.qovery.com/mcp?read_write=true" --callback-port 4242

The skills include qovery-onboard, qovery-deploy, qovery-troubleshoot, qovery-optimize, qovery-speedup, qovery-preview and qovery-terraform. Then ask something like: "Deploy this app into my Azure Spain Central subscription with Qovery."

The read-only default matters in an ENS setting. Your agent cannot change production unless someone deliberately enables write access on both the MCP client and the Qovery Console, which is precisely the kind of control an auditor asks you to explain. Full setup is in the AI agent quickstart and the Claude Code integration page.

Frequently asked questions
What does Spain's ENS (Esquema Nacional de Seguridad) require from cloud platforms selling to the Spanish public sector?

Under RD 311/2022, it must adopt a security policy, apply the Annex II measures for the system's category (BÁSICA, MEDIA or ALTA), and prove conformity with a declaration (BÁSICA) or an accredited certification (MEDIA and ALTA). The cloud measure op.nub.1 adds transparency, encryption, key management and data jurisdiction requirements, and certified third-party cloud services from MEDIA upwards.

Is ENS certification mandatory for private companies selling software to Spanish public administrations?

Yes, when they provide services or solutions to a public body under a contract (Article 2.3). Proof follows the category: a self-assessed declaration for BÁSICA, an accredited certification for MEDIA and ALTA.

What is the difference between an ENS declaration of conformity and an ENS certification?

A declaración de conformidad comes from the organisation's own self-assessment and only suffices for BÁSICA systems. A certificación de conformidad is issued by an accredited certification body after a formal audit, and is mandatory for MEDIA and ALTA (Article 38). Both follow the Article 31 two-year cycle and must be published.

Does ENS require data to be hosted in Spain or the EU?

Not as a blanket rule. ENS requires you to control and assess where processing happens, and op.nub.1 explicitly covers data jurisdiction for cloud services. EU or Spanish residency usually comes from the tender itself, from GDPR transfer rules, or from the buyer's risk analysis.

Does ISO 27001 or SOC 2 cover ENS requirements?

They overlap heavily and reduce the work, but a Spanish public buyer still needs an ENS declaration or certification for the relevant category. ISO 27001 or SOC 2 is supporting evidence at best.

Can a platform like Qovery make my system ENS-conformant?

No platform can. Conformity comes from your policy, risk analysis, Declaración de Aplicabilidad and audit. Qovery runs in your own AWS, GCP, Azure, Scaleway account or existing Kubernetes cluster, so logs, keys and region choice stay with you, and it handles much of the operational work behind access control, change tracking and patching. ENS rewards teams that can show their work. If your infrastructure lives in your own cloud account and every deployment leaves a trail, the audit becomes a documentation exercise instead of a negotiation with your vendor. Try Qovery free and see what that looks like on your own cloud.

Morgan Perry
About the author
Morgan Perry

Morgan co-founded Qovery and leads engineering. He writes about Kubernetes architecture, DevOps best practices, and building resilient infrastructure at scale.

Next step

Ship faster on infrastructure you control.

Qovery gives your team self-service deployments on your own AWS, GCP, Azure, or Scaleway account - or your existing Kubernetes cluster. Start deploying in under 10 minutes.