Commit Graph

39 Commits

Author SHA1 Message Date
9626887ed7 feat(api): /tokenize now runs the full round trip
Repoint public POST /tokenize at the orchestrator (tokenize -> agent -> restore)
so a single path returns {final, deidentified_prompt, agent_tokenized,
session_id} — matching what Fusion mirrors from the front-end path, and what
openapi.yaml already documents. The granular detector moves to internal
/tokenize-raw (x-api-key protected; the orchestrator calls it). /demo kept as an
alias so the UI keeps working.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 19:05:26 +10:00
7973556647 docs(fusion): rigorous openapi.yaml — round-trip /tokenize + /restore
Replace wholesale with strict schemas: required fields, descriptions, examples,
additionalProperties:false so Fusion treats responses as closed structured
objects. /tokenize documents the full round-trip shape (final, deidentified_prompt,
agent_tokenized, session_id); /restore is {session_id,text} -> {final,restored}.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:18:08 +10:00
1f8c45fdf2 docs(fusion): add openapi.yaml (tokenize + restore)
OpenAPI 3.0 spec for the de-id transforms with concrete request/response
schemas, both /tokenize and /restore, an x-api-key securityScheme for
backend-direct calls, and both servers (backend custom domain + Fusion listener,
which injects the key).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 14:32:38 +10:00
b5de55d4a6 feat(net): custom domain for the Fusion-facing API
Fusion couldn't resolve the default *.execute-api.amazonaws.com endpoint, so front
the same HTTP API with hncb-deid.apim-apac-demo.com (ACM DNS-validated cert,
apigatewayv2 REGIONAL custom domain, root api mapping, Route53 A ALIAS). Callers
resolve our hostname straight to IPs and never touch an execute-api name; also
survives API-id churn. Point POLICY_SETUP + README demo at the custom URLs.

