Files
Pulse/internal/api
rcourtman e9198b0213 Limit agent-token auto-register to the token's recorded source
/api/auto-register accepts agent:report tokens so a Proxmox agent can
refresh the API token Pulse holds for its own node when that connection
stops working. Every monitored host holds such a token, including
Docker-only and Kubernetes-only hosts, and nothing an agent says about
itself (serverName, candidate addresses, its bound hostname, which a
command-enabled agent may rebind) proves which connection is its own.

The proof is the install grant. An admin-issued, first-host-bound,
expiring grant may still adopt or create a source, and spending it
records the connection address on the token. Without an available grant,
an agent token may now refresh the credentials of an existing PVE or PBS
connection, or a cluster member, only at that recorded address, and the
stored address and TLS pin stay as they are. Anything else is a 403 that
changes nothing. The registration check reports canRegister on the same
terms, so an agent does not rotate a credential it cannot register.

Setup-token registration and install-grant creation and adoption are
unchanged. An agent whose token never spent a grant keeps its current
connection instead of replacing it; reinstalling the agent from a fresh
install command, or re-running the node setup, refreshes it.

The handler also stops logging the raw request body when auto-register
or auto-unregister JSON fails to parse, and logs its size instead.

Contract-Neutral: authorization fix inside /api/auto-register; request and response shapes unchanged; api-contracts records the rule
2026-11-09 21:11:23 +00:00
..
2026-10-11 22:20:25 +01:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-08-31 19:47:01 +01:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-04-26 17:26:16 +01:00
…
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-09-01 01:02:17 +01:00

Internal API Package

This directory contains the API server implementation for Pulse.

Important Note About frontend-modern/

The frontend-modern/ subdirectory that appears here is:

  • AUTO-GENERATED during builds
  • NOT the source code - just a build artifact
  • IN .gitignore - never committed
  • REQUIRED BY GO - The embed directive needs it here

Frontend Development Location

👉 Edit frontend files at: ${PULSE_REPOS_DIR}/pulse/frontend-modern/src/

Why This Structure?

Go's //go:embed directive has limitations:

  1. Cannot use ../ paths to access parent directories
  2. Cannot follow symbolic links
  3. Must embed files within the Go module

This is a known Go limitation and our structure works around it.