Commit Graph

39 Commits

Author SHA1 Message Date
pulse-triage[bot]
abfe0a6f48 Align Agent Security, Unified Agent, MSP, and Multi-Tenant Help
Align four unclaimed in-app Help guides and their mirrored copies under
frontend-modern/public/docs/ with landed runtime hardening and current
stable release assets:

- AGENT_SECURITY.md and UNIFIED_AGENT.md: document Docker module and
  Windows service monitoring-only ceiling enforcement (rejecting legacy
  update_container and update_all report-response commands and forwarding
  CommandAuthorityProfile, DisableUpdateChecks, and
  DisableRegistryCredentials), signed remote-config enforcement on
  commandsEnabled overrides in report acknowledgements, and Docker/Podman
  oversized report metadata/attachment shedding (2 MiB encoded / 10 MiB
  decoded, 32 KiB -> 4 KiB -> 0 metadata steps, 64 -> 0 port/mount steps)
  plus non-buffered HTTP 413 handling (5590bb7725).
- MSP.md: update the self-service evaluation bundle recipe to the
  published v6.9.0 signed release asset, replace the retired Pulse
  Assistant narrative wording, and document portal membership propagation
  into client workspaces and magic-link owner-seeding limits (70f3b0a3b3).
- MULTI_TENANT.md: document org-bound API token revocation on
  organization deletion and before ID reuse, plus cold non-default
  monitor isolation for requests without an explicit API token
  (f7f5354097).
- Add source-bound doc regression tests in test_stale_reading_help_docs.py,
  test_msp_connection_docs.py, and test_admin_docs.py.

Contract-Neutral: documentation alignment and source-bound doc tests only; no runtime, API, schema, telemetry, or frontend source behavior changes.
Change-source: pulse-maintainer
2026-11-27 20:28:49 +00:00
pulse-triage[bot]
7cbb774059 Align Audit, History, Reverse Proxy, Reporting, and Plans Help with UI
Match docs/AUDIT_LOGGING.md to the shipped Audit Log panel filters
(User, Event, Outcome, and page-local Verification), note that date-range
filters and other event types use the API, point to Settings -> Security ->
Audit Webhooks, and align verification badge labels with Check failed and
Check error. Remove the stale pre-v6.9.0 HTTP 402 range-entitlement
contradiction in docs/METRICS_HISTORY.md so Troubleshooting matches the
free-on-every-plan handler (HTTP 400 for invalid or >365d ranges). Point
docs/REVERSE_PROXY.md at Settings -> Security -> Security Overview and
Settings -> System -> Network -> CORS Allowed Origins, and include the
parent Settings groups in docs/AI.md, docs/MSP.md, and docs/PULSE_PRO.md
for Settings -> Support -> Data & Reports and Settings -> System ->
Plans & Billing.

Sync all six shipped frontend-modern/public/docs mirrors and add
source-bound regression tests in scripts/tests/.

Contract-Neutral: Aligns in-app Help prose and doc tests with existing shipped UI routes, settings navigation, audit verification labels, and free metrics-history behavior with no runtime, API, or permission contract delta.
Change-source: pulse-maintainer
2026-11-26 23:33:23 +00:00
rcourtman
f5dd8d276f Stop auto-granting VM.GuestAgent.FileRead in PVE 9+ setup
Proxmox cannot restrict VM.GuestAgent.FileRead to /proc/meminfo, so granting it on / via PulseMonitor gave every Pulse PVE token arbitrary guest file-read access as qemu-guest-agent (typically root) across all QGA-enabled VMs. Remove it from all four PVE setup surfaces (proxmox_setup.go, install.sh, setup_script_render.go including Setup Doctor, and Settings manual commands), extend optional /proc/meminfo HTTP 403 backoff to 30 minutes matching APT 403 handling, and document the risk and role-tightening command for existing PVE 9+ installs.
2026-11-23 16:36:10 +00:00
rcourtman
10147ee322 Keep the public-address rule for old MSP client runtimes
Client runtimes from v6.7.0 or earlier still renew their lease over the
host network, so DOMAIN must be public for them until they are rolled
forward. The v6.8.0 guide rewrite dropped that sentence, which
TestProviderMSPRuntimeImageDeclaresPrivateLeaseRenewal requires.

