Commit graph

4 commits

Author SHA256 Message Date
Tyler J King
f4f02b0e2e debug(gsap-attestor): include raw input and both parse errors in diagnostics
Temporary diagnostic commit — surfaces the exact data SPIRE sends to
the Configure RPC so we can determine why JSON decode fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 08:32:16 -04:00
Tyler J King
646944ab2a fix(gsap-attestor): use HCL JSON mode for SPIRE plugin_data parsing
SPIRE's chart renders plugin_data as JSON via reformat-and-yaml2json,
so hclsimple.Decode with "plugin.json" filename triggers HCL v2 JSON
mode. Falls back to native HCL for direct testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 06:49:15 -04:00
Tyler J King
490c813586 fix(gsap-attestor): use spire-plugin-sdk for SPIRE compatibility
The original implementation used hashicorp/go-plugin directly with a
custom handshake, which SPIRE rejected. Switch to spire-plugin-sdk's
pluginmain.Serve() for correct WorkloadAttestor protocol negotiation,
implement ConfigServer for plugin_data parsing, and return selector
values in key:value format (SPIRE infers the type prefix from the
plugin name). Config decoding tries JSON first (chart renders YAML
as JSON) then falls back to HCL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 06:37:37 -04:00
Tyler J King
fe5e2cf3c6 feat(spire): gsap-attestor WorkloadAttestor plugin
SPIRE WorkloadAttestor that reads governance env vars from /proc/{pid}/environ
(walking up the process tree to find gsh) and emits gsap: selectors on workload
SVIDs. Maps BASCULE_* vars set by bascule-shell and future GSH_* vars to the
11-selector vocabulary defined in gsap-types/src/selectors.rs.

- pkg/gsap/selectors.go: shared Go constants mirroring Rust vocabulary
- cmd/gsap-attestor/: plugin implementation with /proc reading, process tree
  walking, capability ceiling translation, and fail-open for non-governed processes
- 28 tests covering selector extraction, proc parsing, tree walking, and depth limits
- Makefile, Dockerfile, deploy config updated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 03:59:08 -04:00