This document describes the operating stack, development methodology, and architectural decisions behind Housecarl AuthZ.
Housecarl is built entirely in Rust, chosen for:
All services, libraries, and CLI tools are written in Rust. The only exceptions are test utilities (Go) and database migrations (SQL).
Housecarl runs as containerized services:
udr_db framework handles schema versioning per serviceHousecarl follows a centralized authorization architecture:
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Web Browser │───▶│ housecarl-ui│───▶│ Envoy │
│ │ │ (Web UI) │ │ gRPC Gateway│
└─────────────┘ └─────────────┘ └─────────────┘
│ │
│ ▼
┌─────────────┐ │ ┌─────────────┐
│ CLI │──────────┼───────────▶│ housecarl │
│ (housectl) │ │ │ (authz core)│
└─────────────┘ │ └─────────────┘
│ │
▼ │
┌─────────────┐ │
│ billing │◀───────────┘
│ service │
└─────────────┘
│
▼
┌─────────────┐
│ audit │
│ service │
└─────────────┘
All authorization decisions flow through the central housecarl service. This design provides:
Internal service communication uses gRPC (HTTP/2 + Protocol Buffers):
External access is available via:
| Service | Responsibility |
|---|---|
| housecarl | Core authorization engine, JWT authentication, policy evaluation |
| housecarl-ui | Web interface, OAuth2 flows, email signup |
| billing | Stripe integration, subscription management, usage tracking |
| audit | Centralized audit logging, compliance reporting |
All Housecarl development follows strict TDD:
Development uses a two-tier build system:
cargo check, cargo test)Bazel provides:
Every change must pass:
cargo clippy with zero warnings)cargo fmt)./bzsh test //...)All services expose Prometheus metrics:
Structured logging via the tracing crate:
Distributed tracing with Jaeger:
| Category | Library | Purpose |
|---|---|---|
| HTTP Server | Axum | Async web framework with Tower middleware |
| gRPC | Tonic | gRPC server and client |
| Database | sqlx | Async PostgreSQL with compile-time query checking |
| Async Runtime | Tokio | Industry-standard async runtime |
| Serialization | serde | JSON/TOML serialization |
| Authentication | jwt-simple | JWT token handling |
| Password Hashing | argon2 | Secure password storage |
| Templating | Askama | Compile-time type-safe HTML templates |
The technology choices reflect Housecarl's core values:
This stack enables Housecarl to deliver enterprise-grade authorization that you can trust with your most sensitive access control decisions.