Files
foxhunt/services/api_gateway
jgrusewski b70c6a0bd7 refactor: rewire all service build.rs to proto/ root directory
Delete per-service proto/ directories. All 7 services now compile
from the single canonical proto/ at workspace root.

- trading_service: 5 protos + ml_training client -> ../../proto/
- ml_training_service: ml_training server + fxt_trading client -> ../../proto/
- broker_gateway_service: broker_gateway -> ../../proto/
- trading_agent_service: trading_agent + ml client -> ../../proto/
- data_acquisition_service: data_acquisition -> ../../proto/
- api_gateway: 8 proto compilations -> ../../proto/
- monitoring_service: keeps local proto (3 training RPCs only, deleted in Task 5)

Added proto/fxt_trading.proto (fat-client proto, package foxhunt.tli)
separate from proto/trading.proto (backend, package trading) since the
API gateway needs both for protocol translation.

Added unimplemented stubs for merged monitoring.proto RPCs:
- trading_service: 3 training RPCs (served by monitoring_service)
- api_gateway monitoring_proxy: 13 system health RPCs (Task 4)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:34:09 +01:00
..

api_gateway

API Gateway service with 6-layer authentication, RBAC, rate limiting, and gRPC proxy routing.

Key Types

  • ApiGatewayService -- main service implementation
  • RoleBasedAccessControl -- RBAC authorization
  • RateLimiter -- 3-tier rate limiting (auth/trading/compute)
  • CircuitBreaker -- upstream service protection

Configuration

  • JWT_SECRET -- JWT signing secret (min 32 chars)
  • UPSTREAM_TRADING_URL -- trading service gRPC endpoint
  • UPSTREAM_ML_URL -- ML service gRPC endpoint

Features

  • mfa (default) -- multi-factor authentication support
  • Build without: cargo check -p api_gateway --no-default-features --features minimal