Connection, TLS, ports
A message travels along a path with three segments. X-Road itself protects the middle segment. The two outer segments are your responsibility.
Your system ──①── Your Security Server ══②══ Provider's Security Server ──③── Provider's system| Segment | Who protects it | |
|---|---|---|
| ① | Consumer system → its own Security Server | The consumer organisation |
| ② | Security Server ⇄ Security Server | X-Road: mutual TLS, signatures, timestamps |
| ③ | Provider's Security Server → its own system | The provider organisation |
Ports
| Port | Direction | Purpose |
|---|---|---|
8080 | Internal network → Security Server | HTTP requests from your system |
8443 | Internal network → Security Server | HTTPS requests from your system |
5500 | Security Server ⇄ Security Server | Message exchange |
5577 | Security Server ⇄ Security Server | Certificate status (OCSP) |
4000 | Administrator workstation → Security Server | Admin UI |
A developer works only with 8080 or 8443. Never expose these two, or 4000, to the internet. Full network requirements: Technical requirements.
Consumer side: your system → Security Server
In the subsystem's "Internal servers" tab, choose the connection type:
| Type | Meaning | When |
|---|---|---|
| HTTP | Unencrypted, port 8080 | For testing only |
| HTTPS NO AUTH | Encrypted, 8443. The system is not verified by certificate. | When the internal network is reliably isolated |
| HTTPS | Encrypted, 8443. The system presents its own certificate (mTLS). | In production |
Nobody should be able to call in your name
With the HTTP and HTTPS NO AUTH types, any machine that can reach the Security Server can make a call by writing your subsystem in the X-Road-Client header. That call goes out bearing your organisation's signature. In production, use HTTPS (mTLS), or use a firewall to leave access to the Security Server open only to the system concerned.
Configuring HTTPS (mTLS)
- Generate a key and certificate for your system. A self-signed certificate is sufficient.
- Add the certificate (not the key) to the subsystem's "Internal servers" tab on the Security Server.
- Set the connection type to HTTPS.
- Present the certificate with every request:
curl --cert zeel-client.pem --key zeel-client.key \
--cacert ss-internal.pem \
-H "X-Road-Client: GRG/COM/1234567/ZEEL" \
"https://ss.example.internal:8443/r1/GRG/GOV/7654321/LAVLAGAA/orlogo/v1/citizens/AA00112233"Do not put the key file in the code repository.
Trusting the Security Server's certificate
The Security Server generates the certificate on 8443 itself when it is installed, so your system does not trust it initially. Instead of switching verification off (curl -k, verify=False), add the certificate to your trusted list:
- Export the certificate from "Keys and certificates" → "Security Server TLS key" in the admin UI.
- Point your client at it:
--cacertfor curl,verify=for Python,NODE_EXTRA_CA_CERTSfor Node.js,RootCAsfor Go. Code examples
If the name in the certificate does not match the address you are using, ask your administrator to generate a certificate with the correct name.
Provider side: Security Server → your system
- Accept requests only from the Security Server. Protect the service with a firewall or mTLS so that nobody else can call it directly. Otherwise anyone in the internal network can forge the
X-Road-Clientheader. - Use HTTPS. Change the Service URL to
https://and turn on "Verify TLS certificate". Add the service's certificate in the "Internal servers" tab. - Identify the Security Server. If your service requires a client certificate, add the Security Server's internal TLS certificate to your trusted list.
Test and production environments
GRG X-Road does not yet have a separate test environment. When it opens, the instance name will be different, so do not hard-code the first part of the identifier in your code; read it from configuration.