feat(workflows): make the privacy-shield test template real - #2500
Open
Hoang130203 wants to merge 1 commit into
Open
feat(workflows): make the privacy-shield test template real#2500Hoang130203 wants to merge 1 commit into
Hoang130203 wants to merge 1 commit into
Conversation
config/n8n/privacy-shield-test.json was a manualTrigger plus a sticky
note saying "Customize the nodes below to match your setup", with
"connections": {} — an empty canvas behind a catalog card advertising
"Send a test payload through Privacy Shield and verify PII is redacted".
Now it does that:
Run Test -> Sample With PII -> POST privacy-shield:8085
/v1/chat/completions
-> Compliance Report
The sample prompt carries an email, a US phone number, an SSN and an IPv4
address — four of the types PII_COVERAGE.md documents. The report node
reads the X-PII-Scrubbed and X-Privacy-Shield response headers the proxy
sets on every response and turns them into a verdict:
>0 scrubbed PASS — the shield redacted before the model saw the prompt
0 scrubbed FAIL — check PRIVACY_SHIELD in .env
4xx/5xx ERROR — check the credential and that the service is up
fullResponse is on because the evidence is in the headers, not the body,
and neverError is on so a 4xx produces a readable verdict instead of a
red node with a stack trace.
The request authenticates with a generic Header Auth credential rather
than a key baked into the file. The sticky note walks through creating it
from SHIELD_API_KEY in .env — the node will show as needing a credential
until the user picks one, which is the intended one-time setup.
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config/n8n/privacy-shield-test.jsonwas a placeholder —manualTrigger+sticky note +
"connections": {}— behind a catalog card advertising "Send atest payload through Privacy Shield and verify PII is redacted".
For a privacy product, a compliance-check template that does nothing is a
particularly bad one to leave empty: the whole point is letting an operator
prove the shield is on before they trust it with real conversations.
The report reads the two headers
proxy.pysets on every response:and turns them into something an operator can act on:
X-PII-Scrubbed> 0X-PII-Scrubbed== 0PRIVACY_SHIELDin.envIt also surfaces
restored_reply, so you can see the shield putting the realvalues back on the way in — the round trip, not just the redaction.
Choices worth reviewing
fullResponse: truebecause the evidence is in the headers, not thebody.
neverError: trueso a 401 produces a readable verdict instead ofa red node and a stack trace — this is a diagnostic workflow, so a failed
request is a result, not a crash.
credential; the sticky note walks through creating it from
SHIELD_API_KEYin
.env. The node shows as needing a credential until the user picks one.I would rather that one-time step than ship a file with a secret-shaped
placeholder in it.
PII_COVERAGE.mddocuments asdetected, and the note points at that file so an operator does not read a
PASS as "everything is covered".
AI Assistance
AI assisted with drafting the node graph, the verdict wording, and this
description. I read
proxy.pyto confirm the header names and the fact thatthey are set on every response, and validated the file against the real node
package before pushing.
Release Lane
release/2.6.xmainStable hotfix reason:
Changed Surface
(One JSON file under
config/n8n/. An import payload for n8n; no ODS codeexecutes it. The catalog entry is unchanged.)
Risk And Validation
git diff --checkrelease/2.6.xCommands/results:
Caveat: Docker is not running on my dev host, so I could not run this
against a live privacy-shield and watch a real
X-PII-Scrubbedcome back.Static validation proves the file imports and every parameter is real; the
header names and the port come from the service source and manifest. Happy to
get a live run before you merge.
Operational Change Check
An import payload for n8n. Nothing in the installer, compose stack,
ods-cli,or dashboard-api executes it. Running it sends one chat completion through the
user's own shield — no external calls, no state written.
Notes For Reviewers
The sample prompt contains fake PII by design.
dana.reyes@example.com,555-123-4567,123-45-6789,192.168.1.100— reserved/example values, thesame ones
pii_scrubber.py's own tests use. Nothing real, and nothing leavesthe machine either way.
One thing worth deciding. A PASS here means the shield redacted these four
types. It does not mean coverage is complete —
PII_COVERAGE.mdis explicitthat names, addresses and non-16-digit cards are not detected. The note says
so, but if you would rather the verdict string itself carry that caveat, tell
me the wording you want.
Related: #2363 fixes the
api_keypattern missing the spacedAPI Key:form,and #2369 corrects
PII_COVERAGE.md, which this note links to. Independentchanges.
Part of the series making the 18 stub templates real: #2496, #2497, #2498,
#2499.