Check-in installs refreshed license key (#58) #60

Merged
Cordy merged 3 commits from feat/checkin-refresh into main 2026-07-29 23:04:52 +00:00
Owner

Closes #58.

The license server now re-signs the same license id on subscription renewal and returns it from /v1/checkin as {status, key}. This PR makes the check-in loop consume that:

  • checkin() parses the 200 body and returns the key alongside ok/revoked.
  • On a successful check-in, installRefreshedKeyLocked installs the key only if it verifies against the embedded public key, carries the same license id as the currently installed license, and isn't expired. Anything else is logged and ignored — a compromised or misbehaving license server can never swap in a different license.
  • Keyless {"status":"ok"} responses (older servers) behave exactly as before.

Tests: install path (seats/expiry/persistence), foreign-id rejection, keyless compatibility. gofmt/vet/build/test green on the runner.

Closes #58. The license server now re-signs the same license id on subscription renewal and returns it from `/v1/checkin` as `{status, key}`. This PR makes the check-in loop consume that: - `checkin()` parses the 200 body and returns the key alongside ok/revoked. - On a successful check-in, `installRefreshedKeyLocked` installs the key only if it verifies against the embedded public key, carries the **same license id** as the currently installed license, and isn't expired. Anything else is logged and ignored — a compromised or misbehaving license server can never swap in a different license. - Keyless `{"status":"ok"}` responses (older servers) behave exactly as before. Tests: install path (seats/expiry/persistence), foreign-id rejection, keyless compatibility. gofmt/vet/build/test green on the runner.
Cordy merged commit 31cc52de60 into main 2026-07-29 23:04:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#60
No description provided.