Repository navigation
Commit a sample trace and a walkthrough anyone can run, and fix the collector setup - #277
Conversation
…exporter against it bun run sample:trace drives six synthetic steps through a live Guardian (stock policy, one decision delayed past a short timeout) and runs one host audit entry through the converter. The sample shows an allowed call and its linked result, a denial with reasoning, reason codes, policy references and provenance, a Guardian error, a late decision, and an unreachable Guardian. The test checks the sample against otel-mapping.json: span names, required attributes (the converter's span is exempt from gen_ai.tool.name, issue #274), conditional attributes, padding, failure values, and the decision each step was built to produce. It also regenerates the sample and fails when the exporter's output has changed. Signed-off-by: rocklambros <rock@rockcyber.com>
The tree README gains Produce a trace: clone and pin, install, start the Guardian with export on, send steps through the shim, read the spans, convert the host's audit log, and optionally check the output with a real collector. Each step was run as written from a fresh clone. The Guardian and root READMEs link to it. Signed-off-by: rocklambros <rock@rockcyber.com>
The page gains an example: the denied tool call from the committed sample trace, in the OTLP/JSON the exporter writes, with a short guide to what it carries and a link to Produce a trace. A test requires the example to match the sample's span with the same request id, so the page can't drift from what the exporter emits. Signed-off-by: rocklambros <rock@rockcyber.com>
…s own Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
…p loopback spans off a proxy Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
…oopback Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
…ut the collector Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
|
@afogel @bar-capsule, this is the last piece before the lab handoff, and I'd love your eyes on it today if you can spare them. It closes issue #266 (the sample trace and the "Produce a trace" walkthrough) and issue #276 (Bar's four collector and converter finds). It also picks up a few issue #274 items, which are listed under "Beyond issue #276" in the description so you can approve them knowingly rather than by accident. One thing is a real decision for you. The converter's spans now carry I ran the walkthrough from a fresh clone, natively and with the Docker command, and with a deliberately hostile environment. The details are in the description. Please leave comments rather than using "Commit suggestion", because a commit from you would make you the last pusher and cost us an approval. |
bar-capsule
left a comment
There was a problem hiding this comment.
Approving - the four #276 fixes check out, including the Docker command run verbatim.
What changed
This gives anyone a committed sample trace and a walkthrough that goes from a fresh clone to a trace file of their own, and it fixes the collector and converter problems Bar found after PR #244 was approved. The walkthrough now runs the same on a second pass, in a shell with a proxy or hostile
OTEL_*variables set, and with the collector in a container.Which issue does this implement
Closes #266
Closes #276
Refs #274
Beyond issue #276
These come from issue #274 and are resolved here, so please look at them on purpose rather than as part of issue #276:
service.nameacs-reference-audit-converterinstead of the Guardian'sacs-reference-guardian. That is the label shipping in 0.1.4. If you'd rather call it something else, such asacs-reference-host-adapter, a rename can land in 0.1.5. Both READMEs say these labels belong to the reference implementation and are not attribution.OTEL_BSP_*andOTEL_EXPORTER_OTLP_COMPRESSIONno longer change what it exports. A loopback endpoint is added toNO_PROXY, so anHTTP_PROXYcan't route spans meant for this machine through a proxy.OTEL_EXPORTER_OTLP_*HEADERSstill apply because the SDK merges them under anything set in code, and a test pins that so the README stays honest.acs.policy.versionsis emitted with""per reference rather than absent, and the converter runs after the agent session has ended.How it was checked
Every change was premortemed before it was written, built test-first, and reviewed task by task, then as a whole branch.
bun test: 1217 pass, 1 skip, 0 fail on Bun 1.3.14. The exporter tests also pass on Bun 1.3.11, which CI uses.bun run typecheckis clean andbun run conformanceexits 0.uv run pytest: 918 passed, 1 skipped. The docs example on the Trace with OpenTelemetry page still matches the regenerated sample with no edit.f225652underumask 022: allow, deny and result spans, one converter span,.acsatdrwx------, the converter refusing a second run, and identical counts after "Run it again".-rw-------, a send with the collector down printsdisabled after failure, and the collector file stays readable after akill -9.0644inside a0700.acs.HTTP_PROXYproduce the same spans, attributes and labels as a clean run.Rootless Docker, Podman, SELinux hosts and musl-based Linux haven't been verified, and the README says so.
Base branch
integration, because this touches the specification, schemas, a referenceimplementation, an adapter, tests, or CI
Type of change
I tested this
uv run pytest -vpasses on my machineChecklist
git commit -s(required by the DCO)Security
This narrows exposure. Loopback spans no longer go through a proxy, the collector stays on loopback with owner-only output, and the converter can't append into the audit log. The README states the trust boundary: the trace files, the audit log and the collector port are writable by any process running as the user, so the output isn't tamper-evident.