docs: adds initial spec and plan for export functionality#431
docs: adds initial spec and plan for export functionality#431gvauter wants to merge 1 commit intocomplytime:mainfrom
Conversation
huiwangredhat
left a comment
There was a problem hiding this comment.
@gvauter Thanks for your PR. The core logic LGTM. It's a solid implementation of the proposed plan. I’ve tagged a few minor nits and my questions.
| backends (Loki, S3) and reporting tools (Hyperproof). | ||
|
|
||
| - **ProofWatch**: A Go instrumentation library | ||
| (`github.com/complytime/complybeacon/proofwatch`) that |
There was a problem hiding this comment.
Nit: This library link is outdated.
| An auditor needs to verify that compliance evidence in the | ||
| downstream reporting system traces back to the original | ||
| scan. The evidence exported by complyctl via ProofWatch | ||
| carries integrity attributes (assessment IDs, timestamps, |
There was a problem hiding this comment.
I am not sure that Assessment IDs, timestamps, and Evaluator Identity could provide a sufficient Chain of Custody. To satisfy a rigorous audit, we should ensure the evidence is immutable and verifiable. Do we need to include a cryptographic hash in the results?
There was a problem hiding this comment.
Hey Sophia - this is a good question, perhaps we can table it for now and discuss more with @jpower432 to understand the chain of custody in more detail.
| reports back the number of records exported and any errors. | ||
|
|
||
| **Why this priority**: At least one plugin must implement | ||
| export for the feature to be usable. The OpenSCAP and AMPEL |
There was a problem hiding this comment.
Just a question: are both OpenSCAP and AMPEL being developed in parallel, or will AMPEL be the first plugin to support export?
There was a problem hiding this comment.
I'm not sure which would be first, but perhaps AMPEL would be easiest to start with here?
|
|
||
| - Q: Where does collector endpoint and authentication | ||
| configuration live? → A: `complytime.yaml` top-level | ||
| `collector` section with `endpoint` and `auth` fields. |
There was a problem hiding this comment.
The authtoken could be generated by the client ID and client secret dynamically, so do we need to add the two input fields?
There was a problem hiding this comment.
This is a good callout @huiwangredhat. I would think the token would generated dynamically with the client_id, client_secret, and token_endpoint, right? Then complyctl does the handshake and passes the temporary access token to the plugin which they include in the request headers along with some plugin specific identifier.
There was a problem hiding this comment.
@jpower432, Oh, yes, that's right. We also need the token_endpoint.
There was a problem hiding this comment.
Ok thank you, I've updated this in the spec.
| 6. Display terminal summary: | ||
| PROVIDER EXPORTED FAILED STATUS | ||
| openscap 47 0 ✅ | ||
| ampel 5 0 ✅ |
There was a problem hiding this comment.
Does it show the friendly error message if the status is FAILED?
There was a problem hiding this comment.
updated FR-008 to require that the plugin's error message is displayed below the summary table when failures occur
|
|
||
| ## Summary | ||
|
|
||
| Add a `complyctl export` command that orchestrates evidence |
There was a problem hiding this comment.
Should we make this a required feature of every plugin? Seems like it would be lightweight if it were optional. Could this be an optional "output" of complyctl scan instead?
There was a problem hiding this comment.
@jpower432 I have no strong opinions on making it mandatory. I can't think of a plugin where we wouldn't want the evidence exported. Are you thinking we should drop the export command and instead have scan handle the export? I guess this depends how coupled we want those workflows to be? A few possible thoughts
- initial users may not have the collector components running, so exporting isn't something they would want to happen by default (making them use
--skip-exportor similar flag) on every scan - a user may want to inspect the results before exporting? e.g. dont export failures, fix the issue, run a clean scan, then export
There was a problem hiding this comment.
I agree. I was thinking it would be something controls by a flag on scan. Right now we have --format oscal, pretty, sarif. Could we tweak that? To me, this seems like just another way to aggregate and report the information.
It could be
--export oscal,sarif,pretty,otel
Signed-off-by: George Vauter <gvauter@redhat.com>
2ea5229 to
8be651d
Compare
Summary
complyctl exportcommand that ships scan results to a ComplyBeacon OTEL collectorExportRPC so scanning providers can emit evidence directly via ProofWatchThe export command orchestrates evidence delivery without touching evidence data itself. Plugins that opt in (via a new
supports_exportcapability onDescribe) use ProofWatch to emitGemaraEvidenceas OTLP log records directly to the collector. Enrichment is handled downstream by TruthBeam in the Beacon collector pipeline.Key decisions documented in the spec:
complyctl export --policy-id <ID>runs afterscan, keeping the two as composable stepscomplytime.yaml— new optionalcollector:section with endpoint and authThe implementation plan breaks work into four areas: proto contract changes, plugin SDK extension, CLI command, and config/doctor additions.
Files
specs/003-complybeacon-export/spec.md— feature specification with clarifications, user stories, acceptance scenarios, functional requirements, and success criteriaspecs/003-complybeacon-export/plan.md— implementation plan with project structure, proto schema, config schema, data flow, and test architectureReview Hints
This PR is spec and plan only — no code changes. Looking for feedback on:
ExportRPC contract andCollectorConfigshapesupports_exportcapability discovery approach is sufficient