默认登录是 superadmin / happy,上线前必须改;单独 docker run 不自动建库,连不上 PostgreSQL 会退回内存存储、重启丢数据;网关默认监听 80 和 443,示例 curl 却用 8080,需自行映射端口。
aifw
securetron-gh活跃维护自托管的 AI 网关与推理防火墙,为 Agent 提供身份与访问管理,拦截提示注入并审计调用,防止 LLM 被滥用。
AI Agent Identity and Access Management and Inference Firewall
docker compose up -d
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}]}'README 未说明硬件要求;以 Docker 镜像方式运行,需搭配 PostgreSQL,未提及 GPU 或显存。
自托管的 AI 防火墙网关,为每个 AI Agent 做身份认证、授权、内容检查和审计
自托管的 AI 网关与推理防火墙,为 Agent 提供身份与访问管理,拦截提示注入并审计调用,防止 LLM 被滥用。
核心能力
- 对每个 prompt 和响应做扫描、PII 脱敏与语义意图评分
- 用 A2A 协议、mTLS、OIDC SSO、SCIM 给 Agent 发身份
- 语义门控的 prompt 压缩与检查门控缓存来省钱
- 只记元数据的事务日志,可加密导出到 SIEM
- 覆盖 Claude 推理钩子、Cursor Hooks、MCP 工具治理
容易踩的坑
- AlbertaAIFW v1.5.307 - Alberta, Canada最新正式版2026-10-21 · 2026-10-21 00:14 UTC
AIFW 1.5.307
Released: 2026-10-20 Edition: Community and Enterprise Runtime: ASP.NET Core on .NET 11 RC1 (
11.0.100-rc.1SDK,11.0.0-rc.1runtime)AIFW is the AI governance and agent-trust gateway from Securetron: policy enforcement, prompt and response inspection, routing, identity validation and audit for generative-AI traffic, without locking you to a model provider.
Container images
Registry Image Tags GitHub Container Registry ghcr.io/securetron-gh/aifw1.5.307,latestlinux/amd64, runs as non-root userapp, HTTP 80 / HTTPS 443 (Endpoints:WebHttps).- Image digest:
sha256:08532520feb4feebe7a66973b9690863d9dab2101a8b4c909f840ee73e78cb40
docker run --rm -p 8080:80 \ -e ConnectionStrings__PostgreSQL="Host=<host>;Port=5432;Database=pki_remote_agent;Username=<user>;Password=<pass>" \ -e AiFw__JwtSecret="<secret>" \ -e AiFw__Ledger__Key="<quota-ledger hmac key>" \ ghcr.io/securetron-gh/aifw:1.5.307PostgreSQL is required: the container exits during startup when the database is unreachable rather than serving from a fallback store. Health:
GET /api/health· A2A discovery:GET /.well-known/agent-card.jsonWhat's new
Microsoft Decision-1 as a policy classifier
Foundry's System One decision model is now a first-class option instead of an add-on:
- Model Inventory gains a
Microsoft Decision-1 (System One decisions, not chat)protocol. Point the backend URL at the resource endpoint and put the deployment name in the model ID; the entry carries its own key. - Guardrails → Classifier offers
decisionalongside the chat and embedding backends. Both the risk stage and the flag verifier use the selected classifier, so picking once is enough. POST /v1/decisionlets agents reach a decision model through the gateway: same authentication, same prompt inspection, same masking, same audit row and the same400+X-Gateway-Security: Violatedrefusal shape as every other endpoint.- Question mode (
semantic_question_mode) controls how the classifier is asked:per_ruleasks one question per rule,batchedsends every rule's question in a single decision request (per-rule scores kept, prompt billed once),singleasks one combined question.
Measured on the
buried-injectionscorpus (726 cases: 629 attacks, 97 benign; 7 built-in rules):Classifier Mode Attacks caught Benign blocked p50 deepseek-v4-flash per_rule629/629 40 2990 ms gpt-6-luna per_rule629/629 38 3013 ms Microsoft Decision-1 per_rule323/629 2 2011 ms Microsoft Decision-1 batched629/629 4 274 ms The
per_ruledecision row is a throttling artefact, not a classifier result: one question per rule meant seven calls per request and 393429responses, which the fail-open path counted as passes. Batched mode recorded none. On AgentDojov1.2.2(949 attacks, 97 benign) Decision-1 in batched mode caught 949/949 with 5 benign blocks at 276 ms.Flag verification that cannot hide
- The flag-verification score is recorded on blocked rows, and verdicts are attached to the exact request that produced them, including asynchronous verification.
- Blocks are judged by the rule's block threshold rather than its flag threshold, so a confirmation can actually act on the verdict.
- With verification on, a flagged prompt is refused before the answer is generated, not after.
- Rules accept configurable exemplars, and the built-in rules ship tuned thresholds.
- Blocked rows now carry the endpoint kind, so Activity says which endpoint refused.
Cursor agent hooks and IDE artifacts
POST /hooks/cursorrecords one audit row per shell invocation, with a capture mode and a configurable repeat window for duplicate suppression.- The shim answ
- GooseAIFW 1.1.245 - The Goose 2026-09-29 · 2026-09-29 05:08 UTC
查看更新说明
AIFW 1.1.245
Released: 2026-09-18 Edition: Community Runtime: ASP.NET Core on .NET 11 RC1 (
11.0.0-rc.1.26425.128)AIFW is the AI governance and agent-trust gateway from Securetron: policy enforcement, prompt and response inspection, routing, identity validation and audit for generative-AI traffic, without locking you to a model provider.
Container images
Registry Image Tags GitHub Container Registry ghcr.io/securetron-gh/aifw1.1.245,latestDocker Hub securetron/aifw1.1.245,latestAzure Container Registry securetronlab.azurecr.io/agenttrust1.1.245,latestlinux/amd64.- Runs as non-root user
app; HTTP 80, HTTPS 443 (Endpoints:WebHttps). - Image digest:
sha256:fd20b29ba3b35619ff7f721111a5162f6a0b04b99c072df747901f2ff38a9b0e
docker run --rm -p 8080:80 \ -e ConnectionStrings__PostgreSQL="Host=<host>;Port=5432;Database=pki_remote_agent;Username=<user>;Password=<pass>" \ -e AiFw__JwtSecret="<secret>" \ ghcr.io/securetron-gh/aifw:1.1.245Health:
GET /api/health· A2A discovery:GET /.well-known/agent-card.jsonWhat's new
.NET 11 RC1, pinned for reproducible builds
The stack now targets .NET 11 RC1, with the SDK and container base images pinned to exact versions. A rebuild produces the same runtime rather than following a floating tag:
- SDK
11.0.100-rc.1.26425.128 Microsoft.AspNetCore.OpenApi11.0.0-rc.1.26425.128- Base images
mcr.microsoft.com/dotnet/sdk:11.0.100-rc.1/aspnet:11.0.0-rc.1
Better behaviour under database pressure
Transient PostgreSQL conflicts — deadlocks, serialization failures and dropped connections — are now retried instead of surfacing as failed gateway or certificate operations. Database access retries up to 5 times with up to 10 seconds of backoff, so a busy database slows throughput rather than failing requests.
Usage rollups: bounded and predictable
The rollup behind organisation-wide reporting (dashboard totals, long-window trends) reads within a bounded window and writes in batches, keeping memory use and write bursts predictable on large installations. Every setting is optional:
Setting Default Range AiFw:Rollups:IntervalMinutes60 5 – 1440 AiFw:Rollups:Days7 1 – 90 AiFw:Rollups:TopEntitiesPerDay200 1 – 5000 AiFw:Rollups:MaxTransactions2,000,000 1,000 – 20,000,000 AiFw:Rollups:Enabledtrueon / off Configuration sample
docker-compose.ymlpins its example tag to1.1.245and no longer carries a placeholder secret, so a copied sample cannot ship a published value by accident.Upgrade notes
- No database schema changes. Replace the image; existing data and settings continue to work.
- Configuration is backward compatible. Required settings:
ConnectionStrings__PostgreSQL,AiFw__JwtSecret, and upstream model credentials (AiFw__Llm__BackendApiKeyor per-model keys). SetASPNETCORE_ENVIRONMENT=Productionfor real deployments. - Community Edition usage limit: up to 300,000,000 tokens per rolling 30 days (minimum 1,000), with a 7-day grace period when the allowance is exceeded.
- Without a configured database the gateway falls back to in-memory storage — nothing is retained across restarts, so use PostgreSQL beyond a trial.
- AIFWAIFW - True North Edition2026-09-18 · 2026-09-18 04:13 UTC
查看更新说明
AI-FW - True North Edition
AI-FW is the AI firewall and governance gateway. It sits between your AI agents and the models they call, and it identifies, authorizes, inspects, governs and audits that traffic. It runs as a container in your own environment, in front of your existing identity stack.
Start here
- Quick start: https://aifw.io/docs/getting-started/quick-start
- What AI-FW is: https://aifw.io/docs/getting-started/what-is-aifw
- Solutions (problems, not features): https://aifw.io/docs/solutions/block-prompt-injection
- Models and endpoints reference: https://aifw.io/docs/api-reference/openai-compatible-endpoints
This release includes
- The complete knowledge base: guides, tutorials, how-to recipes, API reference and admin reference, also rendered at https://aifw.io/docs
- A dashboard screenshot asset (
AI-FW-Dashboard.png) for internal reviews and briefings
Editions
- Community Edition: free and self-hosted, 100,000,000 tokens per month over a rolling 30-day window. License: https://aifw.io/community-edition/license
- Enterprise: custom token allowance, enterprise support and deployment assistance. Contact [email protected]
Links
- Website: https://aifw.io
- Documentation: https://aifw.io/docs
- Media and launch video: https://aifw.io/media
- Machine-readable index for AI assistants: https://aifw.io/llms.txt
Support: [email protected]
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
AI-FW
The AI Firewall & Governance Gateway
Every AI agent: identified, authorized, inspected, governed.
Documentation · Website · Get started · Enterprise
AI-FW is the AI firewall and governance gateway between your AI agents and the models they call. Every prompt and response is inspected, governed, and routed, with provable agent identity and regulator-ready audit, all in one process that runs in your own environment.
- Fail-closed by design: offline guardrails never delegate to third parties, no traffic while scanning is unhealthy
- Agents are identities: A2A protocol, agent registry, mTLS, Kerberos, OIDC SSO, SCIM provisioning
- Cost savings without safety holes: semantic-gated prompt compression and inspection-gated caching
- Audit you can hand to a regulator: metadata-only transaction log with encrypted export to your SIEM
- Surfaces others cannot reach: Claude inference hooks, Cursor Agent Hooks, MCP tool governance, M365 Copilot admin with agent sync
- Opt-in endpoint gateway: images, audio, files, fine-tuning, and batches under the same inspection pipeline
🛡️ Features
Every feature is documented on aifw.io/docs and in this repository's docs/ folder. Product updates and practical guidance are published on AI-FW Insights, with an RSS feed.
Legend: ✅ native · 🧩 via partner or plugin · ❌ not supported
[!WARNING] Model IDs change frequently. Always verify against each vendor's live model list before registering a model (see the models reference).
⚡ Quick start
1. Run the gateway and its database
docker compose up -d
The docker-compose.yml in this repository starts the gateway alongside PostgreSQL: both share a network, the database runs on a named volume so data survives restarts, and the gateway waits for it to report healthy before starting. One command, no manual setup.
The default login is superadmin / happy.
[!NOTE] The gateway listens on 80 (HTTP) and 443 (HTTPS). Pin a published version with
AIFW_TAG=1.1.245 docker compose up -d.
The image can be started on its own, but it does not provision a database, so you must supply a reachable PostgreSQL:
docker run -d --name aifw-gateway -p 8080:80 \
-e "ConnectionStrings__PostgreSQL=Host=your-postgres;Port=5432;Database=aifw;Username=...;Password=..." \
ghcr.io/securetron-gh/aifw:latest
[!IMPORTANT] Without a reachable PostgreSQL the gateway still starts, but it falls back to in-memory stores and all data is lost on restart. The built-in default connection string points at
localhost, which inside the container is the container itself, so a sibling database container must be addressed by its name on a shared Docker network.
The same image is published to Docker Hub as securetron/aifw.
2. Make your first request
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}]}'
Open the gateway at http://localhost:8080 and watch the transaction appear in the dashboard.
[!TIP] To route traffic through the gateway, register these backend URLs and models in the AI-FW Model Inventory (see Configure models and keys).
🔄 How it works
flowchart LR
A["Client / Agent"] --> B["AI-FW Gateway"]
B --> C["Inspect<br/>prompt scan, PII mask"]
C --> D["Govern<br/>rules, semantic tier"]
D --> E["Route<br/>registry, resilience"]
E --> F["LLM Backend"]
F --> G["Audit<br/>metadata-only log"]
G --> A
- Connect - point any OpenAI-compatible or Anthropic client at the gateway (SDKs, Claude Code, Cursor, MCP tools, or plain HTTP)
- Inspect - every prompt and response is scanned, PII-masked, and semantically scored
- Govern - routing rules, risk profiles, and policy decide what flows and what is blocked
- Audit - metadata-only logs and events record exactly what happened
📚 Documentation
This repository holds the AI-FW knowledge base. The rendered version lives at aifw.io/docs.
flowchart TD
A["docs/"] --> B["getting-started/"]
A --> C["guides/"]
A --> D["tutorials/"]
A --> E["how-to/"]
A --> F["api-reference/"]
A --> G["admin/"]
A --> H["community-edition/"]
B --> B1["what is AI-FW, quick start"]
C --> C1["guardrails, routing, semantic, identity, risk, reliability, compression, hooks, observability, audit, API keys"]
D --> D1["OpenAI SDK, Claude Code & MCP, M365, agent enrollment"]
E --> E1["models & keys, AI-assisted rules, Azure"]
F --> F1["OpenAI-compatible, Anthropic Messages, A2A, endpoints, current model catalog"]
G --> G1["settings, inventory, rules, risk, audit, dashboard, M365, users, keys, agents, CA, trust, compliance"]
H --> H1["license & monthly token allowance"]
| Section | Topics | Files |
|---|---|---|
| Getting Started | What AI-FW is, quick start | docs/getting-started/ |
| Guides | Guardrails, routing, semantic analysis, identity, risk, reliability, compression, hooks, observability, audit, API keys, Chain of Command, Cursor Agent Hooks | docs/guides/ |
| Tutorials | OpenAI SDK, Claude Code & MCP, M365 Copilot admin, agent self-enrollment | docs/tutorials/ |
| How-To | Models & keys, AI-assisted rules, Azure deployment | docs/how-to/ |
| API Reference | OpenAI-compatible, Anthropic Messages, A2A agent protocol | docs/api-reference/ |
| Admin Reference | Settings, Model Inventory, Rules Manager, Risk Profiles, Audit, M365, Users, Agents, CA, Agent Trust, Compliance, Skills & Tools, IDE Artifacts, Backup & Restore | docs/admin/ |
| Community Edition | License & monthly token allowance | docs/community-edition/ |
🧩 Enterprise
- ✅ ISO 27001 certified and SOC2 compliant
- ✅ Fail-closed by design - no traffic while scanning is unhealthy
- ✅ App-only Microsoft 365 Copilot integration with agent sync
- ✅ Role-based access control, OIDC SSO, and SCIM provisioning
- ✅ Encrypted audit export to your SIEM (syslog over TLS)
- ✅ Self-hosted in your environment with no per-token fees
🔒 Security
To report a security issue, contact us at aifw.io/contact.
🤝 Contributing
PRs are welcome.
We would also like to thank the Securetron.net team for their continued support in helping the community.