Auwai

Security and deployment

This page is the security contract for the Auwai knowledge service and the native harness plugins.

Assets

Trust boundaries

  1. The developer and the agent run on the same machine or trust boundary.
  2. The harness invokes the plugin, MCP server, or CLI.
  3. The knowledge service receives HTTP requests from agents.
  4. The storage adapter reaches a local SQLite file or a network database.
  5. A reverse proxy terminates TLS for a non-loopback service.

The local ledger is inside the developer trust boundary. The knowledge service is a separate boundary and needs authentication, repository scopes, request limits, and TLS when it leaves loopback.

Threat model

Threat Control
Unauthenticated API access Bearer token required unless --allow-anonymous is explicit
Cross-repository reads repo_id scopes and repository allowlists
Over-broad token Read, write, and jobs scopes
Oversized request Bounded Content-Length, default 10 MiB, configurable
Malformed payload JSON validation and per-event validation
SQL injection Parameterized SQL in every adapter
Secret leakage Best-effort redaction before persistence
Anonymous network exposure Anonymous mode is loopback-only unless explicitly overridden
Path traversal Citations and chunk ids are metadata; no shell path execution
Hook command injection Hook arguments are passed without shell interpolation
Database compromise Least-privilege database user, backups, TLS to the database
Stolen token Short-lived or rotated tokens; audit logs; revoke by changing the token set

Redaction is best effort. Do not put secrets in source, fixtures, findings, or prompts. A token that can write facts or claims is a trusted team credential.

Deployment checklist

Token scopes

The service accepts a static token or an auth file:

{
  "tokens": {
    "token-a": {
      "principal": "team-a",
      "repos": ["github.com/acme/telemetry"],
      "scopes": ["read", "write"]
    }
  }
}

read allows facts and coverage; write allows sync, findings, claims, and plans; jobs allows full-read job operations. Use * only for a trusted single-team deployment.

TLS example

Terminate TLS at a reverse proxy and forward to loopback:

server {
    listen 443 ssl;
    server_name auwai.internal.example;

    ssl_certificate     /etc/ssl/auwai/fullchain.pem;
    ssl_certificate_key /etc/ssl/auwai/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8765;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

The release sign-off, residual risks, and test evidence are in security-signoff.md.

Security verification

Before a release:

Known limits