Contract-Neutral: Restores a guide sentence the pin change dropped; no contract delta
2026-11-14 20:50:07 +00:00
rcourtman
b7896d4ad3 Pin the MSP evaluation guide to v6.8.0
v6.8.0 shipped on 13 November with the certificate email fix (3854),
the Open client handoff (3875), the lease fallback (3874) and the trial
address (3991). Its published provider bundle was installed by the
evaluator path on a fresh Ubuntu 24.04 host on 14 November, including a
client added with no licence opening on Community and regaining its MSP
capabilities by itself once the licence returned.

Move the pin to v6.8.0, make the domain optional in the host
requirements, describe setup's up-front prompts, and drop the v6.7.0
traefik.yml workaround and the "bundles newer than" qualifiers. The guide
test now refuses the workaround and the old pause text.

Contract-Neutral: MSP guide pin moves to the published v6.8.0 bundle; no contract delta
2026-11-14 19:53:01 +00:00
courtmanr@gmail.com
d7cc9b90dd Stop implying a provider can manage client users or audit
The guide's first paragraph listed users and audit history among what a
client runtime holds. A provider opening a client can't reach either, so
the line read as a feature. It now lists what a provider can use there.

Contract-Neutral: Provider guide wording only; no behaviour or contract change
2026-11-06 14:36:06 +00:00
courtmanr@gmail.com
2fef69f571 Say what the MSP bundle does in the provider guide
The guide told providers to split the UI and agent check-in onto separate
ports and to prove it with a 404 check, but the bundle serves both on one
address and publishes only 80 and 443. It now says so and scopes the split
to installs that have it.

Providers also had no warning that a backup leaves out .env, which holds
the signing key their licence is bound to, or that a client runtime can't
reach the private-address allowlist or Apprise command-line delivery.

Contract-Neutral: Provider guide corrected to match the bundle; no behaviour or contract change
2026-11-06 01:50:32 +00:00
rcourtman
ae8e424997 Let MSP setup run without a domain or DNS token
Trying the provider bundle meant owning a domain, a Cloudflare account
and an API token first, which stopped people evaluating it on a cheap
public server.

With no token, setup now requests per-client certificates over HTTP-01.
With no domain, it uses pulse.<ip>.sslip.io and labels the install
trial-only: that name shares one Let's Encrypt allowance, and agents
hard-code the address, so moving to a real domain means reinstalling
them. Blank settings keep today's DNS-01 behaviour.

Per-client certificates arrive after a client turns healthy, and Traefik
does not retry a failed validation by itself. Handoff therefore holds on
a wait page until the certificate is served, and restarts the ingress
with a growing backoff if it stays missing. Setup now explains port 80
and shared-limit failures in plain words.
2026-11-05 23:26:49 +00:00
courtmanr@gmail.com
1d7911fc83 Let provider MSP clients fall back instead of locking
/msp and the guide promise that without a valid lease a provider's clients
fall back to Community behaviour and core monitoring keeps running. In fact
the hosted gate treated them as Pulse Cloud subscribers and returned 402. A
client whose container could not renew its one-day lease locked about a day
after creation, licensed or not: private-address DNS, the runtime's refusal
of private addresses, no NAT hairpin or a filtering firewall all do it.

The control plane now marks its clients, and a marked runtime opens the
workspace it was provisioned for. Capabilities still come only from a
verified lease, and organization routes and further organizations stay
gated, so nothing paid is granted. Pulse Cloud keeps the 402.

