Supervisor installers: run any config the server sends; the policy is opt-in with --restricted
What
A packaged host now runs any config the OpAMP server sends: any component, any exporter, any destination, and ${env:...} / ${file:...} references. Today's remote config policy becomes an advanced opt-in.
- Enroll scripts (Linux, macOS, Windows): there's a new
--restricted(-Restricted) flag. Without it, noagent.remote_config_policyis written. With it, the scripts write exactly today's policy.--exporter-endpoint,--log-pathand--host-logswiden a restricted policy, and are refused without--restrictedso nobody thinks they're limiting an open host. - Container image:
supervisor.yamlis open. The newsupervisor-restricted.yamlholds today's policy and is chosen with--config /etc/pydantic-opamp/supervisor-restricted.yaml(the last--configwins). - The enroll scripts now refuse user info in
--endpointthemselves. Before, the derived exporter endpoint check caught it. - Docs: the packages' README ("The restricted policy"), the Supervisor README, getting started, troubleshooting, and a CHANGELOG Breaking line.
Why
Fleet's editor and starter policies use components and exporters outside the old allow-list, for example Datadog with ${env:DD_API_KEY}, or the host log receivers. So a packaged host refused them. The e2e run's blocker #19 was the first symptom. Component allow-listing should be an advanced option, not the default.
Spec vs our choices
- Spec: OpAMP leaves it to the agent whether and how to accept a remote config (
AcceptsRemoteConfig, with the agent reportingRemoteConfigStatusFAILED when it refuses one). Nothing in the spec requires or forbids a local policy. - Our choice: the default is to accept everything the server sends, and
--restrictedis the local limit for operators who want one. The policy engine itself (supervisor/config/remote_config_policy.go) is unchanged.
Security note
On an open host, whoever controls the Fleet project can make the collector read anything its OS user can and send it anywhere. That user is pydantic-opamp on Linux, root on macOS, and LocalSystem on Windows. The packaged README now says so, and points at --restricted.
Tests
go test ./packaging/ ./supervisor/config/passes locally.- New
TestEnrollAllowsAnyConfigByDefault: a host-logs config and a Datadog exporter with an env key both pass on a default host. - New
TestContainerConfigs: the open and restricted image configs. - New refusal cases for the policy options without
--restricted. - Existing policy tests now pass
--restricted. - The Windows script couldn't be run here (no PowerShell), so CI's Windows job checks it.
Generated by Claude Code