11# InferaDB Control
22
3- ** Policy Administration Endpoint ** — multi -tenant orchestration with headless APIs, Kubernetes-native deployment, and WebAuthn authentication.
3+ Multi -tenant control plane with headless APIs, Kubernetes-native deployment, and WebAuthn authentication.
44
55> [ !IMPORTANT]
66> Under active development. Not production-ready.
1111git clone https://github.com/inferadb/control && cd control
1212docker-compose up -d
1313export INFERADB_CTRL__AUTH__KEY_ENCRYPTION_SECRET=$( openssl rand -base64 32)
14- cargo run --bin inferadb-control
14+ make setup && make dev
1515```
1616
1717Register and login:
1818
1919``` bash
2020# Register
21- curl -X POST http://localhost:3000 /v1/auth/register \
21+ curl -X POST http://localhost:9090 /v1/auth/register \
2222 -H " Content-Type: application/json" \
2323 -d ' {"email": "alice@example.com", "password": "securepass123", "name": "Alice"}'
2424
2525# Login
26- curl -X POST http://localhost:3000 /v1/auth/login/password \
26+ curl -X POST http://localhost:9090 /v1/auth/login/password \
2727 -H " Content-Type: application/json" \
2828 -d ' {"email": "alice@example.com", "password": "securepass123"}'
2929```
3030
3131| Endpoint | URL |
3232| -------- | ------------------------------- |
33- | REST API | ` http://localhost:3000 ` |
34- | gRPC API | ` http://localhost:3001 ` |
35- | Health | ` http://localhost:3000/health ` |
36- | Metrics | ` http://localhost:3000/metrics ` |
33+ | REST API | ` http://localhost:9090 ` |
34+ | gRPC API | ` http://localhost:9091 ` |
35+ | Mesh API | ` http://localhost:9092 ` |
36+ | Health | ` http://localhost:9090/healthz ` |
37+ | Metrics | ` http://localhost:9090/metrics ` |
3738
3839## Features
3940
@@ -43,7 +44,7 @@ curl -X POST http://localhost:3000/v1/auth/login/password \
4344| ** Multi-Tenancy** | Organization-based isolation with RBAC |
4445| ** Vault Management** | Policy containers with access grants |
4546| ** Client Auth** | Ed25519 certificates, JWT assertions |
46- | ** Token Issuance** | Vault-scoped JWTs for Server API |
47+ | ** Token Issuance** | Vault-scoped JWTs for Engine API |
4748
4849## Key Concepts
4950
@@ -55,49 +56,61 @@ curl -X POST http://localhost:3000/v1/auth/login/password \
5556| Client | Service identity with Ed25519 certs |
5657| Team | Group-based vault access |
5758
58- ** Auth Flow:** User → Session → Vault access → JWT → Server API
59+ ** Auth Flow:** User → Session → Vault access → JWT → Engine API
5960
6061## Architecture
6162
6263``` mermaid
6364graph TD
64- API[inferadb-control-api] --> Core[inferadb-control-core]
65+ Bin[inferadb-control] --> API[inferadb-control-api]
66+ API --> Core[inferadb-control-core]
6567 Core --> Storage[inferadb-control-storage]
6668 Storage --> FDB[(FoundationDB)]
67- API --> GRPC [inferadb-control-engine-client]
69+ Core --> Engine [inferadb-control-engine-client]
6870```
6971
7072| Crate | Purpose |
7173| ------------------------------ | ------------------------ |
74+ | inferadb-control | Binary entrypoint |
7275| inferadb-control-api | REST/gRPC handlers |
7376| inferadb-control-core | Business logic, entities |
7477| inferadb-control-storage | Memory or FoundationDB |
78+ | inferadb-control-types | Shared type definitions |
7579| inferadb-control-engine-client | Engine API client |
7680
7781## Configuration
7882
79- ``` bash
80- INFERADB_CTRL__STORAGE__BACKEND=foundationdb
81- INFERADB_CTRL__STORAGE__FDB_CLUSTER_FILE=/etc/foundationdb/fdb.cluster
82- INFERADB_CTRL__SERVER__HTTP_PORT=3000
83- INFERADB_CTRL__AUTH__KEY_ENCRYPTION_SECRET=< base64>
83+ ``` yaml
84+ control :
85+ listen :
86+ http : " 0.0.0.0:9090"
87+ grpc : " 0.0.0.0:9091"
88+ mesh : " 0.0.0.0:9092"
89+
90+ webauthn :
91+ party : " localhost"
92+ origin : " http://localhost:9090"
8493` ` `
8594
95+ Environment variables use ` INFERADB_CTRL__` prefix (e.g., `INFERADB_CTRL__LISTEN__HTTP`).
96+
8697See [config.yaml](config.yaml) for all options.
8798
8899# # Development
89100
90101` ` ` bash
91- cargo test # All tests
92- cargo clippy -- -D warnings # Lint
93- cargo fmt # Format
102+ make setup # One-time setup
103+ make dev # Dev server with auto-reload
104+ make test # Run tests
105+ make check # Format, lint, audit
106+ cargo build --release # Release build
94107` ` `
95108
96109# # Deployment
97110
98111` ` ` bash
99- cargo build --release
100- ./target/release/inferadb-control --config /etc/inferadb/config.yaml
112+ docker run -p 9090:9090 inferadb/control:latest
113+ kubectl apply -k k8s/
101114` ` `
102115
103116See [docs/deployment.md](docs/deployment.md) for Kubernetes.
0 commit comments