bascule-oss/crates/bascule-server/Cargo.toml
Tyler King 72fa8cee92 feat: embedded management API (axum, port 9090)
Same binary, same process, two listeners:
  Port 2222: SSH proxy (russh)
  Port 9090: Management API (axum)

API endpoints:
  GET /api/sessions         — active sessions
  GET /api/sessions/history — recent history (last 500)
  GET /api/stats            — aggregate analytics
  GET /api/health           — server health + version
  GET /api/info             — server capabilities

Session tracking:
  Arc<SessionStore> shared between SSH handler and API
  In-memory: active sessions + 500-session history ring buffer
  Tracks: auth breakdown, peak concurrent, TPM attested %

Feature flag:
  --features dashboard (default on) — includes axum + tower-http
  --no-default-features — SSH-only, no HTTP dependency

Config:
  [dashboard] section: enabled, listen address

All smoke tests pass. 0 substrate deps.

Signed-off-by: Tyler King <tking@guildhouse.dev>
2026-04-05 15:09:26 -04:00

29 lines
859 B
TOML

[package]
name = "bascule-server"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Bascule — identity-aware SSH proxy"
[[bin]]
name = "bascule"
path = "src/main.rs"
[features]
default = ["dashboard"]
agent-id = ["dep:bascule-auth-agent-id"]
dashboard = ["dep:axum", "dep:tower-http"]
[dependencies]
bascule-core = { path = "../bascule-core" }
bascule-auth-agent-id = { path = "../bascule-auth-agent-id", optional = true }
tokio = { workspace = true }
clap = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
anyhow = { workspace = true }
serde_json = { workspace = true }
# Management API (optional, default on)
axum = { version = "0.8", optional = true }
tower-http = { version = "0.6", features = ["fs", "cors"], optional = true }