License keys
Shown once, when issued. The server stores a keyed hash for lookup and a short hint. Keys, tokens, and signatures are kept out of logs, metrics, traces, and audit entries.
Kleis is built so that a license cannot be forged, copied to another device, or stretched past its time without the server, and so that one vendor can never see another's data. It is equally clear about what no licensing system can do on a machine its user controls.
The only thing a client accepts as a license is a lease signed with Ed25519. A cached answer, an encrypted file, or a flag is never authority. The signature is checked over the exact bytes before anything in the lease is read.
Each installation creates its own key pair. The lease names the public key, and the client honors it only while it holds the matching private key. Every request is signed with that key.
Your application pins a root public key. The keys that sign leases are trusted only through a manifest signed by that root, and a manifest's sequence number never goes backward.
Activation challenges work once. Requests carry a timestamp and a nonce under the device's signature, and the server remembers nonces. A lease older than the one a device was last given is noticed and recorded.
A lease expires 7 to 28 days after the server signed it. Time is anchored to the server and tracked on the device, so turning the clock back asks for a connection and extends nothing.
The tenant of a request comes from the verified sign-in or credential. PostgreSQL row-level security decides which rows exist for it, under a role that cannot bypass the policy.
The threat model lists every attacker Kleis considers, from an end user with a debugger to an insider with database access. These are the cases that matter most to a vendor.
| Attempt | What stops it | What remains |
|---|---|---|
| Forge or edit a lease | The Ed25519 signature covers every field, and it is verified before the lease is parsed. Decoding is strict: duplicate or unknown fields and oversized input are rejected. | Only a compromise of a signing key, which the trust manifest can revoke. |
| Copy a lease to another device | The lease names the device's public key, and the client needs the matching private key. | A software key can be copied with the state; the server still counts one seat. |
| Turn the clock back | Server-anchored time, monotonic time while running, and a protected high-water mark detect it and require validation. | An attacker who controls the operating system and restores snapshots defeats software-only checks. |
| Restore older, more generous state | Authority revisions only move forward, a second record witnesses newer state, and the server records a device that presents old state. | The same as above. Authority still ends at the signed expiration. |
| Replay a captured request | Each request is signed over its method, path, body, timestamp, and nonce, and nonces are remembered. | Nothing within the design. |
| Turn an outage into access | A failure never mints authority. Only a verified lease grants anything. | A lease that is already valid keeps working until it expires, by design. |
| Hide a revocation from a device | The offline period is bounded, and a reconnecting device validates before anything else. | A delay of at most the time left on the lease. |
| Guess or harvest license keys | 128 or 256 random bits, uniform error answers, rate limits, and keyed lookup hashes instead of stored keys. | Nothing practical. |
| Reach another vendor's data | The tenant comes from the verified identity, and row-level security filters every statement. | Queries are parameterized; an injection able to run arbitrary statements would be the residual risk. |
| Race for the last seat or the last unit | Row locks and conditional updates in one transaction, unique constraints, and idempotency keys. | Nothing within the design. |
| Forge or replay a webhook | HMAC over the delivery's identifier, timestamp, and body, with a stale-timestamp rule. | Your receiver must do the check. |
| Patch the product to skip the check | Checks at the operation itself, enforcement on your server for hosted capabilities, and optional obfuscation raise the cost. | It cannot be prevented for code running on the attacker's own machine. |
Shown once, when issued. The server stores a keyed hash for lookup and a short hint. Keys, tokens, and signatures are kept out of logs, metrics, traces, and audit entries.
Never in the repository or in a client. In production the lease key can stay inside HashiCorp Vault, which signs on request, and the root key signs the trust manifest offline.
Multi-factor sign-in for every role above ReadOnly, short sessions, antiforgery tokens on every form, and a permission check inside every operation. Service credentials and webhook secrets are shown once and stored only as hashes or derived on demand.
A strict Content-Security-Policy: scripts, fonts, images, and connections from this origin only, no inline script, and no framing. Nothing on these pages is loaded from another site, and there is no analytics.
A device key, the signed lease, and a few counters, protected for the current user. Storage encryption is relied on for confidentiality only: authenticity always comes from the server's signature, checked on every load.
Every administrative change writes an audit entry in the same transaction. System administrators enter a tenant only for a limited time, with a reason, and every such entry is audited.
Offline licensing cannot be made unbreakable on a machine its user controls. Anyone who tells you otherwise is selling something else.
What does hold: a capability that runs on your own server can be enforced there, on every request, whatever happens on the device.
Kleis implements no cryptographic primitive of its own.
If you believe you found a security problem in Kleis or in this deployment, tell us before telling anyone else, and give us time to fix it.
Use the contact form and say that the message is a security report. Describe the problem in general terms first; we answer with a way to send the details. Please do not include license keys, credentials, or personal data.
The connection to the console was lost. Reconnecting…
The connection could not be restored. Nothing you had not saved was sent.