Skip to content

Feature/marketplace field policy federation - #254

Merged
vsilent merged 4 commits into
devfrom
feature/marketplace-field-policy-federation
Sep 13, 2026
Merged

Feature/marketplace field policy federation#254
vsilent merged 4 commits into
devfrom
feature/marketplace-field-policy-federation

Conversation

@vsilent

@vsilent vsilent commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

robotizeit and others added 4 commits September 12, 2026 13:11
…inition (P2)

Defense-in-depth for the field-policy secret handling. At publish, blank the value
of every `mutability: generated` field before the version is persisted, so the
stored (and federated) template never carries the author's secret values. The
installer regenerates them per buyer; if regeneration ever doesn't run, the field
is empty (fail-closed) instead of leaking the author's secret.

- new `strip_generated_field_values` applied at all three write sites in creator.rs
  (create, update, resubmit), keyed on the contract's generated fields.
- reusable key-set strippers in redact.rs (JSON + YAML), value replaced with "".
- tests: generated blanked, fixed/editable/undeclared untouched, YAML + ProjectForm
  shapes, no-op without generated fields.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
One-shot pass (dry-run by default) over the latest version of every template:
for each secret-shaped env key without a `generated` policy, attach one under the
key`s own service and strip the author value from the stored stack_definition
(reusing the publish-time strip). Existing templates then regenerate secrets per
buyer instead of shipping the author`s.

- helpers/field_policy_backfill.rs: service-aware planning for YAML compose;
  JSON/ProjectForm definitions are reported as needs-manual (no unsafe guessing).
- bin/backfill_field_policy.rs: DRY-RUN by default; --apply to write.
- tests: augment+strip per service, no-op when declared/no-secrets, JSON→manual.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… link

Public, author-facing usage guide: how template authors declare per-field policy
(fixed/editable/generated + generated types incl. derived_jwt) so each buyer gets
freshly generated secrets, how to satisfy the publish gate, the legacy shorthand,
and the validate/init workflow. Cross-linked from MARKETPLACE_PUBLISH.md.

No private internals — public-safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The runtime image built only server/console/cleanup-notify, so the catalog
backfill tool could not be run via `docker exec stacker backfill_field_policy`.
Build and copy it alongside the others.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vsilent
vsilent merged commit 1f95a6e into dev Sep 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants