Skip to content
Regulatory guide

AI and Spain's ENS: which National Security Framework measures affect an AI system

Updated
By
The MagnolIA team
On this page
8 min read

Short answer

Spain's National Security Framework (ENS) does not regulate AI as such: it requires the information systems of the public sector and its suppliers to be protected, and an AI system is one of them. Access control, activity logging, protection of information and continuity matter most. MagnolIA does not advertise any ENS certification.

Back to contents

Who is bound by the ENS when AI is used?

The ENS (Esquema Nacional de Seguridad) is Spain's mandatory security framework for public-sector IT, set out in Royal Decree 311/2022. It has no chapter on artificial intelligence: it speaks of information systems, and an assistant that reads case files or drafts decisions is one more information system. Article 2 defines three areas of application.

  • The whole public sector, as defined in Article 2 of Law 40/2015: national, regional and local administrations and the bodies attached to them.
  • Systems that handle classified information, which may need additional measures.
  • Private companies that provide services or solutions to public bodies under contract. They must have a security policy, and tender documents are to include ENS conformity requirements, which extend down the supply chain as the risk analysis dictates.

If an AI supplier's system serves a Spanish public body, the ENS reaches it through the contract. The summary alongside the GDPR and the AI Act is in AI and the GDPR, ENS and AI Act, and the context in AI for public administration.

How is the category of an AI system decided?

In the same way as for any other system: by the impact an incident would have. Annex I assesses five security dimensions and gives each a low, medium or high level. The system's category is that of the highest level reached.

Dimensions
Confidentiality, integrity, traceability, authenticity and availability.
Categories
Basic, if no dimension goes above low; medium, if any reaches medium; high, if any reaches high.
Who decides
Those responsible for the information and the services assess the impact; the security officer determines the category (Articles 40 and 41).

Applied to AI, what counts is not the model but the information it will read and the service it supports. That is an inference from the Annex I method, not a rule written for AI: each body makes its own assessment, and the measures chosen are signed off in a Statement of Applicability (Article 28).

Back to contents

Which Annex II measures affect an AI system?

Annex II groups the measures into three frameworks: organisational, operational and protective. Any of them may apply, but for an AI system there are seven groups worth looking at first. The codes are the ones used in the Royal Decree.

ENS Annex II measures to look at first for an AI system
MeasureWhat the ENS asks forWhat to check in an AI system
Access control (op.acc)A unique identifier for every user or process; all access forbidden unless expressly authorised; stronger authentication as the level rises.Whether each person signs in with their own user rather than a shared account, and who administers the system.
Activity logging (op.exp.8)An audit log that includes, at least, the identifier of the user or entity associated with the event, with reinforcements at medium and high level.Who used the AI, when and with what permissions; where that log is kept and who can read it.
Protection of information (mp.info.1, mp.info.2 and mp.info.5)Personal data protection requirements, classification of information, and cleaning metadata from documents before they are released.Which documents the AI may read according to their classification, and what happens to what it generates from them.
Backups (mp.info.6)Backups that allow lost data to be recovered; restore tests from medium level and a copy kept in a separate place at high level.Whether conversations, document collections and logs are in the backup, and whether a restore has been tested.
Service continuity (op.cont)Impact analysis from the medium level of availability; continuity plan, periodic tests and alternative means at the high level.What happens to the procedure if the AI is unavailable: whether it can carry on without it, and for how long.
External resources and cloud (op.ext and op.nub.1)Service level agreements by contract from medium category, supply-chain protection in high category and, for third-party cloud services, that the systems supporting them conform to the ENS or meet the measures of a CCN-STIC guide.In the cloud, the conformity of whoever provides the service. Installed at the public body and maintained by a supplier, what access that supplier has and what it can see.
Awareness and training (mp.per.3 and mp.per.4)Regular awareness and training for staff on information security.Rules for staff on using AI: what may be given to it and what may not. There is a model in the AI acceptable use policy template.
An indicative selection made by this guide from Annex II of Royal Decree 311/2022 (consolidated text, last updated on 6 November 2024, in Spanish). It is not any system's Statement of Applicability: which measures apply, and with which reinforcements, is determined by the security officer.
Back to contents

How is conformity demonstrated, and what has the CCN published on AI?

Article 38 sets out two routes. Basic-category systems need a self-assessment, which leads to a declaration of conformity. Medium- and high-category systems need a certification audit. Security is also audited at least every two years (Article 31).

The CCN (Centro Criptológico Nacional), Spain's national cryptologic centre, attached to the CNI intelligence service, runs the ENS portal. It lists certified entities and certification bodies and sets out the regulations and the adaptation process. The guides that develop the ENS are the CCN-STIC 800 series.

