Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🗝️

Bring-your-own-key (BYOK) licensing

Updated 2026-11-20
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.

Screenshot — The BYOK Licensing page with the issuer public key to pin and the issued-licenses table
The BYOK Licensing page with the issuer public key to pin and the issued-licenses table

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

  1. 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 header
    The BYOK Licensing page header
  2. 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 form
    The Create an issuer form
  3. 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 verifier
    The info panel showing the public key to pin in your verifier
  4. 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 alert
    The Issue a license form with the one-time license key alert
  5. 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 result
    The validation card showing a Valid result

Examples

Issue a license (API)
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.
Retrieve the issuer public key to pin (API)
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:

FieldMeaning
plan_codeThe plan or tier the license grants.
featuresOptional feature codes enabled by this license.
user_limitSeat count; use -1 for unlimited.
expiry_dateThe date after which the license is no longer valid.
customer_nameThe 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?
In your project's secure secrets vault. The platform signs on your behalf; the private key is never returned to you, your product or your customers.
Do my customers need to be online to use a license?
No. Verification is done against the pinned public key, so your product can validate a license fully offline.
I lost a license key. Can I get it back?
The signed key is shown once at issue time and is not retrievable afterward. Issue a fresh license for that customer instead.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us