#Production Readiness Checklist
Version: 0.33.0 Updated: 2026-03-15 Applies to: ranvier-core, ranvier-runtime, ranvier-http, ranvier-std, ranvier-inspector Category: Guides
#1. Authentication & Authorization
- JWT secret loaded from environment variable (
JWT_SECRET), never hardcoded- See: `auth-tower-integration`, Security Guide
-
BearerAuthguard configured with timing-attack-safe validation (subtle::ConstantTimeEq)- See: `inspector-demo`
- IAM policy defined via
Axon::with_iam()for role-based access control- See: `auth-jwt-role-demo`
- Token expiration and refresh strategy decided
- Sensitive endpoints protected (admin routes, data exports)
#2. Security
-
CorsGuardconfigured with explicit allowed origins (not*in production)- See: `guard-demo`
-
RateLimitGuardapplied to public-facing endpoints- See: `guard-demo`
-
SecurityHeadersGuardinjecting HSTS, CSP, X-Frame-Options -
IpFilterGuardconfigured for admin endpoints if needed - Error responses do not leak stack traces in release mode (
Sensitive<T>for redaction)- See: Security Guide ยงError Responses
-
XorEncryptionNOT used for production (deprecated, feature-gated)
#3. Observability
- OpenTelemetry exporter configured for traces and metrics
- See: `telemetry-otel-demo`, OTel Ops Playbook
-
/healthand/readyendpoints implemented for load balancer probes- See: `production-config-demo`
-
tracing_subscriberinitialized with appropriate log levels (RUST_LOGenv var) - Inspector dashboard access restricted in production (BearerAuth required)
- See: `inspector-demo`
- Audit logging enabled for compliance-relevant operations
- See: `audit-demo`
#4. Resilience
-
then_with_retry()applied to external service calls with appropriate policyRetryPolicy::exponential_default(max_attempts, initial_ms)recommended- See: `resilience-patterns-demo`
-
then_with_timeout()applied to operations with unpredictable latency- See: `resilience-patterns-demo`
- Graceful shutdown timeout configured (Tokio signal handler)
- See: `production-operations-demo`
- External service calls use
Outcome::Faultfor retryable errors,Outcome::Branchfor client errors- See: `service-call-demo`
#5. Data & Persistence
- Connection pool configured with appropriate
max_connectionsandmin_connections - Persistence store selected:
InMemoryPersistenceStoreโ local development onlyPostgresPersistenceStoreโ durable production storage (persistence-postgresfeature)RedisPersistenceStoreโ ephemeral/fast checkpoints (persistence-redisfeature)- See: `state-persistence-demo`
-
ensure_schema()called at startup for PostgresPersistenceStore - Compensation hooks defined for critical workflows (
CompensationHooktrait)- See: `state-persistence-demo`
- Database table names validated (SQL injection prevention via whitelist pattern)
#6. Deployment & Build
- Build with
--releaseprofile (LTO, strip, codegen-units=1)cargo build --release - Dockerfile uses multi-stage build (builder โ runtime)
- See: Deployment Guide
- Environment variables documented and loaded:
JWT_SECRET=... # Required for auth DATABASE_URL=... # Required for PostgresPersistenceStore RUST_LOG=info # Log level OTEL_EXPORTER_OTLP_ENDPOINT=... # Optional: OTLP collector - Secrets NOT committed to version control (
.envin.gitignore) - Health check endpoint configured in container orchestrator
#7. CI/CD Pipeline
A minimal GitHub Actions pipeline for Ranvier projects:
name: CI
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo check --workspace
- run: cargo test --workspace
- run: cargo clippy --workspace -- -D warnings
- run: cargo build --releaseTips:
- Cache
~/.cargo/registryandtarget/for faster builds - Run
cargo clippy -- -D warningsto catch lint issues early - For feature-gated code:
cargo test --workspace --features persistence-postgres - Consider separate jobs for
check,test,clippyfor parallel execution
#Quick Validation
# Full workspace check
cargo check --workspace
cargo test --workspace
cargo clippy --workspace
# Run with production-like settings
RUST_LOG=info JWT_SECRET=test-secret cargo run -p your-app --release#Related Documents
- Security Guide โ security hardening details
- OTel Ops Playbook โ observability setup
- Persistence Ops Runbook โ persistence operations
- Bus Access Patterns โ Bus method selection guide
- API Stability Contract โ v1.0 API freeze boundaries