Skip to content

Vehicle Registry

A platform that hands out identities has to remember that it did. The Vehicle Registry is the component that answers three questions an operator will ask on the first day:

  • Which vehicle identities does this platform know about?
  • Who issued each one, and when?
  • Which of them is this user allowed to see?

It is a small service — base-services/vin-registry — and it does exactly one thing: it records issuance events, and it turns a successful issuance into fleet membership.


Every certificate issuance produces one event. The registry keeps an append-only list of them, so a VIN that is re-registered later simply gains another entry rather than overwriting the first.

FieldMeaning
vinthe vehicle the event is about
sourcewhich service issued it — factory-helper or registration
actionfactory-certificate-issued or operational-certificate-issued
resultsuccess or failure
detailoptional free text
created_atwhen the event was recorded

source, action and result are closed sets rather than free text: these are the values an operator groups and filters by, and a typo in a calling service would otherwise create a second, silent category.


Two services report, and both are certificate issuers:

ServiceReports
Registration Serveran operational certificate was issued to a VIN
Factory Helpera factory certificate was issued to a VIN

Reporting is best effort, by design. The call is detached from the request that triggered it and carries a two-second timeout; if the registry is slow, broken or not deployed at all, the issuing service logs it and continues. A vehicle never fails to get its certificate because the registry is unavailable.

The consequence is worth stating plainly: a report made while the registry was down is lost. There is no retry and no later reconciliation against the certificate authorities — recovering such gaps is not part of this release.


This is the part that makes the registry more than a log.

  1. A certificate is issued The registration server or the Factory Helper signs a certificate for a VIN and reports the event.

  2. A successful issuance enrols the vehicle In the same database transaction as the event, the registry adds the VIN to the fleet nexus-fleet. A failed attempt is recorded but enrols nothing — it is worth knowing about, but it should not put a vehicle in front of anyone’s eyes.

  3. A user sees the vehicles of their own fleets FleetView reads the user’s group memberships from their Keycloak token and shows the vehicles enrolled in those groups.

Re-registering a vehicle does not create a second membership; enrolment is idempotent.

A user sees a vehicle when both are true: the issuance succeeded, and the user is a member of the matching Keycloak group. A user who is in no group sees nothing, and that is the intended default.

Two roles matter:

Keycloak objectEffect
Group nexus-fleetmembership shows the vehicles the platform has enrolled
Realm role nexus-adminsees every recorded identity, including ones that belong to no fleet

nexus-admin exists because of the failure case: an issuance that did not succeed is never enrolled anywhere, so a purely group-scoped view would hide exactly the entries an operator needs to look at.

Fleet membership governs more than the registry page: the telemetry views are filtered through the same mechanism, so a vehicle that is not in one of your groups is not visible there either.


The registry is an internal component. It runs in the base-services namespace and is reachable only from inside the cluster; the two issuing services report to it there, and FleetView reads from it. Everything a user sees goes through FleetView, which requires a signed-in session and applies the group filtering described above.

Its interface is deliberately small:

EndpointPurpose
POST /v1/eventsrecord an issuance, and enrol the VIN on success
GET /v1/vinsthe per-vehicle summary FleetView renders
GET /v1/vins/{vin}/eventsone vehicle’s history, newest first
GET /healthliveness and readiness

  • One fleet. Every issued VIN joins nexus-fleet. Several fleets managed by the platform itself would be a schema and interface change, not a setting.
  • No reconciliation. The registry does not compare itself against the certificate authorities, so reports lost during an outage stay lost.
  • No revocation. The registry records issuance; it does not withdraw an identity.