Skip to content

feat: sensitive data northbound redaction#460

Open
steiler wants to merge 7 commits into
mainfrom
sensitive
Open

feat: sensitive data northbound redaction#460
steiler wants to merge 7 commits into
mainfrom
sensitive

Conversation

@steiler

@steiler steiler commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Supersedes #452 — head branch renamed from feat/sensitive-data-northbound to sensitive to pair with the matching sensitive branch on config-server (for paired-test CI integration).

Summary

Implements sensitive-data northbound redaction: operators can mark key-pruned schema paths as sensitive on intent write; northbound responses redact matching leaves to *** while southbound apply stays unchanged. Merged views (GetIntent(running), BlameConfig, deviation streaming) use the union of all non-running intents’ markers so priority changes cannot expose secrets; single-intent GetIntent uses only that intent’s markers. include_sensitive on GetIntentRequest / BlameConfigRequest is threaded through as the admin bypass hook in the render pipeline.

Datastore maintains a reverse index for sensitive-path unions; TransactionSet persists sensitive_paths atomically with the intent blob. Tree render ops use RenderOpts / XMLRenderOpts / XPathRenderOpts; blame and deviation paths mask values consistently with render.

Dependencies

go.mod pins pre-merge commits so CI can build without local checkouts (replace with tagged releases after merge):

Module Pseudo-version PR
github.com/sdcio/goyang v1.6.2-2.0.20260608121857-4668a077cf72 goyang#4
github.com/sdcio/sdc-protos v0.0.55-0.20260610090020-aeb8edf494c4 sdc-protos#123

Related: schema-server#244 (schema Sensitive flag from YANG).

Test plan

  • go test ./...
  • Manual: GetIntent / BlameConfig with and without include_sensitive
  • Confirm deviation / watch paths do not leak sensitive values when marked

Pairs-with: sdcio/integration-tests#108
Pairs-with: sdcio/config-server#441

@steiler steiler requested a review from a team as a code owner June 29, 2026 09:13
@steiler steiler added the paired-test Use when integration-tests should follow the same-named branch on config-server (not main). label Jun 29, 2026
steiler and others added 6 commits July 1, 2026 10:07
Implement the sensitive-data PRD: key-pruned path markers unioned across
intents for merged views, RenderOpts-driven `***` redaction in JSON/XML/proto/
XPath output, BlameConfig and deviation masking, admin bypass via
include_sensitive, and atomic TransactionSet persistence of sensitive_paths
with a datastore reverse index for O(1) lookup.

Co-authored-by: Cursor <cursoragent@cursor.com>
…sions

Replaces the local-path replace directives with remote pseudo-version
references so CI and collaborators can build without local checkouts.

Pinned commits:
  - sdcio/goyang       v1.6.2-2.0.20260608121857-4668a077cf72 (PR#4)
  - sdcio/sdc-protos   v0.0.55-0.20260610090020-aeb8edf494c4  (PR#123)

Replace with tagged releases once PRs are merged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Makes the PR description link to docs/prd/sensitive-data/PRD.md valid on
the branch; tracks implementation issues 01–05 for reviewers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apply De Morgan's law in json/xml presence-container checks and remove
unused setupLeafMock test helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
populateSensitivePathIndex streams intents at datastore startup; without
the mock the test helper blocked forever waiting on unclosed channels.

Co-authored-by: Cursor <cursoragent@cursor.com>
The ToXML signature was refactored in the sensitive-redaction commit to
accept XMLRenderOpts instead of individual bool parameters. One test call
at line 768 was missed during the rebase and still used the old positional
args — replace it with an empty XMLRenderOpts{} (all false, same effect).

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

paired-test Use when integration-tests should follow the same-named branch on config-server (not main).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant