Skip to content

Add device external identities and org iroh endpoints - #1

Merged
joshk merged 1 commit into
mainfrom
feat/external-identities-and-iroh-endpoints
Aug 21, 2026
Merged

joshk merged 1 commit into
mainfrom
feat/external-identities-and-iroh-endpoints

Conversation

@joshk

@joshk joshk commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What

Adds nh CLI support for the two concepts introduced in nerves-hub/nerves_hub_web#2899:

  • Org iroh endpoints — nh iroh-endpoint (alias iroh) with list / register / show / delete, managing an organization's registry of iroh endpoint ids, addressed by the endpoint id itself (not a row id).
  • Device external identities — nh device external-identities <device> (alias identities), a read-only list of the keys a device reports holding on networks NervesHub does not run (iroh / NetBird / Tailscale / WireGuard), with --service and --instance filters.

Both honour -o json and the usual --org / --product scoping.

nh iroh-endpoint

  • list — --owner device|user|none, --search <text>
  • register <identifier> — --instance, --user-email, repeatable --detail key=value
  • show <identifier>, delete <identifier> (with -y / confirmation)

API

internal/api/external_identity.go adds ExternalIdentity, IrohEndpoint, and IrohEndpointOwner types plus the request methods for:

  • GET /orgs/:org/products/:product/devices/:identifier/external_identities
  • GET /orgs/:org/iroh_endpoints
  • POST /orgs/:org/iroh_endpoints
  • GET /orgs/:org/iroh_endpoints/:identifier
  • DELETE /orgs/:org/iroh_endpoints/:identifier

Server dependency

⚠️ These endpoints are added by nerves-hub/nerves_hub_web#2899, which is not yet merged — the commands will return 404 until it ships. This PR was built strictly against that PR's controllers and JSON views, and has not been exercised against a live server. Worth a manual smoke test once the server PR is deployed to staging.

Tests

11 new tests cover request paths/methods/query/body, table + JSON output, --owner and --detail validation, and delete confirm/abort. Full suite, go vet, and gofmt are green.

🤖 Generated with Claude Code

Adds CLI support for the two concepts introduced in
nerves-hub/nerves_hub_web#2899:

- `nh iroh-endpoint` (alias `iroh`): list / register / show / delete an
  organization's iroh endpoint ids, addressed by the endpoint id.
- `nh device external-identities` (alias `identities`): list the keys a
  device reports holding on other networks, with --service/--instance
  filters. Read-only, mirroring the server's read-only endpoint.

internal/api gains ExternalIdentity / IrohEndpoint types and the matching
request methods. Registration takes an optional --user-email and
--detail key=value metadata.

The server endpoints are from an unmerged PR and will 404 until it ships.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshk
joshk force-pushed the feat/external-identities-and-iroh-endpoints branch from fda3689 to a79dfdd Compare August 21, 2026 01:10
@joshk
joshk merged commit d1daf0b into main Aug 21, 2026
1 check passed
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