Renewal also stops depending on the host's network. Traefik answers the
portal's name on a client's isolated network, and a runtime with a configured
control plane accepts that private address. Older runtimes refuse private
addresses and upgrade.sh leaves them in place by default, so the name is
given only to runtimes whose image declares they can use it.

Checked on a lab VM with a release-tagged build and a private-address domain:
a client with an expired lease renewed; one created with no licence opened and
accepted an agent report.
2026-11-04 10:54:41 +00:00
courtmanr@gmail.com
1ee2c5410a Let provider MSP installs obtain their TLS certificate
Every provider MSP bundle so far mounted traefik.yml as Traefik's static
configuration, with admin@example.com as the ACME contact, and set the
real ACME_EMAIL and ACME_DNS_PROVIDER through TRAEFIK_* variables.
Traefik reads static configuration from one source and the file wins,
so the variables were ignored. Let's Encrypt refuses example.com, so no
install could obtain a certificate, and the portal and every client
address refused TLS. Lab walkthroughs used a self-signed override and
never saw it. Reproduced on a fresh Ubuntu 24.04 VM with a clean ACME
store.

The static configuration now lives in compose command flags filled from
.env, and traefik.yml is gone from the bundle, the install lists and the
release check; setup and upgrade remove an installed copy. On the same
VM the real email registered and ACME_DNS_PROVIDER=route53 reached its
provider.

Setup also stops claiming success while the portal is unusable. It waits
for a certificate covering *.DOMAIN, stops at Traefik's ACME error, says
in plain terms whether the email, the Cloudflare token or DNS is at
fault, and prints the .env edit and retry. The guide carries a one-line
workaround for the v6.7.0 bundle it still pins.
2026-11-03 21:03:27 +00:00
courtmanr@gmail.com
77a6e8b29b Ask for MSP first-run values before installing anything
Through v6.7.0, provider setup installed Docker and then stopped, asking
the provider to edit a root-only .env from a second SSH session and press
Enter. It now asks for DOMAIN, ACME_EMAIL and the Cloudflare token first
(the token without echo), so the long install runs unattended, and an
unattended run can pass them as PULSE_PROVIDER_MSP_DOMAIN,
PULSE_PROVIDER_MSP_ACME_EMAIL and PULSE_PROVIDER_MSP_CF_DNS_API_TOKEN.
Only a new .env is seeded, created 0600, and each value is limited to
characters that compose and set_env_value read literally. Leaving one
blank keeps the old edit-and-continue path for other DNS-01 providers.

Setup names the DOMAIN and *.DOMAIN records the certificate needs, and
its next-step commands carry sudo because .env is readable by root only;
without it the printed bootstrap command fails for a non-root operator.