Verified live: resolves to IPs, 401 unauthenticated, tokenizes with the key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 11:04:19 +10:00
feb44be76b feat(guardrail): Bedrock prompt-injection guardrail for Fusion
Adds an Amazon Bedrock Guardrail (PROMPT_ATTACK, HIGH, input) plus a dedicated
least-privilege IAM user for Fusion's AWS-Guardrail integration, so the gateway
screens inbound prompts for injection/jailbreak before de-id or the agent run.
Outputs the region/id/version/access-key for the Fusion console (secret stays in
gitignored state). Verified live: benign -> NONE, injection -> GUARDRAIL_INTERVENED.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 10:44:35 +10:00
b46819163b fix(tokenize): drop Limit=1 in customer resolution scan
DynamoDB's `Limit` caps items scanned *before* the FilterExpression runs, so
`scan(FilterExpression=name==X, Limit=1)` returns nothing when the first row
scanned isn't the match. Worked with one seeded customer; adding a second
(cust-0002) made 王小明 fail to resolve to a customer_id, so the RAG tool
returned "token did not resolve" and the agent replied "no customer found".
Remove the Limit; the small table is filtered in full.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 18:38:00 +10:00
2443e0e6f3 docs: reframe POLICY_SETUP as a Fusion de-id policy
Position /tokenize + /restore as the transform backend of an inline request/
response policy on the route to the AgentCore agent, with Fusion as the
non-bypassable enforcement + audit point — rather than a manual HTTP
orchestrator. Adds an honest Fusion-vs-/demo governance note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 18:26:18 +10:00
acaf145903 Merge feat/deid-round-trip-t1-t7 into main
Brings the post-PR#1 commits into main: seed Conan Scott persona, the doc
refactor (separate .mmd files), and the ASCII heading relabel.
2026-07-01 18:09:18 +10:00
4c540c6a83 docs: relabel ASCII diagram heading (Sequence -> Flow)
The ASCII block is the flow/topology diagram, not the sequence.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 18:00:02 +10:00
40783da0fe refactored the docs 2026-07-01 17:50:45 +10:00
335056d74d seed: add second demo persona (Conan Scott, reckless profile)
Synthetic demo customer cust-0002 with fictional high-risk financials and a
synthetic Taiwan ROC ID. Verified live end-to-end: detected + tokenized on
ingress (name never reaches the cloud), agent produces risk-flavoured talking
points, identity restored on egress.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 17:28:07 +10:00
edcb4567ef Merge pull request 'Reversible PII de-identification round trip (T1–T7)' (#1) from feat/deid-round-trip-t1-t7 into main
Reviewed-on: #1
2026-07-01 07:22:08 +00:00
afea012d32 docs: add architecture.md (flow + component diagrams)
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>
2026-07-01 17:20:36 +10:00
78d67a2469 Implement reversible PII de-identification round trip (T1–T7)
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>
2026-07-01 17:10:58 +10:00
6b2a051be3 Add /next-task Claude Code command to drive the backlog safely 2026-07-01 05:10:00 +00:00
20bb8c2417 Rework for SaaS Fusion: calls /tokenize + /restore HTTPS endpoints 2026-07-01 05:09:30 +00:00
3fd9cb2634 Reframe for shared SaaS Fusion; add /tokenize+/restore, CLAUDE.md pointer 2026-07-01 05:08:46 +00:00
147a71c6b7 Deploy AWS side only; Fusion is SaaS. Point to /tokenize+/restore tasks 2026-07-01 05:07:56 +00:00
f6a1f834d4 Drop Fusion Fargate service (SaaS); host Presidio detector only 2026-07-01 05:07:29 +00:00
2f9a4637cf Remove fusion_image_uri: Fusion is shared SaaS, not deployed 2026-07-01 05:06:56 +00:00
eb2aa17dbf Add CLAUDE.md for Claude Code: context, commands, SaaS-Fusion, task backlog 2026-07-01 05:06:33 +00:00
293fa3d516 Write full README: overview, component map, deploy, demo script, caveats 2026-07-01 05:02:08 +00:00
5707ff7610 Add Fusion ingress/egress policy setup guide 2026-07-01 04:59:41 +00:00
95bbc13d41 Add teardown script 2026-07-01 04:58:33 +00:00
781f987b3a Add guided deploy script 2026-07-01 04:58:21 +00:00
a3fefeead4 Add RAG tool schema for AgentCore Gateway 2026-07-01 04:58:05 +00:00
33caa509d7 Add AgentCore Gateway + Runtime setup steps (CLI-driven) 2026-07-01 04:57:09 +00:00
641a3c7fb5 Add advisor UI with restored vs tokenized split view (the money shot) 2026-07-01 04:56:45 +00:00
a4cb5918a6 Add seed script for customers + optional demo vault token 2026-07-01 04:55:58 +00:00
861721f14e Add seed customer data (Wang Xiaoming) 2026-07-01 04:55:47 +00:00
eba1867888 Add Presidio detector Dockerfile 2026-07-01 04:54:57 +00:00
1be1170af4 Add Presidio detector service returning typed findings (+ custom ROC-ID recognizer) 2026-07-01 04:54:25 +00:00
7d23446942 Add agent requirements (pin versions before deploy) 2026-07-01 04:54:07 +00:00
2ef1150149 Add Strands agent for AgentCore Runtime (tool via Gateway MCP) 2026-07-01 04:53:40 +00:00
7e73c4669c Add RAG tool Lambda: token resolve + de-identified evidence package 2026-07-01 04:53:18 +00:00
7646b12392 Add ECS Fargate hosting for Fusion + Presidio (demo-simple, default VPC) 2026-07-01 04:52:49 +00:00
653b3f6a23 Add core Terraform: DynamoDB vault + customers, RAG Lambda, IAM, outputs 2026-07-01 04:52:20 +00:00
57702d8f82 Add Terraform variables 2026-07-01 04:51:48 +00:00
8ff7741965 Initial commit 2026-07-01 04:50:53 +00:00