On this page
Bring-your-own-key (BYOK) licensing
BYOK licensing lets you custody your own signing key inside Patrii Cloud and issue tamper-evident, offline-verifiable licenses for your product. The private key is created in the secure secrets service and never leaves custody.
You create an issuer, which holds a signing key pair in your project's secure secrets vault. The platform signs licenses on your behalf with the private half, so your key material never leaves custody and is never exposed to your product or your customers.
The public half is yours to publish. You pin it in your product's verifier so it can validate a license entirely offline, without calling home. Because signatures are checked against a key you control, a license cannot be forged or silently altered.
Key concepts
Issuer — A named signing identity backed by a key pair held in your secrets vault.
Public key — The verifiable half of the issuer key; pin it in your verifier to check licenses.
License key — The signed, encoded license string you deliver to a customer. It is shown once when issued.
Plan / features — The plan code, feature list, seat limit and expiry that the signature attests to.
Offline verification — Validating a license against the pinned public key without any network call.
Before you start
- A project with access to the secure secrets service.
- A plan code and the entitlements each license should grant.
- Somewhere to pin the issuer public key in your product.
Step by step
- Open BYOK licensing
Go to Security > Secrets and choose BYOK Licensing at the top of the vault. Licensing is managed in the console or through the API; the Patrii CLI has no licensing commands.
Screenshot — The BYOK Licensing page headerThe BYOK Licensing page header - Create an issuer
Give the issuer a name (usually your product name). The signing key pair is created and held in your secrets vault; the private key never leaves.
Screenshot — The Create an issuer formThe Create an issuer form - Copy the public key to pin
Copy the issuer's public key and embed it in your product's verifier so it can validate licenses offline.
Screenshot — The info panel showing the public key to pin in your verifierThe info panel showing the public key to pin in your verifier - Issue a license
- Fill in the plan code, optional feature codes, seat count, expiry date and customer name.
- Submit to mint a signed license. The license key is shown once, so copy it and deliver it to the customer.
Screenshot — The Issue a license form with the one-time license key alertThe Issue a license form with the one-time license key alert - Test verification
Paste a license key into the validation card to confirm it verifies and reports the expected plan and issuer before you ship it.
Screenshot — The validation card showing a Valid resultThe validation card showing a Valid result
Examples
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
https://api.patrii.cloud/licensing/issuers/<issuer-id>/licenses \
-d '{"plan_code": "pro", "features": ["reports", "api"],
"user_limit": 25, "expiry_date": "2027-01-01",
"customer_name": "Example Inc."}'
# The license_key in the response is shown once: store it now.curl https://api.patrii.cloud/licensing/issuers/<issuer-id>/pubkey # Embed the public_pem value in your product's verifier.
Limits & specifications
What a license attests to:
| Field | Meaning |
|---|---|
plan_code | The plan or tier the license grants. |
features | Optional feature codes enabled by this license. |
user_limit | Seat count; use -1 for unlimited. |
expiry_date | The date after which the license is no longer valid. |
customer_name | The customer the license was issued to. |
Best practices
- Use one issuer per product so you can rotate or revoke trust independently.
- Pin the public key in your verifier and validate offline; never trust a license you did not verify.
- Set an expiry on every license and re-issue rather than extending informally.
- Copy the license key at issue time; it is shown once and cannot be retrieved later.
- Keep the issuer name and plan codes stable so verifiers and reporting stay consistent.
FAQ
Where is my private key stored?
Do my customers need to be online to use a license?
I lost a license key. Can I get it back?
Learn more
Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.