These behaviors describe products built on the Go library. Products built on the TypeScript library differ. The cache lasts 24 hours. The check applies to every route, health probes included. A rate-limit answer does not extend the number of attempts. The product never reads the
X-Organization-Id header, and it sends the configured organization identifiers to the license service on every check.What a license key is
A license key covers one product and the organization identifiers that you declare for it. A product accepts the key only for those organizations, and only for itself. Store the key as a secret, and keep it out of source control.
What the product reads from the environment
A product that has no organization identifier does not start.
How the check runs
The product sends its own name, the license key and one organization identifier to
https://license.lerian.io. Lerian operates that service. Open outbound HTTPS to that host from every workload that runs a licensed product, or every check fails. A workload that sets IS_DEVELOPMENT to true needs the same rule for https://license.dev.lerian.io.
The product validates at startup, then repeats the check every seven days in the background. It keeps each result in memory for eight days. One attempt waits up to five seconds for an answer. The background refresh makes three attempts, or five attempts when the service reports too many requests. The startup check makes one attempt.
Each request must carry the organization identifier in the X-Organization-Id header, unless you set ORGANIZATION_IDS to global. The product compares the header against ORGANIZATION_IDS, then answers from the cached result or repeats the check. Requests to /health, /version and /swagger/ skip the check.
What each result allows
When the license service does not answer
The product prefers a result it already holds. If the service returns a server error, a product that declares one organization or
global uses the last cached result for that organization. If it holds no cached result, the product continues for seven more days and repeats the check later. A product that declares several organizations does not read the cache on a server error. It continues for seven more days.
If the network fails, a product that declares one organization or global again uses the cached result. If it holds no cached result, the request fails with code LCS-0012. If every configured organization fails for a reason other than too many requests, the product stops. This applies at startup and at every later check.
Error codes
Each failure carries a stable code. The License Manager error list gives every code and the message that comes with it.

