Skip to content

Add DeviceIdentity example, validation + registration endpoint#127

Merged
mdheller merged 1 commit into
mainfrom
add-device-identity-example
Jun 22, 2026
Merged

Add DeviceIdentity example, validation + registration endpoint#127
mdheller merged 1 commit into
mainfrom
add-device-identity-example

Conversation

@mdheller

Copy link
Copy Markdown
Contributor

DeviceIdentity had a schema but was the only boot/fleet object with no example, no validator coverage, and no API operation — the missing peer to NLBootPlan and BootProofRecord.

Changes

  • examples/device_identity.json — a registered fleet device (provisional trust, owner, x86_64), validated against schemas/DeviceIdentity.json.
  • tools/validate_nlboot_examples.py — add the DeviceIdentity schema/example pair so make validate covers it.
  • openapi.yamlPOST /v2/device-identities (upsertDeviceIdentity), mirroring /v2/nlboot-plans and /v2/boot-proof-records (tags [Boot], idempotent on id).

Why

Surfaced while conforming the SourceOS image-builder/fleet to these contracts (socioprophet#395): a device registers (DeviceIdentity) → gets an NLBootPlan → reports a BootProofRecord. The first step had no canonical example or endpoint; this closes the loop in the canonical repo.

make validateOK: validate.

DeviceIdentity had a schema but no example, no validator coverage, and no API
operation — the missing peer to NLBootPlan/BootProofRecord in the boot/fleet
surface. Adds:
- examples/device_identity.json (a registered fleet device)
- DeviceIdentity to validate_nlboot_examples.py (make validate covers it)
- POST /v2/device-identities (upsertDeviceIdentity) in openapi.yaml, mirroring
  the nlboot-plans / boot-proof-records operations.
make validate passes.
@mdheller mdheller merged commit e54336c into main Jun 22, 2026
3 checks passed
@mdheller mdheller deleted the add-device-identity-example branch June 22, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant