Anonix Gateway
Self-hosted, fail-closed, on-the-fly data masking reverse proxy, API gateway, and web control plane.
Powered by anonix · Complete Setup Guide · Architecture · Policy & anonix Guide · Auth Guide · API Reference
Overview
Anonix Gateway enables organizations to deploy a centralized, policy-driven masking layer on their own infrastructure. It masks non-relational data (JSON, XML, YAML, CSV) in memory on the fly based on caller identity and policy roles—without modifying existing backend databases or application code.
Key Capabilities
| Capability | Description |
|---|---|
Reverse Proxy (/proxy/{prefix}/*) |
Sits in front of existing internal REST APIs, fetches raw responses using encrypted outbound credentials, and masks responses in RAM per caller role. |
Direct Masking API (POST /v1/mask) |
Language-agnostic masking endpoint for Java, Node.js, Go, PHP, ETL pipelines, and AI/LLM workflows. |
| Multi-Mode Inbound Auth | Enable OIDC/JWT (Okta, Google, Entra ID, Keycloak), scoped API Keys, and/or Trusted-Proxy Headers (NGINX, Kong, ALB) simultaneously. |
| Web Admin Console | Built-in React console with first-run /setup wizard, policy versioning & rollback, Live Policy Playground, RBAC (platform_admin, policy_author, auditor), and Zero-PII Audit Log. |
| Deployment Flexibility | Run via Docker Compose (bundled Postgres + optional Redis & Caddy TLS), Enterprise BYOD Postgres (docker-compose.byod.yml), or PyPI CLI (pip install anonix-gateway) with automatic SQLite. |
Architecture
Consumer Apps / Partner Services / ETL
│
│ Bearer OIDC JWT │ X-API-Key │ Trusted-Proxy Headers
▼
┌──────────────────────────────────────────────────────────────────────┐
│ ANONIX GATEWAY │
│ │
│ 1. Inbound Auth Chain (Fail-closed 401) │
│ 2. GroupMapping -> (Policy + Optional Role) (Fail-closed 403) │
│ 3. /proxy/* (httpx + SSRF Guard) OR POST /v1/mask │
│ 4. anonix MaskingEngine in RAM (Fail-closed 502 on error) │
│ 5. Zero-PII Audit Logger + Bundled Web Admin Console │
└───────────────┬──────────────────────────────────┬───────────────────┘
│ Outbound Service Creds │ Metadata & Policies
▼ ▼
Enterprise Internal APIs Gateway DB (Zero PII)
(Private VPC / Firewall) Postgres (Bundled/BYOD) or SQLite
Quick Start
1. PyPI CLI (Single Node, Auto-SQLite)
pip install anonix-gateway
anonix-gateway init
anonix-gateway serve
Open http://localhost:8000 to sign in to the Admin Console.
2. Docker Compose (Bundled Postgres + Gateway)
git clone https://github.com/lovepop1/Anonix-gateway.git
cd Anonix-gateway
cp .env.example .env
docker compose up -d
- Add Bundled Redis (multi-replica rate limiting):
docker compose -f docker-compose.yml -f docker-compose.redis.yml up -d - Automatic HTTPS (Caddy):
ANONIX_DOMAIN=mask.example.com docker compose --profile tls up -d - With Mock Demo Upstream:
docker compose --profile demo up -d
3. Enterprise BYOD (Bring Your Own Postgres / Optional Redis)
anonix-gateway keygen >> .env
# Set ANONIX_DATABASE_URL (and optionally ANONIX_REDIS_URL) in .env
docker compose -f docker-compose.byod.yml up -d
# Or pair BYOD Postgres with bundled Docker Redis:
docker compose -f docker-compose.byod.yml -f docker-compose.redis.yml up -d
Repository Structure
anonix-gateway/
├── src/anonix_gateway/
│ ├── auth/ # OIDC/JWKS, API keys, Trusted-Proxy, Admin RBAC
│ ├── cache/ # Redis & in-memory rate limiter
│ ├── db/ # SQLAlchemy 2.0 async models & bootstrap
│ ├── masking/ # Thread-safe anonix MaskingEngine LRU cache
│ ├── proxy/ # SSRF guard & outbound validation
│ ├── routes/ # /v1/mask, /proxy/*, /api/setup/*, modular /api/admin/*
│ ├── schemas/ # Typed Pydantic OpenAPI response schemas
│ └── security/ # Argon2id, Fernet encryption, HS256 admin JWTs
├── console/ # Modular React 18 + TypeScript + Vite Admin Console
├── alembic/ # Database schema migrations
├── examples/ # Sample policies & NGINX Trusted-Proxy config
├── docs/ # Architecture, Deployment, Auth, API & Demo guides
└── tests/ # Unit & integration test suites
Documentation & Examples
- Complete Setup & Operations Guide (
SETUP.md) — Step-by-step zero-to-production guide for Bundled Docker, Enterprise BYOD, PyPI CLI, TLS, Multi-Tenant, and Troubleshooting - Architecture & Security Model — Request lifecycle, 3 security planes, RBAC, SSRF guard, and fail-closed guarantees
- Deployment & BYOD Quick Reference — Condensed deployment checklist
- Policy Authoring &
anonixReference —MaskingPolicyschema, JSONPath/XPath selectors, all 10 built-in techniques, roles, and versioning - Authentication & Authorization Guide — OIDC/JWT, API Keys, Trusted-Proxy headers, and Group Mappings
- API Reference — Data Plane (
/v1/mask,/proxy/*) and Control Plane (/api/admin/*) endpoints - 5-Minute Live Demo Guide — End-to-end walkthrough with mock upstream
- Sample Policies & NGINX Config
Contributing & Security
- See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
- Report security vulnerabilities privately per SECURITY.md.
License
Apache License 2.0 — Copyright 2026 Adithya Nangarath and Nikhilesh Kalahasti. See LICENSE.
Metadata
Release files for anonix-gateway 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anonix_gateway-0.1.4.tar.gz | 158.4 kB | Without provenance | Details for anonix_gateway-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anonix_gateway-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for anonix_gateway-0.1.4-py3-none-any.whl |
Total release size: 270.6 kB
Release files / anonix_gateway-0.1.4.tar.gz
| Download URL | anonix_gateway-0.1.4.tar.gz |
|---|---|
| Size | 158.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50d1d6b88fbb49a1da7a881830b9faa684016d1ccc169a52a64705133d504824
|
|
BLAKE2b-256 checksum How to use checksums |
637b336a602763c388953b44bbcbfe166080eba2fa2244fca9c52109d4a5f43a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / anonix_gateway-0.1.4-py3-none-any.whl
| Download URL | anonix_gateway-0.1.4-py3-none-any.whl |
|---|---|
| Size | 112.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c16c100dad54ade1024c6766ce7988d051617b66bc714db0c26e72c9ddf2470
|
|
BLAKE2b-256 checksum How to use checksums |
63cda26ece1f77bc0ca6ed61e1651ffd5d8c45c4e3a09ac0e6004d0c9621b2d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for anonix-gateway 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.