Direct OTLP to an edge NATS leaf
The normal OTLP add-on path is the agent-to-gateway relay. It does not need a
NATS credential on the agent. Use this procedure only when an operator has
deliberately selected output.backend = "jetstream" for an add-on assigned to
an active, connected EdgeSite with a registered leaf URL.
Direct access uses a short-lived certificate issued through the authenticated
agent gateway. The certificate and private key are encrypted in CNPG and are
materialized only in the running add-on. The base agent bundle never contains
these values or a NATS .creds file.
Lifecycle
-
Select the EdgeSite in the add-on assignment and save the direct JetStream configuration. The assignment remains
pending. -
Issue the assignment identity:
mix serviceradar.edge.direct_leaf issue --assignment-id <assignment-uuid>The command prints status and generation metadata only; it never prints certificate or key material.
-
Download a fresh bundle from the EdgeSite admin page. The generated
nats-leaf.confcontains the assignment certificate identity and its exact OTEL publish, stream-management, and request/ack subject permissions. The bundle does not contain the add-on certificate or key. -
Install the bundle on the leaf and let
setup.shvalidate and restart thenats-serverservice. Verify the service is healthy before continuing. -
Mark the exact issued generation ready:
mix serviceradar.edge.direct_leaf mark-ready \--assignment-id <assignment-uuid> --generation <generation>Only a matching
pendinggeneration with all encrypted identity fields can transition toready. The next agent configuration poll can then receive the add-on-scoped mTLS material.
Rotation and revocation
Issuing again advances the generation, revokes the predecessor through the
gateway, and returns the new assignment to pending. Regenerate and reinstall
the leaf bundle before marking the new generation ready.
To disable direct access, switch the assignment back to gateway relay or run:
mix serviceradar.edge.direct_leaf revoke --assignment-id <assignment-uuid> --reason "direct output disabled"
After revocation, regenerate and reinstall the EdgeSite bundle so the old certificate-CN authorization is removed from the leaf as well.
The leaf's upstream account credentials remain a leaf-to-platform concern; they are not delivered to the base agent or to the OTLP add-on.