Search code examples
eclipse-hono

Unable to register a tenant with X.509 based authentication in Hono


I am following this guide in order to authenticate devices with certificates, but when i run the following command i get 404 NOT FOUND (i am using the Hono sandbox):

curl -i -H 'Content-Type: application/json' -H 'Expect:' --data-binary @tenant.json https://hono.eclipse.org:28443/tenant

I also tried replacing hono.eclipse.org with hono.eclipseprojects.io since i read that the domain name will be deprecated.

I was wondering if the guide is up to date or something changed on the new releases of Hono.


Solution

  • Indeed, Hono's example registry (as used by the sandbox) implements and exposes the Device Registry Management API now. The tenant management endpoint URL to post to in order to create a tenant is

    https://hono.eclipseprojects.io:28443/v1/tenants/{your_desired_tenant_id}

    Also make sure to check the payload format with the API spec.

    You might want to take a look at Hono's Getting Started guide which also illustrates how to register a tenant, device and credentials.