Skip to main content

Anonix Gateway

Self-hosted, fail-closed, on-the-fly data masking reverse proxy, API gateway, and web control plane.

CI PyPI version Python 3.11+ License: Apache 2.0

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


Contributing & Security

License

Apache License 2.0 — Copyright 2026 Adithya Nangarath and Nikhilesh Kalahasti. See LICENSE.

Metadata

Release files for anonix-gateway 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anonix-gateway 0.1.2
File Size Uploaded Provenance Actions
anonix_gateway-0.1.2.tar.gz 154.9 kB Without provenance Details for anonix_gateway-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anonix-gateway 0.1.2
File Interpreter ABI Platform Actions
anonix_gateway-0.1.2-py3-none-any.whl Python 3 none any Details for anonix_gateway-0.1.2-py3-none-any.whl

Total release size: 266.9 kB

Release files / anonix_gateway-0.1.2.tar.gz

Download URL anonix_gateway-0.1.2.tar.gz
Size 154.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3d05aac44a1a58f98342e6c7b6652c2ae3128d54587f977c96e949e674ec0ba4
BLAKE2b-256 checksum
How to use checksums
6c9f2208a68d6ffb17da3ca223bfdbd8184268107dd422b308db8e4addf1d062
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.2-py3-none-any.whl

Download URL anonix_gateway-0.1.2-py3-none-any.whl
Size 112.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c1512535732bcdc90d90ac555b852d6a03bb83ecf741b5cf5f535716d424bbf
BLAKE2b-256 checksum
How to use checksums
8ab099eff58198f310ba5215b0cacf51bc8468251509058f71007daca7fca070
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.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page