Skip to content
Kleis
Dark theme
Contact us
Security

What protects a license, and the limits we state.

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 model

Six ideas carry the design.

Authority is a signature

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.

A lease belongs to one device

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.

Trust starts at a root you pin

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.

Nothing is accepted twice

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.

Offline time is bounded

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.

Tenants are separated by the database

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.

Threat coverage

What an attacker tries, and what answers it.

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.

AttemptWhat stops itWhat remains
Forge or edit a leaseThe 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 deviceThe 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 backServer-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 stateAuthority 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 requestEach request is signed over its method, path, body, timestamp, and nonce, and nonces are remembered.Nothing within the design.
Turn an outage into accessA 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 deviceThe 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 keys128 or 256 random bits, uniform error answers, rate limits, and keyed lookup hashes instead of stored keys.Nothing practical.
Reach another vendor's dataThe 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 unitRow locks and conditional updates in one transaction, unique constraints, and idempotency keys.Nothing within the design.
Forge or replay a webhookHMAC 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 checkChecks 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.
Secrets and data

What is stored, and what never is.

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.

Signing keys

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.

Administrator access

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.

This console

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.

On the device

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.

Evidence

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.

Honest limits

What Kleis does not claim.

Offline licensing cannot be made unbreakable on a machine its user controls. Anyone who tells you otherwise is selling something else.

A person who controls the operating system can modify your product.They can patch out a check, restore a snapshot of a virtual machine, and manipulate time. Software-only detection raises the effort; it is not a guarantee. Kleis ships no anti-debugging, self-hashing, or process-killing tricks, and relies on none.
  • Counters on a device are not exact. A local usage counter cannot hold a hard limit against a hostile local administrator. Strict limits need online checks or budgets reserved in advance.
  • Revocation waits for contact. A longer offline period delays how soon a revocation or an entitlement reduction reaches a disconnected device, by up to the time left on its lease.
  • A software device key can be copied. By default the device key is a software key that the device's own user can copy together with the client's state. The server still counts one activation. Only a key the host asks the Windows platform crypto provider to hold is bound to hardware.
  • Fingerprints are hints. Device fingerprints can be cloned, so they never grant or deny anything by themselves.
  • Obfuscation is a cost, not a control. It raises the price of analysis and is relied on for no security property.
  • Offline deactivation cannot prove deletion. It clears the license on the device and reports it, but cannot prove that no copy of an outstanding lease exists.

What does hold: a capability that runs on your own server can be enforced there, on every request, whatever happens on the device.

Cryptography

Standard primitives, from maintained libraries.

Kleis implements no cryptographic primitive of its own.

  • Ed25519 (RFC 8032) for leases, status notices, and trust manifests, through libsodium.
  • ECDSA P-256 for device keys held by a Windows key storage provider, from the platform's libraries.
  • HMAC-SHA-256 for key lookup hashes and webhook signatures.
  • TLS as the operating system configures it. The SDK never weakens certificate validation.
Responsible disclosure

Report a vulnerability.

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.

Reload the page