Warning
Currently in early-stage development.
The Saimiris Gateway is a web service that provides a REST API to interact with the Saimiris measurement pipeline.
- Agent Management: Register and manage measurement agents
- Probe Submission: Submit probes to send via the measurements pipeline while ensuring a given quota is respected
- Auto-Migration: Database schema is automatically created and updated on startup
- Privacy-First: User identifiers are SHA-256 hashed for privacy protection
The gateway is configured via command-line arguments (not environment variables):
# Basic usage
./saimiris-gateway \
--database-url "postgresql://user:password@localhost/saimiris_gateway" \
--agent-key "your-secret-agent-key" \
--kafka-brokers "localhost:9092" \
--auth0-jwks-uri "https://your-domain.auth0.com/.well-known/jwks.json" \
--auth0-issuer "https://your-domain.auth0.com/"
# Development mode (bypass JWT)
./saimiris-gateway \
--database-url "postgresql://user:password@localhost/saimiris_gateway" \
--agent-key "testkey" \
--kafka-brokers "localhost:9092" \
--bypass-jwt
# Show all available options
./saimiris-gateway --help--address: Server bind address (default: 0.0.0.0:8080)--database-url: PostgreSQL connection string (required)--agent-key: Authentication key for agents (required)--kafka-brokers: Kafka broker addresses (default: localhost:9092)--auth0-jwks-uri: Auth0 JWKS URI for JWT validation--auth0-issuer: Auth0 issuer for JWT validation--bypass-jwt: Bypass JWT validation (development only)
GET /api/user/me- Get user probe daily usage statisticsGET /api/user/prefixes- List user prefixes per agentPOST /api/probes- Submit probes for measurementGET /api/measurements/{id}/status- Get measurement status
POST /agent-api/agent/register- Register a new agentPOST /agent-api/agent/{id}/config- Update agent configurationPOST /agent-api/agent/{id}/health- Update agent health statusPOST /agent-api/agent/{id}/measurement/{id}/status- Update measurement status
GET /api/agents- List all agentsGET /api/agent/{id}- Get agent detailsGET /api/agent/{id}/config- Get agent configurationGET /api/agent/{id}/health- Get agent health status
The project has comprehensive tests that don't require any external dependencies:
cargo testFor full end-to-end testing with real PostgreSQL, Kafka and a Saimiris agent:
cd integration
docker compose up -d
./tests/test_database_integration.sh
docker compose down