02 · Architecture

One directory, many gateways, three trust services.

An X-Road instance has three kinds of components: the Central Server, which holds the registry and policy; the Security Server, each organization's gateway; and the trust services (CA, OCSP, TSA) that vouch for certificates and time.

Diagram

How a message travels

The control flow (top row) and the data flow (bottom row) are separate. The Central Server never sees the data.

Central ServerRegistry of members, servers and approved CAs/TSAs. Publishes the signed global configuration.
CA · OCSPIssues auth and sign certificates. OCSP answers whether a certificate is valid.
TSA (RFC 3161)Timestamps the message log in batches.

Client organization

Information systemREST /r1/… or SOAP, with an X-Road-Client header
Security ServerSigns · gets a timestamp · keeps a log
:5500 · mTLS Directly over the internet,
each side checks the other's certificate

Provider organization

Security ServerChecks the signature · checks access rights (ACL) · keeps a log
Information systemSource registry. The data stays here

Sequence

The life of one request

1

Client IS → Security Server A

POST /r1/MN/GOV/…/service, with an X-Road-Client header.

2

Signature

Server A signs the message with the organization's SIGN key.

3

mTLS connection :5500

A connects directly to server B using its AUTH certificate. Each side verifies the other via the global configuration and OCSP.

4

Access rights

Server B checks the signature and that client's rights (ACL), then passes the request to the provider's system.

5

Signed response

The response returns the same way, signed by B.

6

Log and timestamp

Both servers log the message and get a batch timestamp from the TSA. This later serves as evidence.

Identifiers

Who, where, what

In X-Road, every organization, subsystem and service has a hierarchical identifier. The instance name is set once and can never be changed.

instanceMN
classGOV
code6806252
servermgmt
instanceMN
classCOM
code6235972
subsystemGEREGE-WALLET-BFF
instanceEE
classGOV
code70006317
organizationRIA

Member code = national registration number. The Estonian row shows how X-tee's operator is structured.

Protocol

SOAP and REST

  • X-Road Message Protocol 4.0 — a SOAP 1.1 profile. Required: client, id, protocolVersion.
  • REST (since 6.21): /r1/{instance}/{class}/{code}/{subsystem}/{service}, X-Road-Client header.
  • Service descriptions: WSDL for SOAP, OpenAPI 3 for REST.
  • Meta services: listClients, listMethods, allowedMethods, getOpenAPI.
  • Management requests (registering clients and certificates) are themselves X-Road services.
  • Stack (7.x): Java 21, PostgreSQL, Spring Boot 3, Vue 3; HSMs via PKCS#11.

Security

What makes the trust hold

Two certificates

AUTH — the server's TLS certificate (CN = server code). SIGN — the organization's signing certificate (O = class, CN = member code).

OCSP cache

Responses refresh every 20 min and stay valid for 1 hour. If OCSP is down for more than an hour, message exchange stops — OCSP is the most fragile point.

Batch timestamps

Timestamps cover batches of the log, not each message. If the TSA is down for long, the server stops passing messages.

Message log

By default archived every 6 hours and deleted after 30 days. It can be stored encrypted. Every admin change goes into the audit log.

Keys

RSA 2048 by default. Software token or HSM. Lose the token PIN and the key cannot be recovered.

eIDAS

In the EU, the signature counts as an advanced electronic seal. A qualified seal requires an HSM and a qualified CA.

Network

Security Server ports

Only 5500 and 5577 (plus 80 for ACME) are open to the internet. The admin interface on 4000 must never be exposed to the internet.

DirectionPortPurpose
Inbound5500Messages between Security Servers (mTLS)
Inbound5577OCSP responses between servers
Inbound · internal4000Admin UI and management API
Inbound · internal8080 / 8443From the organization's own information systems
Outbound4001Central Server (registration requests)
Outbound80 / 443Global configuration download, OCSP, TSA
Local5432 · 2080PostgreSQL · operational monitoring

Operating system (7.8.x): Ubuntu 22.04 / 24.04 LTS, RHEL 8/9, or Docker. The Central Server runs on Ubuntu only. Minimum: 2 cores (AES), 4 GB RAM, 3 GB disk — in production, size for message-log growth.

How to join

Joining an instance with a new Security Server

1

Install packages

Add the NIIS repository after checking its GPG key fingerprint, then install xroad-securityserver.

2

Configuration anchor

Import the anchor from the Central Server and verify its hash over a separate channel.

3

Initialize

Enter the owner's class, code, server code and token PIN. The member must already be registered on the Central Server.

4

Add a TSA

Without a TSA configured, every client registration request fails.

5

Keys, CSRs, certificates

Generate AUTH and SIGN keys, have the CSRs signed by an approved CA, then import and activate the certificates.

6

Register

Register the AUTH certificate with the Central Server and have the operator approve it. Then register each subsystem.

7

Publish services

Add your OpenAPI or WSDL and grant access to specific clients.