The guide chains the bundle download, signature, checksum, extraction
and setup with &&. As separate lines, a pasted block carried on to
extract and run setup.sh as root after a failed verification. It also
names both DNS records, the token's Zone Read and DNS Edit permissions
and the tested host size.
2026-11-03 16:01:36 +00:00
courtmanr@gmail.com
783c23d0ba docs(msp): stop promising overlapping subnets route themselves
The MSP guide said overlapping RFC1918 subnets across clients never
collide because each workspace dials only its own tunnel addresses.
Every client runtime leaves through the provider host's routes, so two
clients on 192.168.1.0/24 still need distinct addresses from the
provider side. A provider who relies on the claim finds the second
client unreachable. The guide now keeps the true part (identical
addresses stay apart in each client's data) and names the fix, a NAT
mapping per tunnel. The published docs copy matches.

Contract-Neutral: MSP guide wording correction; the deployment-installability contract does not state the overlapping-subnet claim and no install behaviour changes
2026-11-03 11:46:18 +00:00
rcourtman
40a1f765b8 Install MSP evaluations from the v6.7.0 provider bundle
The setup guide pinned v6.6.0, which has the first-client agent bug: a
token minted in a fresh client workspace's own UI lands in that tenant's
token store, and the agent is then rejected before auth is configured,
so the first client shows no data. The fix (#3268) shipped in v6.7.0.

The v6.7.0 release carries the versioned provider archive, checksum and
SSH signature; the guide's own verify steps pass against it and its
.env.example pins the published v6.7.0 control-plane and runtime images.
The /msp page sends new providers to this guide, so it has to install
the release that works before that page goes live.
2026-11-02 10:36:52 +00:00
pulse-triage[bot]
bdc42cf341 Keep provider connection setup within intended trust and access
Distinguish workspace runtime reachability from Docker-host reachability, first-seen certificate capture from independent trust, and baseline API monitoring from optional guest reads. Explain generated root-scope ACL changes before execution without making setup or broader access a troubleshooting requirement. Preserve the recent signed-bundle, upgrade and self-serve buying guidance.

Contract-Neutral: Documentation and registered documentation safety tests only; no runtime, API, TLS, permission or setup contract changes.
Change-source: pulse-maintainer
2026-10-30 05:41:34 +00:00
rcourtman
e138bdf7d6 Point the MSP guide at v6.6.0 and self-serve buying
Every /msp evaluation link opens docs/MSP.md, which still installed the
v6.4.1 bundle and said paid licences come through an assisted upgrade
path. Plan in the provider portal has sold every MSP plan since v6.5.0,
so a provider following the site could never reach it.

The guide now installs the signed v6.6.0 bundle, explains buying,
renewing and lapsing from Plan as shipped (paid period plus 14 days,
then 7 days of grace), and adds an upgrade section. Walking it on a lab
VM found three more gaps, now covered: day-2 commands need sudo because
setup writes a root-only .env; client runtimes move only with
--rollout-tenants; and a v6.4.x control plane keeps stopping clients,
which blocks the upgrade gate until it is stopped and the current
runtimes are started. No plan exists above 40 clients, so the guide no
longer offers a custom licence for that.
2026-10-25 12:59:11 +00:00
pulse-triage[bot]
00f3f0dc89 Align report help and scope proofs with narration spending permissions
Keep generation's read scope distinct from the ai:execute permission needed for single-resource and fleet PDF narration. Preserve the bounded PR2836 runtime guard unchanged, mirror the canonical API/MSP help into shipped assets, and record the actual contract including token-triggered versus server-run schedules. Replace the old unconditional-POST source assertion with both method and spending-scope checks, and cross GET with all five caller types. The production Docs browser fixture checks the public guidance on desktop and touch phone without API requests or mutations.

Change-source: pulse-maintainer
2026-10-11 19:10:36 +01:00
rcourtman
8a99b16d6c docs: correct customer docs that drifted from the source
Audited the customer-facing docs against the code: about 5,200 concrete
claims (env vars, endpoints, flags, defaults, ports, UI labels), plus every
environment variable the code reads. Each discrepancy was re-verified
against the source before editing, and every edit was reviewed again.

What users would have hit following the old text:
- UI paths and labels that no longer exist (Settings > Relay, Platform
  connections, Access Control, SSO Providers, Create Organization) and
  Patrol mode names (now Ask first, Safe auto-fix, Autopilot).
- Wrong values and behaviour: LOG_MAX_AGE=0 does not disable cleanup,
  Patrol evidence budget is 10 calls and 12 turns, ALLOW_UNPROTECTED_EXPORT
  covers private networks too, PULSE_AUDIT_ASYNC defaults on.
- Agent install: install.sh ignores PULSE_ENABLE_KUBERNETES and
  PULSE_ENABLE_PROXMOX, rejects --disable-auto-update, and the token
  fallback lives in the state directory.
- API: audit endpoints answer 402 on Community, onboarding QR is GET,
  type=container is rejected, several routes need admin plus a scope.
- HTTP_REDIRECT_PORT was not documented anywhere.

Docs are mirrored under frontend-modern/public/docs, so each change is
applied to both copies. The tests that pinned the old wording (including
three that asserted claims the code contradicts) are updated alongside.

Contract-Neutral: Customer docs corrected to match shipped behaviour; no runtime, API or contract change.
2026-10-11 13:59:56 +01:00
rcourtman
9bd1b6e582 Let only POST narrate single-resource reports with Pulse Assistant
GET /api/admin/reports/generate resolved the tenant's AI narrator, so a
PDF requested with GET made a paid provider call and appended a usage
event to the AI cost ledger. GET passes the demo-mode guard and the
CSRF check, and a SameSite=Lax session cookie rides a cross-site
top-level GET navigation, so a link could spend a signed-in admin's AI
budget.

POST with a JSON body, decoded with the generate-multi rules, is now
the canonical single-resource transport and the only one that may use
the AI narrator. The settings UI sends it, following a new
performanceReport.singleResourceMethod catalog field; a catalog without
the field, and the legacy fallback catalog, keep the GET transport that
older backends accept. GET stays available with the same query
parameters but narrates deterministically, printing a note in place of
the "Configure Pulse Assistant" tip, and other methods get 405 with
Allow: GET, POST. GET also stops resolving the AI service at all: it
reads Patrol findings through a new ExistingAIService lookup, because
GetAIService constructs a tenant service on first use and that can list
provider models or start background discovery. The router's reporting
wiring moves into wireReportingAIResolvers so a test can drive it.

Keeping GET rather than answering 405 avoids breaking documented API
scripts (MSP.md pointed providers at it) for no security gain: CSV is
never narrated and GET no longer reaches the provider.
2026-10-07 21:00:34 +01:00
pulse-triage[bot]
5e6d5af3b5 Make MSP isolation checks credential-safe and TLS-verified
Replace inline token arguments and certificate bypasses with private header files and verified HTTPS. Bound the read-only probes, discard bodies, preserve failed curl exits and distinguish an invalid token from a checked tenant boundary. Keep the shipped guide byte-synchronised. Exercise copied commands with a synthetic TLS peer, private-header canaries, hostile curl configuration and refusal/redirect controls; no customer endpoint is used.

Contract-Neutral: Existing diagnostic guidance and regression coverage only; no runtime, public API, token scope or tenant-isolation contract change.
Change-source: pulse-maintainer
2026-10-04 20:20:06 +01:00
pulse-triage[bot]
37d1874904 docs(msp): verify published evaluation bundle guidance
Replace obsolete v6.2.1 guidance using retained signed v6.4.1 delivery and payload evidence. Limit privacy claims to the evaluated licence request, synchronize the shipped guide, and adapt the registered deployment regression and contract without claiming installed onboarding acceptance.

Change-source: pulse-maintainer
2026-09-09 20:23:20 +01:00
rcourtman
eecf45fafd Email the Patrol weekly summary as a report schedule kind
The customers most likely to lapse are the ones who stopped opening Pulse,
so the in-app "This week" card cannot reach them. Report schedules gain a
kind: the default resources kind is the existing PDF or CSV performance
report, and patrol_digest emails the same weekly "what Patrol did for you"
rollup the Patrol page shows, in plain language, for the whole workspace.
It reuses the existing scheduler, cadence, recipients, tenant email config,
and Pro advanced-reporting entitlement rather than adding a second
scheduler. Digest schedules are weekly and email-only; the server fixes
scope, format, and attachments, and a run with no AI service, no Patrol, or
no email destination records a last_error that names the missing piece
instead of sending an empty week. Nothing is written to disk.

The digest assembly moves from the HTTP handler into
AISettingsHandler.BuildPatrolDigest so the schedule runner and the
endpoint share one code path. docs/MSP.md documents the kind for
providers; the Settings > Reporting "Report type" selector follows in a
separate change once it has a Pro-licensed browser pass.
2026-09-02 11:15:22 +01:00
rcourtman
c17664b3da Distinguish MSP evaluation issuance from readiness 2026-08-11 14:50:47 +01:00
rcourtman
9449a6909e Make provider MSP evaluation activation attributable 2026-08-11 14:27:29 +01:00
rcourtman
fbee92614a fix(release): restore verifiable MSP evaluation delivery 2026-08-08 01:04:07 +01:00
rcourtman
4885c378aa Keep the operator .env out of the Traefik container and unhardcode the DNS-01 provider
Traefik took the whole operator .env via env_file, so the internet-facing
container's environment carried CP_ADMIN_KEY and the entitlement signing
private key, neither of which it needs. It now receives only ACME/DNS
material: the CF token by explicit passthrough plus an optional
dns-credentials.env that setup.sh creates 0600.

The same wiring removes the silent Cloudflare-only narrowing: the resolver
provider is now ACME_DNS_PROVIDER (default cloudflare) via Traefik's env
override, the CF token is required only for the default provider, and any
other Traefik dnsChallenge provider supplies its credential variables through
dns-credentials.env. Pinned by
TestProviderMSPTraefikEnvIsMinimalAndDNSProviderOverridable; contract delta
in deployment-installability.
2026-08-07 10:47:13 +01:00
rcourtman
6b76443455 Give the MSP evaluation docs their missing download step
The Start free button on the MSP page lands on this section, which described
the self-issued licence but never said how to obtain the bundle. The natural
guess, the latest stable tarball, ships a setup.sh that predates the
evaluation flow and dies asking for a licence. Point evaluators at main and
state the host prerequisites, which were documented nowhere in this guide.
2026-08-07 10:10:51 +01:00
rcourtman
9d9f13e7b0 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.
2026-08-03 18:14:05 +01:00
rcourtman
6be2af1c19 Let providers evaluate MSP without asking permission first
Two mandatory round-trips stood between an interested MSP and their first
screen, and neither was technical.

setup.sh required four image digests shipped as literal <pin>
placeholders, so the only way to get them was to ask. All four images are
publicly readable, so there was never anything to hand out. setup.sh now
resolves each blank pin to an immutable digest from its published tag via
buildx imagetools and writes it back to .env; hand-set values are left
alone.

setup.sh then died outright without a licence file, so nobody could start
the stack, create a workspace, or see the portal until a human minted a
licence for them. The control plane already ran unlicensed via
ProviderMSPPlanSourceEnvFallback; only the installer refused. A licence
path that is set but missing is still a hard failure, since that is a
misconfiguration rather than a choice.

Unlicensed now means evaluation rather than the cheapest paid tier. The
env fallback defaulted to msp_starter, handing every unlicensed
deployment the full 5-client Starter allowance and leaving no boundary
between evaluating and buying. Adds msp_eval at 2 workspaces: same
capabilities, smaller cap, not purchasable, not on the public ladder.

An isolation guarantee is the one claim a provider cannot evaluate from a
screenshot, and both MSP leads this year went quiet at exactly this step.

Contracts: cloud-paid records the unlicensed plan rule and the
strictly-below-paid invariant; deployment-installability records
credential-free, correspondence-free installability.

Verification: TestMSPEvalCapStaysBelowCheapestPaidTier,
TestCanonicalizePlanVersion_MSPEval,
TestProviderMSPSetupScriptSupportsUnlicensedEvaluation. The last was
negative-tested by reintroducing a <pin> placeholder and confirming it
fails. ensure_image_pins exercised against the live registries.
licensing, cloudcp, control-plane and installtests all green.
2026-08-03 16:31:24 +01:00
courtmanr@gmail.com
672db9113f feat(branding): customize application identity 2026-07-30 16:25:36 +01:00
rcourtman
c41edb65a0 Fix agent command channel admission 2026-07-24 13:00:03 +01:00
rcourtman
5b4365853d Correct stale Settings/Alerts nav labels in user docs
Rename doc references to settings/alerts items that were renamed in the
shipped v6 IA, verified against current settingsNavCatalog.ts and
i18n/messages.ts:
  Settings > Relay             -> Settings > Remote Access
  Settings > Plans             -> Settings > Plans & Billing
  Settings > Security > Webhooks -> Settings > Security > Audit Webhooks
  Alerts > Notification Destinations -> Alerts > Notifications
  Settings > Reports           -> Settings > Data & Reports

Derived from the docs-rot audit; pure label renames only. Flow/route
rewrites (retired standalone pages, TrueNAS/Nodes relocation, i18n
copies) held for a supervised pass.
2026-07-13 13:47:13 +01:00
rcourtman
0e40ec07cb Make the provider MSP portal honest and self-sufficient without an email provider
Exercised the full provider portal as a pilot MSP would and fixed what
made it feel broken:

- The signed-out portal promised "a sign-in link is on the way" even when
  the control plane has no email provider (the bundle default), and team
  invitations silently sent nothing. The portal bootstrap now carries
  email_sign_in_available and provider_hosted_mode; the sign-in page shows
  the host command that actually prints a link, and the invite panel says
  invitation emails are not sent and how to hand over a link instead.
- New "provider-msp portal-link --email" CLI mints a one-time portal link
  for an account member or pending invitee, so teammates can sign in at
  all on email-less installs (bootstrap only covers the owner).
- Portal sessions were fixed at 12h; CP_SESSION_TTL now configures them
  and provider-hosted MSP mode defaults to 7 days.
- Creating a client past the license cap showed a generic "Failed to
  create workspace." toast: the limit error is now a JSON payload with
  current/limit, the API client no longer drops non-JSON error bodies
  (double body read), and the toast explains the license limit.
- Copy polish: provider-mode sign-in intro (no refunds/privacy register),
  least-privilege default invite role, queue tile label matches "Client
  onboarding", softer Support tab with a docs/MSP.md pointer, setup.sh
  summary now prints the bootstrap next step and day-2 sign-in commands,
  .env.example and docs/MSP.md document portal sign-in and sessions.

Contracts updated (cloud-paid, api-contracts, deployment-installability,
security-privacy) with verification pins in tenant_handlers_test,
config_test, magiclink_test, and provider_msp_deploy_test.

Verified live against a dockerless control plane: portal-link for an
invitee redeems, promotes the invitation, and sets a 7-day session;
the at-cap toast shows the license copy; portal vitest suite and
cloudcp/auth/account/installtests Go suites pass.
2026-07-10 11:22:57 +01:00
rcourtman
4382919447 Add MSP report scheduling and alert rollup 2026-07-07 20:37:18 +01:00
rcourtman
3229ed5bd1 Document connecting client Proxmox/PBS over the provider VPN in MSP.md
Polling direction (provider to client site, 8006/8007) versus agent
check-in direction, per-client steps with the guided pveum setup command,
privilege-separated token caveat, TOFU certificate pinning, and the
overlapping-RFC1918 note that container-per-client isolation makes moot.
2026-06-10 14:35:14 +01:00
rcourtman
a17882458a Rename CP_TRIAL_ACTIVATION_PRIVATE_KEY to CP_ENTITLEMENT_SIGNING_PRIVATE_KEY in the provider MSP bundle
The variable signs hosted entitlement leases; the trial-activation name is
left over from the retired trial era and reads as trial machinery to an
operator generating their licensing root key. The provider MSP bundle has
no installed base yet, so the canonical rename is free today and frozen
the moment the first design partner installs.

- Control plane reads CP_ENTITLEMENT_SIGNING_PRIVATE_KEY first and falls
  back to CP_TRIAL_ACTIVATION_PRIVATE_KEY, so existing Pulse-hosted cloud
  deployments (deploy/cloud, hibernated snapshot) keep working unchanged.
- deploy/provider-msp (.env.example, compose, setup.sh), MSP.md, and the
  install-test pins use the canonical name; error messages name it too.
- deploy/cloud intentionally keeps the legacy name: that stack historically
  signed hosted trial activations, and its snapshot predates the rename.
2026-06-10 14:08:52 +01:00
rcourtman
2482d4acb6 Document provider-MSP deploy bundle as canonical install; surface lease signing public key in setup.sh
- MSP.md now leads with deploy/provider-msp/ (compose stack, setup.sh,
  upgrade.sh, run-install-proof.sh), documents the HTTPS requirement
  (__Host- portal session cookie) and the pulse.provider-msp.role labels
  workspace provisioning requires, and explains the licence/lease chain
  including licence-expiry behavior.
- setup.sh derives and prints the lease signing public key the provider
  MSP licence must bind (also via --print-lease-signing-public-key), and
  the missing-licence error now includes it with request instructions.
- .env.example documents the CP_TRIAL_ACTIVATION_PRIVATE_KEY binding.
2026-06-10 14:00:11 +01:00
rcourtman
96001d134e Harden MSP tenant isolation: scope org-bound tokens away from default org, propagate webhook allowlist to all tenants
Two gaps found by exercising the MSP pilot path live on a throwaway
multi-tenant instance:

1. CheckAccess granted any authenticated principal access to the default
   org, so a token bound to a client org could read the provider's own
   default-org estate if it leaked from a client site. Org-bound tokens
   now fall through to the explicit binding check for the default org;
   authenticated users and legacy unbound tokens keep default-org access,
   and binding "default" explicitly still grants it.

2. The webhook private-target allowlist (instance-wide system setting)
   only ever reached the default org's notification manager on
   startup/reload, and only the request-context org on settings update.
   Tenant orgs' webhooks to private targets (per-client Gotify over VPN,
   the canonical MSP alert route) failed SSRF validation with no org-side
   remedy, and any allowlist died with a restart. Settings updates and
   reloads now fan out to every live tenant manager via the new
   MultiTenantMonitor.ForEachMonitor, and tenant monitors inherit the
   persisted allowlist and public URL at creation.

Both fixes verified live: org-bound token vs default org returns 403;
client-org webhooks to a private target succeed after restart and for
orgs created after the allowlist was saved. MSP.md validation checklist
gains the default-org probe and the allowlist guidance; MULTI_TENANT.md
documents the binding semantics. Contracts updated for api-contracts,
security-privacy, and monitoring with adjacency notes for
agent-lifecycle, storage-recovery, and performance-and-scalability.
2026-06-10 11:37:39 +01:00
rcourtman
cbd0311055 Inject workspace display name into hosted tenant runtime env
Hosted tenant containers received PULSE_TENANT_ID but not
PULSE_TENANT_NAME, so alert webhook payloads from provider-hosted client
runtimes fell back to the raw tenant ID instead of a human-readable
workspace label. Resolve the display name from the tenant registry at
container-create time via a ManagerConfig resolver and stamp it
alongside the tenant ID. Display-name changes after creation apply on
the next runtime rollout, which recreates the container with freshly
resolved env.
2026-06-10 11:13:37 +01:00
rcourtman
26c7ca910c Document the MSP delivery surface: webhook contract, PSA samples, provider ops guide
- WEBHOOKS.md: stable Delivery Contract section (alert/resolved events,
  two-level severity model, alert types, tenant identity fields, retry
  layers, X-Pulse-Event-ID idempotency, signingSecret HMAC verification
  with a receiver example), plus full PSA sample payloads for critical,
  warning, and resolved events and ConnectWise mapping guidance.
- New MSP.md provider operations guide: deployment models, split-port
  ingress topology with firewall baseline, a no-host-jump validation
  checklist (agent port 404s, agent-token scope rejection, cross-tenant
  403 probe), per-client alert routing and reports, branding scope per
  deployment model, licensing and limits.
- docs index links the new guide.
2026-06-10 10:44:34 +01:00