---
title: "Security at Clavem: how keys and credentials are protected"
description: "How Clavem is hosted and how it protects license keys, payment credentials and accounts: Ed25519 signing, encrypted secrets, HTTPS, HSTS and rate limits."
url: "https://clavem.io/security"
---

Security

# Security at Clavem

How Clavem is hosted, how it protects license keys, payment credentials and accounts, and which agreements and audits apply.

How the service is run

## In short

- Every license answer is signed with an Ed25519 key that belongs to the seller’s product, so apps can check a license offline.
- Payment-provider credentials and product signing keys are encrypted at rest with AES-256-GCM.
- Passwords are stored as scrypt hashes. Sessions, API keys and sign-in codes are stored only as hashes.
- The site and the API run on Cloudflare. The database is Neon Postgres in Frankfurt.
- Every connection uses HTTPS with HSTS. The License API, sign-in and the management API are rate limited.

## Where Clavem runs

- One Cloudflare Worker serves the site, the dashboard, the License API and the management API, at clavem.io and api.clavem.io.
- The database is Neon Postgres, hosted on AWS in Frankfurt, reached through Cloudflare Hyperdrive.
- Release files that sellers upload are stored in Cloudflare R2, in Western Europe.
- Email is sent through Resend, from its Ireland region.
- The domain and its DNS are on Cloudflare, with DNSSEC turned on.

Every company that handles data for Clavem, and where, is listed under [sub-processors](https://clavem.io/legal/privacy#processors) in the privacy policy.

## Signed licenses

Each product has its own Ed25519 key pair. The private half is stored encrypted, and the public half goes into the seller’s app. Every answer from the License API carries a token of the form `sgt1.<payload>.<signature>`, signed with the product’s private key. The app verifies it with the public key and may trust the result offline until its refresh date. A license that is valid therefore keeps working when Clavem cannot be reached. See [offline verification](https://clavem.io/docs/offline) for the token and the code that checks it.

## Secrets at rest

- One master key, held as a Cloudflare Worker secret, never in the code or the database.
- A separate key for each purpose is derived from it with HKDF and SHA-256.
- Encrypted with AES-256-GCM: sellers’ Stripe restricted keys and webhook secrets, their Polar, Dodo Payments, Creem and Paddle credentials, and each product’s private signing key.
- Order links and download links are signed with HMAC, and download links are short-lived.

## Accounts and sign-in

- Passwords are hashed with scrypt and a salt for each user.
- A dashboard session is 32 random bytes in a cookie marked HttpOnly, Secure and SameSite=Lax, and only its hash is stored. Dashboard requests that change something must also come from Clavem’s own origin.
- Management API keys are stored as hashes with a visible prefix. A key can be read-only, limited to some products, or set to expire.
- Every table that holds a seller’s data carries the seller’s account, and every query filters on it.
- Buyers sign in to their license page with a 6-digit code sent by email. A code is valid for 10 minutes, works once and stops working after 5 wrong guesses, an address can ask for at most 5 codes an hour, and codes are stored as keyed hashes. Asking for a code gets the same answer for every address, so the page does not reveal who has a license.

## Rate limits and webhooks

- License API: 120 requests a minute per IP address and 60 a minute per license key.
- Sign-in, sign-up and password reset: 10 requests a minute per IP address.
- Management API: 300 requests a minute per API key.
- The License API never reveals whether an unknown key exists in another seller’s account.
- Stripe webhooks are checked against the signing secret of their own endpoint before anything in them is read, and each event is processed once. Each Stripe connection is its own boundary: an event only touches the products and orders of the connection it came in on.

## Transport and headers

- HTTPS only, with TLS 1.2 or newer.
- HTTP Strict Transport Security for one year, including subdomains.
- A content security policy, frame denial, `X-Content-Type-Options: nosniff`, a referrer policy and a permissions policy.

## When something fails

- If the database cannot be reached, the License API answers 503 with a `Retry-After` header, and apps fall back to the last signed token.
- Plan limits never block license checks, or licenses issued from a payment.
- Errors give the caller a stable code and message. Details go only to Clavem’s logs.
- Database changes are additive, so the previous version of the service keeps working if a release is rolled back.

## Agreements and audits

- The data processing agreement for sellers is part of the terms, in [processing on your behalf](https://clavem.io/legal/terms#processing).
- Clavem does not claim any security certification or third-party audit, such as a SOC 2 report or an external penetration test.
- The database runs on Neon, which keeps its recent change history, so it can be restored to an earlier point in time within its restore window.

## Report a vulnerability

If you find a security problem, write to [support@clavem.io](mailto:support@clavem.io) or use the [contact form](https://clavem.io/contact). How personal data is handled is in the [privacy policy](https://clavem.io/legal/privacy).
