Key files

8TML > Reference > Publishing API

A site’s owner gets keys from the endpoint, for example on a web page of the hosting service served over HTTPS. Each key comes as a small text file:

8tml-publish: 1
url: http://example.com/publish
id: anna-1
key: 3f2a9c...  (64 hexadecimal digits)
Key Meaning
8tml-publish the API version, 1
url the endpoint’s address. Clients that publish over HTTPS use it with https:// in place of http://.
id the key’s name: up to 32 characters, a–z, 0–9 and -. It is not secret and goes with every request, so the endpoint knows which key to check.
key 32 random bytes as 64 hexadecimal digits (either case). Secret.

The format is the same key: value lines as an 8TML page header; clients ignore keys they don’t know.

Handling keys

  • A key file is never sent over plain HTTP. Copy it to the client’s storage (an SD card, a disk image) or type the key in.
  • Use one key per machine or tool, so a lost one can be revoked on its own. Endpoints must let the owner revoke keys.
  • The endpoint keeps the key itself, because it computes the same signature as the client; it must keep keys secret.