Reversible PII de-identification round trip (T1–T7) #1

Merged
cscott merged 2 commits from feat/deid-round-trip-t1-t7 into main 2026-07-01 07:22:09 +00:00
Owner

What

Builds the AWS side of the HNCB reversible PII de-identification demo end to end (region ap-southeast-1). Advisor query with a real name → tokenized before it leaves for the cloud → AgentCore agent reasons on tokens only → identity restored on-prem before the advisor sees the answer.

Tasks (all live-verified)

  • T1 /tokenize + T2 /restore — Lambdas behind a public API Gateway (shared-secret auth), Presidio detection, random per-request tokens, DynamoDB vault. Overlap resolution keeps a ROC ID as TW_ROC_ID (not PERSON).
  • T3 — Presidio made private: SG locked to the tokenize Lambda (now in-VPC), DynamoDB gateway endpoint. Only /tokenize + /restore are public.
  • T4 — RAG Lambda registered as an MCP tool on an AgentCore Gateway (AWS_IAM/SigV4); agentcore_setup.sh + a SigV4 MCP invoke test.
  • T5 — Strands agent on AgentCore Runtime; SigV4 gateway auth, apac inference profile, pinned deps.
  • T6 — advisor UI on S3+CloudFront + a Fusion-less demo orchestrator (/demo) chaining tokenize → runtime → restore.
  • T7 — README runbook + trace check; teardown deletes gateway/runtime/memory/ECR.

The money shot

In the cloud AgentCore/Bedrock trace for a run, the token CUST_* appears in 13 events while the real name 王小明 and ROC ID appear in 0 — the cloud only ever saw tokens.

Notes

  • Fusion stays untouched shared SaaS; the /demo orchestrator only stands in for the Fusion-less dry run.
  • Secrets live in gitignored terraform/local.auto.tfvars; no creds/PII committed.
  • Stack is currently live (Fargate + AgentCore + CloudFront) — run scripts/teardown.sh to stop spend.

🤖 Generated with Claude Code

## What Builds the AWS side of the HNCB reversible PII de-identification demo end to end (region `ap-southeast-1`). Advisor query with a real name → tokenized before it leaves for the cloud → AgentCore agent reasons on tokens only → identity restored on-prem before the advisor sees the answer. ## Tasks (all live-verified) - **T1 `/tokenize`** + **T2 `/restore`** — Lambdas behind a public API Gateway (shared-secret auth), Presidio detection, random per-request tokens, DynamoDB vault. Overlap resolution keeps a ROC ID as `TW_ROC_ID` (not `PERSON`). - **T3** — Presidio made private: SG locked to the tokenize Lambda (now in-VPC), DynamoDB gateway endpoint. Only `/tokenize` + `/restore` are public. - **T4** — RAG Lambda registered as an MCP tool on an AgentCore Gateway (AWS_IAM/SigV4); `agentcore_setup.sh` + a SigV4 MCP invoke test. - **T5** — Strands agent on AgentCore Runtime; SigV4 gateway auth, apac inference profile, pinned deps. - **T6** — advisor UI on S3+CloudFront + a Fusion-less demo orchestrator (`/demo`) chaining tokenize → runtime → restore. - **T7** — README runbook + trace check; teardown deletes gateway/runtime/memory/ECR. ## The money shot In the cloud AgentCore/Bedrock trace for a run, the token `CUST_*` appears in 13 events while the real name `王小明` and ROC ID appear in **0** — the cloud only ever saw tokens. ## Notes - Fusion stays untouched shared SaaS; the `/demo` orchestrator only stands in for the Fusion-less dry run. - Secrets live in gitignored `terraform/local.auto.tfvars`; no creds/PII committed. - Stack is currently **live** (Fargate + AgentCore + CloudFront) — run `scripts/teardown.sh` to stop spend. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cscott added 1 commit 2026-07-01 07:15:32 +00:00
Build the AWS side of the HNCB demo end to end (region ap-southeast-1):

- T1 /tokenize + T2 /restore: Lambdas behind a public API Gateway (shared-secret
  auth), Presidio detection, random per-request tokens, DynamoDB vault; overlap
  resolution so a ROC ID stays TW_ROC_ID.
- T3: Presidio made private (SG-locked to the tokenize Lambda in-VPC; DynamoDB
  gateway endpoint); only /tokenize + /restore are public.
- T4: RAG Lambda registered as an MCP tool on an AgentCore Gateway (AWS_IAM/SigV4);
  agentcore_setup.sh + a SigV4 MCP invoke test.
- T5: Strands agent deployed to AgentCore Runtime; SigV4 gateway auth, apac
  inference profile, pinned deps.
- T6: advisor UI on S3+CloudFront with a Fusion-less demo orchestrator (/demo)
  chaining tokenize -> runtime -> restore.
- T7: README runbook + trace check; teardown deletes gateway/runtime/memory/ECR.

Verified live: the cloud AgentCore/Bedrock trace shows only tokens, never the
real name. Secrets stay in gitignored local.auto.tfvars.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cscott added 1 commit 2026-07-01 07:20:38 +00:00
Mermaid flowchart + sequence diagram and an ASCII fallback for the reversible
de-identification round trip, plus component/auth/network reference tables and
the trust-zone boundaries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cscott merged commit edcb4567ef into main 2026-07-01 07:22:09 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cscott/hncb-fusion-deid-demo#1
No description provided.