Identifiers and addressing
In X-Road, things are addressed by identifier, not by IP address or domain name. If you know the identifier, the Security Server finds the rest itself.
Four levels
GRG / COM / 1234567 / ZEEL / orlogo
│ │ │ │ └─ service code
│ │ │ └───────── subsystem
│ │ └────────────────── member code
│ └───────────────────────── member class
└─────────────────────────────── instance| Part | Example | Description |
|---|---|---|
| Instance | GRG | The same for all members of GRG X-Road |
| Member class | COM, GOV | COM for the private sector, GOV for government bodies |
| Member code | 1234567 | A code that distinguishes the organisation. Agreed with GRG when joining. |
| Subsystem | ZEEL | One information system of an organisation. An organisation can create as many as it needs. |
| Service code | orlogo | One service published by a subsystem |
Three kinds of identifier
| Identifier | Structure | Where it is used |
|---|---|---|
| Member | GRG/COM/1234567 | Certificates, registration |
| Subsystem | GRG/COM/1234567/ZEEL | The X-Road-Client header, access rights |
| Service | GRG/GOV/7654321/LAVLAGAA/orlogo | The request address |
Why the subsystem matters
Access rights are granted to a subsystem, not to an organisation. Therefore:
- Create a separate subsystem for each system. A loan system and a reporting system should have different access rights.
- Once you have fixed a subsystem code, do not change it. Service providers have granted access under that code.
- Do not mix test and production environments in a single subsystem.
Naming recommendations
- Use Latin capital letters, digits and hyphens:
ZEEL,TAILAN-2. Do not use spaces, Cyrillic or the/character: the identifier becomes part of the address. - Keep service codes short, meaningful and stable:
orlogo,hayag-lavlagaa. - Put the version in the path, not in the code:
orlogo/v1/…. API design recommendations
From identifier to address
The address of a REST request is the service identifier with the protocol version and a path added:
https://<your-security-server>:8443/r1/GRG/GOV/7654321/LAVLAGAA/orlogo/v1/citizens/AA00112233
└┬┘ └────────────┬────────────────┘ └──────────┬──────────┘
protocol service identifier path within the serviceContinued: Calling a REST service.