https://github.com/aarsh1a/aegisgpt-llm-gateway
secure llm gateway · fastapi middleware for safe ai interactions with prompt sanitization, pii redaction, and jwt-based access control
https://github.com/aarsh1a/aegisgpt-llm-gateway
ai-safety cybersecurity data-security docker flask gcp jwt langchain langchain-python llm prompt-injection python
Last synced: about 2 months ago
JSON representation
secure llm gateway · fastapi middleware for safe ai interactions with prompt sanitization, pii redaction, and jwt-based access control
- Host: GitHub
- URL: https://github.com/aarsh1a/aegisgpt-llm-gateway
- Owner: aarsh1a
- Created: 2025-11-11T06:21:00.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-11T06:35:59.000Z (8 months ago)
- Last Synced: 2025-11-11T08:25:34.106Z (8 months ago)
- Topics: ai-safety, cybersecurity, data-security, docker, flask, gcp, jwt, langchain, langchain-python, llm, prompt-injection, python
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aegisgpt — secure llm gateway (prototype)
a lightweight fastapi-based middleware that hardens llm access by enforcing prompt sanitization, pii redaction, authentication, and audit logging.
built to demonstrate secure architecture principles for ai-driven systems.
---
## features
- prompt sanitization to mitigate prompt injection attacks
- pii redaction for emails, phone numbers, and credit card data
- jwt-based role authentication and access control
- async audit logging to sqlite for traceability
- dockerized deployment with network isolation
- mock llm integration (easily replaceable with openai or vertex ai)
---
## tech stack
**python**, **fastapi**, **langchain**, **jwt**, **docker**, **sqlite**, **gcp (optional)**
---
## security notes
- replace mock llm call with openai or vertex ai for production demos
- use secure secret management (dotenv / vault)
- enforce stricter prompt blocking and logging policies for real deployments
---
## quick start (local)
**clone the repo:**
```bash
git clone https://github.com//aegisgpt.git
cd aegisgpt