Skip to content

feat: client authentication and per-user quota #130

@Oaklight

Description

@Oaklight

Summary

Add client authentication to the gateway with per-user rate limiting and usage tracking.

Requirements

Authentication

  • API key validation via x-api-key header
  • Configurable auth modes: api_key, jwt, none (default)
  • Key whitelist or signature validation

Per-User Quota

  • Track usage per API key
  • Configurable per-key rate limits
  • Usage stats exposed in admin panel

CORS Hardening

  • Replace allow_origins=["*"] with configurable origins
  • Default to restrictive in production

Key Files

  • src/llm_rosetta/gateway/app.py — middleware
  • src/llm_rosetta/gateway/config.py — auth config
  • New: src/llm_rosetta/gateway/auth.py — auth logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority 3: LowgatewayGateway proxy features and improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions