BSI C5 gap analysis: the EHDS Integration Hub
Standard: BSI Cloud Computing Compliance Criteria Catalogue, C5:2020 (BSI page). The BSI recommends C5:2026 for test periods ending on or after 1 June 2027; this analysis has not been moved to it yet.
Relevance: No article of Regulation (EU) 2025/327 names C5. Art. 73(1) sets the security measures of the secure processing environment, Art. 73(3) requires regular audits of it, including by third parties, and Art. 73(5) leaves the detailed requirements to implementing acts due by 26 March 2027. C5 is what a public buyer in Germany asks of the cloud underneath (operational guideline, section 3); this analysis uses it as the yardstick for the hub. Earlier versions cited "Art. 50(6)", a number from the 2022 proposal; adopted Art. 50 is "Applicability to health data holders" (numbering).
Scope: Demo/MVP assessment. A real C5 report needs an accredited auditor.
Every criterion id links to its page in the C5:2020 PDF, and its title is the catalogue's. Versions up to 2026-03-28 used ids that do not exist in C5:2020 (CCM, IAM, DIP, LOG, INS) and gave OIS, DEV and COS ids titles they do not have; the table at the end lists each change.
1. Status Legend
| Symbol |
Meaning |
| ✅ |
Implemented (demo) |
| 🟡 |
Partially implemented |
| ⚠️ |
Accepted risk for demo |
| ❌ |
Not applicable or not implemented |
| 🔵 |
Production roadmap only |
2. C5:2020 criteria
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| OIS-01 |
Information Security Management System |
⚠️ |
No ISMS; the operator needs one (operational guideline, section 3) |
| OIS-02 |
Information Security Policy |
🟡 |
This document, the threat model and the operational guideline; no policy approved by management |
| OIS-04 |
Segregation of Duties |
⚠️ |
One operator; fictional personas only, no real CISO |
| OIS-06 |
Risk Management Policy |
⚠️ |
Not written |
| OIS-07 |
Application of the Risk Management Policy |
🟡 |
STRIDE analyses of the hub and the app, without a policy behind them |
2.2 AM: Asset Management
2.3 OPS: Operations
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| OPS-06 to OPS-09 |
Data Backup and Recovery – Concept; – Monitoring; – Regular Testing; – Storage |
⚠️ |
PostgreSQL Flexible Server keeps its automatic backups seven days (13-postgres-flexible-server.sh, Azure); no backup of the Neo4j volume; no restore test |
| OPS-10 |
Logging and Monitoring – Concept |
🟡 |
Access and transfer events written by the neo4j-proxy into hash-chained audit records (ADR-045); Keycloak login events kept seven days (realm); no SIEM |
| OPS-12 |
Logging and Monitoring – Access, Storage and Deletion |
🟡 |
Retention set in the audit retention policy: 12 months for access events (retention.ts); a Neo4j administrator can still read and change the records |
| OPS-13 |
Logging and Monitoring – Identification of Events |
🟡 |
Azure Monitor alerts when the UI, Keycloak or Neo4j has no replica (07-observability.sh); no alert on failed sign-ins or unusual access |
| OPS-14 |
Logging and Monitoring – Storage of the Logging Data |
🟡 |
Each audit record carries the hash of its predecessor and verifyChain() reports any change, removal or reordering (ADR-045); that detects a change, it does not prevent one; no write-once store |
| OPS-18 |
Managing Vulnerabilities, Malfunctions and Errors – Concept |
✅ |
SECURITY.md: private reporting through GitHub, response times, supported versions, scope and testing rules |
| OPS-22 |
Testing and Documentation of known Vulnerabilities |
✅ |
npm audit at high and above before every push (pre-push hook, exceptions time-boxed in npm-audit-exceptions.json); grype and trivy weekly and on every pull request that changes a lockfile, a Dockerfile or a compose file (security-scan.yml) |
| OPS-24 |
Separation of Datasets in the Cloud Infrastructure |
⚠️ |
One resource group, one Neo4j for every participant; the separation a real deployment needs is in the operational guideline, section 2 |
2.4 IDM: Identity and Access Management
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| IDM-01 |
Policy for user accounts and access rights |
🟡 |
The role matrix grants by role; no fine-grained attribute-based access control |
| IDM-02 |
Granting and change of user accounts and access rights |
⚠️ |
Demo accounts and roles come from a seed file; moving operator accounts to generated passwords in Key Vault is scripted (#671) and not yet run on the live realm |
| IDM-05 |
Regular review of access rights |
⚠️ |
No review |
| IDM-06 |
Privileged access rights |
⚠️ |
The admin role is granted in Keycloak only; the admin console is behind a guard (guard-keycloak-console.sh, finding F10 of the test report); no PAM system |
| IDM-09 |
Authentication mechanisms |
⚠️ |
C5 requires two factors for access to the production environment; the realm configures no one-time password policy and no required action (keycloak-realm.json), so there is no MFA |
2.5 CRY: Cryptography and Key Management
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| CRY-02 |
Encryption of data for transmission (transport encryption) |
✅ |
HTTPS at the Container Apps ingress; checked from outside: TLS 1.0 and 1.1 refused, 1.2 and 1.3 offered, HSTS set (test report, results, next.config.js). Plain HTTP on localhost for development |
| CRY-03 |
Encryption of sensitive data for storage |
🟡 |
On Azure, the Flexible Server and Azure Files (Neo4j's volume, ADR-017) are encrypted at rest with Microsoft-managed keys (Postgres, Storage); C5 asks for keys known only to the customer, so customer-managed keys are open; local Docker volumes are not encrypted |
| CRY-04 |
Secure key management |
🟡 |
Operator secrets are Key Vault references (ADR-036); participant keys in Vault (ADR-046); certificates managed by Container Apps; no rotation schedule, no HSM |
2.6 COS: Communication Security
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| COS-06 |
Segregation of data traffic in jointly used network environments |
⚠️ |
Only the hub and Keycloak have public ingress; the rest is on internal ingress in one Container Apps environment, except the PostgreSQL Flexible Server, which sits outside it on a public endpoint whose firewall admits any Azure service, an accepted risk (threat model, I-02 and I-05); no private endpoints |
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| DEV-01 |
Policies for the development/procurement of information systems |
🟡 |
code-style.md, testing.md and the SDLC; not based on a recognised secure development standard |
| DEV-03 |
Policies for changes to information systems |
✅ |
Every change is a pull request through the gates in quality-gates.md and the SDLC |
| DEV-06 |
Testing changes |
✅ |
Unit suites on every push; the security journeys SEC-01 to SEC-10 (01-auth-protection.spec.ts) with the other end-to-end suites once a night when main changed (ADR-074) |
| DEV-08 |
Version Control |
✅ |
Git history; images tagged with the commit they were built from; a Container Apps revision can be reactivated |
| DEV-09 |
Approvals for provision in the production environment |
🟡 |
Deploys run on a push to main, images tagged with the commit (deploy-azure.yml); no separate release approval |
2.8 SSO: Control and Monitoring of Service Providers and Suppliers
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| SSO-01 to SSO-05 |
Policies and instructions for controlling and monitoring third parties; Risk assessment of service providers and suppliers; Directory of service providers and suppliers; Monitoring of compliance with requirements; Exit strategy for the receipt of benefits |
⚠️ |
Neo4j, Keycloak, the EDC components, Azure and the model providers are not formally assessed; the bills of materials list the software components |
2.9 SIM: Security Incident Management
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| SIM-01 |
Policy for security incident management |
🟡 |
The clocks and who notifies whom are in the operational guideline, section 7; no procedure with named contacts and no classification |
| SIM-03 |
Documentation and reporting of security incidents |
⚠️ |
Not set up; a personal data breach goes to the supervisory authority within 72 hours (GDPR Art. 33) |
2.10 PSS: Product Safety and Security
| Criterion |
Catalogue title |
Demo Status |
Where the hub stands |
| PSS-02 |
Identification of Vulnerabilities of the Cloud Service |
✅ |
Static analysis: CodeQL on every pull request and push to main that changes code (codeql.yml) and for the app (codeql-swift.yml); Semgrep with the repository's rules in pre-commit (hook), not in CI; gitleaks in pre-commit, on each pull request's commits and nightly over the whole history (hook, PR Gate, nightly); the anonymous black-box checks (test report) |
| PSS-04 |
Error handling and Logging Mechanisms |
🟡 |
A patient sees who read their record on their own page; access body and holder read the audit trail; no export interface for a customer's SIEM |
| PSS-05 |
Authentication Mechanisms |
🟡 |
Every API route needs a session, requireAuth() in each handler, pinned by every-route-needs-a-session.test.ts (ADR-044); sign-in through Keycloak OIDC; no second factor on offer |
| PSS-06 |
Session Management |
✅ |
NextAuth JWT session signed with NEXTAUTH_SECRET from Key Vault (ADR-036); HttpOnly cookie |
| PSS-08 |
Roles and Rights Concept |
✅ |
Seven Keycloak roles, the role matrix; who sees a patient's identity is decided by role (patient-identity.ts) |
| PSS-09 |
Authorisation Mechanisms |
✅ |
requireAuth() with the roles a route admits, 403 otherwise; refuseForeignRecord() answers 403 for another patient's record |
2.11 Code-level measures with no criterion of their own
C5:2020 asks for a secure development policy (DEV-01) and for vulnerability identification including static analysis (PSS-02); it has no criterion for the following measures, which are the hub's evidence for both:
| Measure |
Demo Status |
Where the hub stands |
| Parameterised queries |
✅ |
Parameterised Cypher, never string-interpolated (api-conventions.md) |
| Output encoding and a content policy |
✅ |
React escapes output; a per-request nonce CSP with strict-dynamic (middleware.ts) |
| No credentials in the code |
✅ |
Environment variables and Key Vault references (ADR-036); gitleaks as under PSS-02 |
| Data minimisation |
✅ |
FHIR routes return the requested fields only; a GDPR principle (Art. 5(1)(c)), not a C5 criterion |
3. Priority Gap Closure Plan
3.1 Demo Phase
The demo-hardening items of #4 (closed):
| Priority |
Criterion |
Action |
State |
| P0 |
DEV-01 |
Parameterised Cypher (D1) |
✅ Done, Phase 23 |
| P0 |
DEV-01 |
CSP and security headers (D2) |
✅ Done, Phase 23 |
| P0 |
DEV-06 |
Security E2E tests (D3) |
✅ Done, Phase 23 |
| P0 |
OPS-22 |
npm audit in CI (D4) |
✅ Done, Phase 23; now a pre-push hook |
| P1 |
PSS-02 |
Secret scanning in pre-commit (D5) |
✅ Done: gitleaks in pre-commit, PR Gate and nightly |
| P1 |
OPS-18 |
SECURITY.md and a disclosure policy (D8) |
✅ Done: SECURITY.md with private reporting through GitHub and response times |
| P1 |
PSS-05 |
Verify all API routes check auth |
✅ Done, Phase 24 (pentest D6); pinned per handler since ADR-044 |
3.2 Production Roadmap
| Priority |
Criterion |
Action |
| P0 |
CRY-02 |
TLS profile per TR-02102-2 pinned with the cloud; certificate rotation (HSTS is set) |
| P0 |
IDM-09, PSS-05 |
MFA for EDC_ADMIN and HDAB_AUTHORITY |
| P0 |
CRY-03 |
Customer-managed keys for the graph and the database |
| P0 |
OPS-06 to OPS-09 |
Backups of the graph and a restore drill |
| P1 |
OPS-10 |
SIEM integration (OpenSearch or Loki) |
| P1 |
OPS-13 |
Alerting on failed authentication and unusual access |
| P1 |
OPS-18 |
Publish /.well-known/security.txt (RFC 9116) on the hub, pointing to SECURITY.md |
| P2 |
SIM-01 |
Incident response runbook with named contacts |
| P2 |
OPS-14 |
Write-once storage for the audit trail, on top of the hash chain |
| P2 |
IDM-01 |
Attribute-based access control via OPA policies |
| P2 |
DSP |
Signed contract messages (DSP 2025-1) |
| P2 |
DCP |
Credential signature, expiry and revocation checks (DCP v1.0) |
Done since the version of 2026-03-28: static analysis in CI (CodeQL; Semgrep runs in pre-commit only) and gitleaks in CI and pre-commit, as under PSS-02.
4. EHDS and GDPR mapping
Article numbers are those of the adopted Regulation (EU) 2025/327; the 2026-03-28 version used proposal numbers (numbering).
| Article |
Requirement |
C5 criteria |
Demo Status |
| Art. 3 |
Patient's right of access to their own data |
PSS-05, PSS-09 |
✅ /patient/* routes; a patient sees only their own record |
| Art. 68 |
Data permit, issued by the access body |
PSS-08, PSS-09 |
✅ HDABApproval nodes |
| Art. 71 |
Opt-out from secondary use |
PSS-09 |
🟡 Consent records in the app and on the patient page; no national opt-out register wired in |
| Art. 73(1) |
SPE security measures, including (e) access logs kept at least one year |
IDM-01, OPS-10 to OPS-14, OPS-24 |
🟡 Logs kept 12 months; the SPE is views on the same database, not an isolated environment (ADR-037, ADR-052) |
| Art. 73(3) |
Regular audits of the SPE, including by third parties |
All domains |
❌ No audit; this analysis is the project's own |
| Art. 73(5) |
Implementing acts on SPE requirements, due by 26 March 2027 |
All domains |
🔵 To be mapped when adopted |
| GDPR Art. 25 |
Data protection by design and by default |
IDM-01, PSS-08 |
🟡 |
| GDPR Art. 32 |
Security of processing |
CRY-02, CRY-03 |
🟡 |
5. Changed criterion ids
| Until 2026-03-28 |
Now |
Why |
| OIS-03 Risk assessment |
OIS-07 |
OIS-03 is Interfaces and Dependencies |
| OIS-04 Asset inventory |
AM-01 |
OIS-04 is Segregation of Duties |
| OIS-05 Supplier security |
SSO-01 to SSO-05 |
OIS-05 is Contact with Relevant Government Agencies and Interest Groups |
| CCM-01 to CCM-03 |
DEV-03, DEV-06, DEV-08 |
C5:2020 has no CCM domain |
| DEV-02 to DEV-10 |
DEV-01, DEV-06, OPS-18, OPS-22, PSS-02, PSS-05 |
DEV-02 to DEV-10 have other titles in C5:2020 |
| IAM-01 to IAM-07 |
IDM-01, IDM-02, IDM-06, IDM-09, PSS-05, PSS-06, PSS-08 |
C5:2020 has no IAM domain |
| COS-01 to COS-04 |
CRY-02, CRY-04, COS-06 |
COS-01 to COS-04 have other titles in C5:2020 |
| DIP-01 to DIP-06 |
AM-06, CRY-03, OPS-06 to OPS-09, OPS-10, OPS-14 |
C5:2020 has no DIP domain |
| LOG-01 to LOG-04 |
OPS-10, OPS-12, OPS-13 |
C5:2020 has no LOG domain |
| INS-01 to INS-03 |
SIM-01, SIM-03 |
C5:2020 has no INS domain |
Last updated: 2026-11-07: criterion ids and titles checked against the C5:2020 PDF, adopted EHDS article numbers, statuses brought up to date. Previous version 2026-03-28, Phase 24, Pentest + API Auth Fix (D6).
Next review: Before any production deployment or a C5 or SPE audit.