dataiku/kiji-proxy
Privacy proxy for your OpenAI requests
Kiji Privacy Proxy – A local privacy‑first layer for AI‑API calls
What it is – An open‑source desktop/server proxy that sits between your application (or browser) and large‑language‑model providers such as OpenAI, Anthropic, Gemini, Mistral, etc. It automatically detects personally‑identifiable information (PII) in the request payload, replaces it with realistic dummy values, forwards the masked request to the provider, then restores the original data in the response. All detection runs locally on an ONNX‑optimized DistilBERT model, so no sensitive text ever leaves your machine.
Why it matters – When developers use generative‑AI services they often send real user data (emails, SSNs, credit‑card numbers, …) in prompts or logs. Kiji lets you keep that data private without rewriting code: just run the proxy and configure your browser or HTTP_PROXY/HTTPS_PROXY variables.
Core capabilities
- ML‑powered PII detection – 26 built‑in entity types (email, phone, SSN, credit‑card, address, URLs, …) using a DistilBERT model quantized to ONNX for sub‑100 ms latency.
- Seamless masking & restoration – Sensitive tokens are swapped for synthetic placeholders before the API call and swapped back in the response.
- Configurable rules – Turn off specific entity types or add custom regex patterns for domain‑specific data.
- Mapping review UI – Electron‑based desktop app (macOS) lets you inspect, bulk‑delete, or permanently erase the recorded mask‑to‑real mappings.
- Zero‑code integration – Works as a transparent HTTP proxy; on macOS the app installs a PAC file automatically, on Linux you set
HTTP_PROXY/HTTPS_PROXYor a Unix‑socket listener. - Browser extension – Chrome extension that detects PII in ChatGPT/Claude/Gemini web UI and routes the request through the proxy.
- Local inference only – The PII model runs entirely on‑device; no external calls are made for detection.
- Production‑ready deployment – Systemd service, Docker image, Debian/Ubuntu
.deb, macOS DMG, and tarball builds are provided.
Typical use cases
| Scenario | How Kiji helps |
|---|---|
| Customer‑support agents using ChatGPT with real client emails | Emails are masked before leaving the workstation, then restored in the answer so the agent sees the original text. |
| Logging AI‑generated analysis of user data | Logs are sanitized automatically, reducing GDPR/CCPA exposure. |
| Development & testing of AI‑driven features | Developers can experiment with real data locally without risking accidental leaks to the provider. |
| Compliance audits | All PII processing is local and optional encrypted storage; telemetry is opt‑in and never includes raw prompts. |
Getting started (quick)
macOS (desktop app)
brew install --cask dataiku/tap/kiji-privacy-proxy # installs the DMG and places the app
open /Applications/Kiji\ Privacy\ Proxy.app # launches the proxy (may need sudo for PAC setup)
The app automatically configures Safari/Chrome to route api.openai.com, api.anthropic.com, etc. through http://127.0.0.1:8081.
Linux (stand‑alone server)
# Debian/Ubuntu
wget https://github.com/dataiku/kiji-proxy/releases/download/vX.Y.Z/kiji-privacy-proxy_X.Y.Z_amd64.deb
sudo dpkg -i kiji-privacy-proxy_*.deb
sudo systemctl enable --now kiji-privacy-proxy
# Or run manually
export HTTP_PROXY=http://127.0.0.1:8081
export HTTPS_PROXY=http://127.0.0.1:8081
kiji-proxy
Now any CLI tool that respects the proxy environment variables (e.g., curl, the OpenAI Python client) will have its payload masked.
Architecture at a glance
Your App/CLI ──► Kiji Privacy Proxy (Go server + Electron UI) ──► AI Provider API
│ │ • Detect PII with ONNX DistilBERT
│ │ • Apply masking / generate dummy values
│ │ • Keep a temporary map of dummy↔real values
│ │ • Restore real values in the provider response
▼ ▼
Original data Masked request → Provider → Masked response → Restored data
The proxy is thread‑safe and can handle many concurrent requests; each request gets its own isolated mapping table.
Extending / customizing
- Add new entity types – Provide additional regexes in the config or fine‑tune the underlying model (training data and model are hosted on HuggingFace under
DataikuNLP). - Run your own model – Replace the ONNX file with a custom‑trained DistilBERT or any ONNX‑compatible model.
- Docker – A ready‑made Dockerfile lets you run the proxy in containers for CI pipelines.
- Coding agents – Docs include a guide for routing Codex or Claude‑Code agents through the proxy so generated code never contains raw secrets.
License & community
- License: Apache 2.0 (per
LICENSE). - Maintained by: Dataiku’s 575 Lab (open‑source office).
- Contributions: Welcomed via pull requests; a CLA is required for first contributions. Documentation, model improvements, and new masking rules are all valued.
- Support channels: GitHub issues, Discussions, Slack community, and a dedicated security‑report email (
opensource@dataiku.com).
Bottom line
Kiji Privacy Proxy is a practical, privacy‑first tool for anyone who sends real‑world data to generative‑AI services. By handling PII detection locally and offering a zero‑code proxy, it lets developers and teams comply with data‑protection regulations while still leveraging powerful LLM APIs.
相关
- 项目
- 项目
- Dispatch
- 项目
- 项目