On AI, the CCN has published at least one product guide: CCN-STIC 884D, on securely configuring the AI services of a public cloud. According to the CCN's note of July 2024, it includes the steps needed to meet the requirements of Royal Decree 311/2022 in the high category. It is a guide to one specific product: this page has not found a general CCN-STIC guide on how to categorise or protect any AI system, which is why the selection of measures above is our own reading.

What should you ask an AI supplier?

Six questions that work for any supplier, whether the AI is in the cloud or installed at the public body.

  1. Does it have ENS conformity?

    A declaration or a certificate, for which category, for exactly which system and with what date. It can be checked on the CCN portal.

  2. Where is the information processed?

    In the body's own network, in the supplier's data centre or in a third party's, and in which country.

  3. Who signs in, and what is logged?

    Individual identity, two-factor authentication for administrators, which events are logged, for how long and where.

  4. What can the supplier see?

    Whether it has access to the content of queries or only to the state of the machine, and through which channel.

  5. How are backups made?

    What they include, how they are encrypted, where they are stored and when a restore was last tested.

  6. Who else is involved?

    Subcontractors, cloud services and third-party components that form part of the service.

Back to contents

Which design measures does MagnolIA document, and what does it not claim?

Design measures documented on MagnolIA's website, by group of ENS measures
Group of measuresWhat MagnolIA's website documents
Access controlA separate user for each person, role-based permissions, two-factor authentication for administration, and single sign-on with the organisation's account in corporate mode.
Activity loggingPer-user usage log and a chained, verifiable audit trail kept for two years in the installation itself.
Protection of communicationsA single entry point encrypted with TLS, and an isolated network; remote access is optional and goes through an outbound tunnel.
Protection of informationPrompts, documents and answers are processed on the machine installed in the body's network; MagnolIA sees only the monitoring of the machine.
BackupsEncrypted with AES-256, in the storage the body chooses; they allow the service to be restored on another machine.
These are technical measures of the product: they do not replace the categorisation or the audit that fall to the public body. If your procurement requires supplier conformity, raise it in the first conversation.

Each measure is described in on-premise AI security. If you also use AI in areas the EU regulation treats as high-risk, the dates are in the EU AI Act timeline.

Back to contents

Frequently asked questions about AI and the ENS

Does Spain's ENS apply to an AI system?

Spain's National Security Framework (ENS) has no chapter on AI: it applies to the information systems of the public sector and of its suppliers, whatever the technology (Royal Decree 311/2022, Article 2). An AI system that handles a public body's information falls within that scope, with the Annex II measures that correspond to its category.

Does an AI supplier to a Spanish public body need ENS certification?

Article 2 of Royal Decree 311/2022 extends the ENS to the systems of companies that provide services or solutions to the public sector, and expects tender documents to require conformity. Medium- and high-category systems need a certification audit; basic-category systems need a self-assessment (Article 38). What each contract requires is set by its tender documents.

What should you ask an AI supplier about the ENS?

Ask an AI supplier whether its system holds an ENS declaration or certificate of conformity and for which category, who can access the machine and with what authentication, what activity log is kept and where, how backups are made and tested, and which subcontractors are involved. MagnolIA does not advertise any ENS certification or declaration of conformity.

Is MagnolIA certified under Spain's National Security Framework (ENS)?

MagnolIA does not claim any certification under the ENS, the security framework that Spanish public bodies and their suppliers must follow. What it offers are design measures built with the ENS in mind: role-based access, two-factor authentication for administration, an encrypted entry point, an isolated network, a chained, verifiable audit log kept for two years and AES-256 encrypted backups.

Sources

External figures on this page link to their original source.

  1. BOE (Spain's Official State Gazette). Royal Decree 311/2022 of 3 May regulating the National Security Framework, ENS (consolidated text, in Spanish). www.boe.es/buscar/act.php?id=BOE-A-2022-7191

  2. CCN (Spain's National Cryptologic Centre). National Security Framework (ENS) portal: certified entities, certification, conformity and regulations (in Spanish). Accessed November 2026. ens.ccn.cni.es/es/

  3. CCN (Spain's National Cryptologic Centre). The CCN publishes a new guide to securely configuring Azure's artificial intelligence tools and applications, guide CCN-STIC 884D (in Spanish). 12 July 2024. www.ccn.cni.es/es/actualidad-ccn/1180-como-configurar-los-servicios-de-inteligencia-artificial-integrados-en-la-nube-de-microsoft

Let's go through the measures with your security officer

Tell us your system's category and what your tender requires. We will show you what the product documents for each measure, and what would remain the public body's job.

Request a pilot