Taps can't be copied or forged
A plain NFC sticker holds a fixed link anyone can copy. A Knura tag writes a new, signed link on every tap, and knurd checks two things before anything happens:
- The signature. Only the genuine tag can make a valid MAC. Editing any part of the link breaks it.
- The counter. Each tap's counter must be higher than the last accepted one, so a link from browser history, a screenshot or a shared message is refused.
Verification is tested against NXP's published examples (AN12196) and the RFC 4493 CMAC test vectors, and the tag commands are tested byte for byte against traces from a real tag.
A key for every tag
Each tag's keys are worked out from one master key and the tag's ID, using NXP's AN10922 key diversification. If someone pulls the keys out of one tag, every other tag stays safe, and the server only needs the master key rather than a list of every tag's keys.
knurctl init creates it in knurd.properties. Without it, tags set up with it can't be verified or reset.Two doors: taps and admin
knurd keeps public and private traffic on separate ports.
Tap port 8424
Public. Serves only /tap, /health and /.well-known/knura-owner, with a strict Content-Security-Policy and no scripts on its pages.
Admin port 8425
Never public. Listens only on this computer or a local network address, refuses public addresses and anything that came through a proxy or tunnel, and audits every request.
The admin API has two modes. Plaintext needs no login but only listens on 127.0.0.1. Token (the default) needs a token from a creds file that knurctl refuses to use unless only you can read it, and TLS with a pinned certificate for other computers. knurd stores only each token's SHA-256, and tokens can be removed instantly. The admin API is read-only for now and never returns key material.
Actions you can trust
- Only verified, first-time taps reach the actions engine, and the link can't pick the action.
- Every event is signed with HMAC-SHA256 in the Standard Webhooks format, with a stable id per tap so receivers can ignore duplicates.
- Webhook addresses must use HTTPS, except on your own network, and redirects aren't followed.
- Secrets live in their own file that Knura refuses to read if other users can, and never appear in logs. Neither do webhook addresses.
The resolver is a pipe, not a judge
tap.knura.io forwards taps to your server. It holds no tag keys, can't read the encrypted tag ID and can't make a tap knurd would accept.
- Only you can move your taps. Your registration is signed with an Ed25519 key that stays in your
knurd.properties, and each change needs a higher sequence number, so old records can't be replayed. - No open redirect. The resolver only accepts a server that confirms it belongs to you at
/.well-known/knura-owner. - Changes get noticed. knurd checks its own record every 6 hours and warns if it was changed.
Whoever runs a resolver could still swallow taps or show a fake page. If you'd rather not trust one, point tags straight at your own address.
On Kubernetes
The Helm chart never takes keys as values, so they can't end up in a values file, in Git or in Helm's history. You create the Secret yourself, and the containers run as a non-root user with key files only they can read.
What Knura doesn't do yet
Being clear about limits is part of security:
- No locks, garage doors or alarms. A tap proves a genuine tag and an unused link, not who is holding the phone. Sensitive actions will need a confirmed, approved phone first.
- No saved outbox yet. Actions waiting to be delivered are lost if knurd restarts.
- The secrets file isn't encrypted yet; it is protected by file permissions.
See the Roadmap for what's planned.