Self-issue the MSP evaluation licence, and fix two things it exposed

The evaluation mode added earlier today was hollow. An unlicensed control
plane starts, but release-build client runtimes only trust entitlement
leases chained to a Pulse-signed licence, so its client workspaces ran
without the capabilities the provider was evaluating. Standing the stack
up proved the portal and the isolation boundary and nothing else.

setup.sh now requests a capped evaluation licence from the licence server
when no licence path is set, sending only the public half of the key it
generated locally. It degrades rather than blocks: a missing key, an
unreachable server, or a licence-free response leaves the install
unlicensed with an explicit warning, an existing licence on disk is
reused, and PULSE_PROVIDER_MSP_SKIP_EVAL_LICENSE skips it for air-gapped
hosts. Guarded with an if-test rather than a trailing true inside the
command substitution, because the derive helper calls die and exit in a
subshell is not a status that can be caught, so setup.sh aborted under
set -e.

Second fix. The lease capability ceiling was selected by licence
presence, so an unlicensed provider control plane fell through to the
Pulse-hosted branch and minted leases claiming relay, mobile and push,
which a provider deployment cannot serve and which previously caused
repeating relay registration failures in client runtimes. The ceiling now
follows hosting via SetProviderHosted. providerChained keeps its narrower
meaning of having a licence available to embed.

Third. Corrects a sentence I wrote into cloud-paid.md this afternoon
claiming msp_eval carries the same MSP capabilities. A plan version
selects the workspace cap; it does not entitle a workspace.

The regression test was negative-tested by reverting the ceiling selector
and confirming it catches relay. All three setup.sh degradation paths
were exercised directly. Licence server side is pulse-pro 7f6a319 and is
not live until the next deploy-license-server run.
This commit is contained in:
rcourtman 2026-08-03 18:10:15 +01:00
parent 9992d98172
commit 9d9f13e7b0
12 changed files with 328 additions and 23 deletions

View file

@ -31,12 +31,16 @@ PULSE_PROVIDER_MSP_ROOT_SPACECHECK_DIR=/var/lib/pulse-provider-msp/spacecheck/ro
PULSE_PROVIDER_MSP_DOCKER_SPACECHECK_DIR=/var/lib/docker/.pulse-provider-msp-spacecheck
CP_TRUSTED_PROXY_CIDRS=172.30.0.0/24
# Licence file. Leave BLANK to evaluate: the control plane runs on msp_eval,
# which is the full product capped at 2 client workspaces, so you can stand
# this up and onboard two real clients without talking to anyone first.
# Licence file. Leave BLANK and setup.sh self-issues a 2-client evaluation
# licence for you, bound to the signing key it generates on this host. The
# private key never leaves the host and you do not have to ask anyone.
#
# Set it to your licence path once you buy. Paid client caps come from the
# licence, never from this file.
#
# PULSE_PROVIDER_MSP_SKIP_EVAL_LICENSE=1 skips the request on an air-gapped
# host. The portal and client isolation still work, but client workspaces will
# not carry MSP capabilities until a licence is installed.
CP_PROVIDER_MSP_LICENSE_FILE=
# Entitlement lease signing key. setup.sh generates this; the private key
# never leaves this host. Your provider MSP license must bind the derived