Lamassu IoT is built as a modular, cloud-native PKI platform designed for IoT and industrial environments. This page provides an overview of the system architecture, core components, and how they work together.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lamassuiot/lamassuiot/llms.txt
Use this file to discover all available pages before exploring further.
Architecture Overview
Lamassu follows a microservices architecture with pluggable engines for storage, cryptography, and messaging. Services can be deployed as a monolithic application for development or as independent microservices in production.Core Services
Lamassu consists of six main backend services, each responsible for specific PKI operations:Certificate Authority (CA)
The CA service is the heart of Lamassu, managing the certificate hierarchy and issuance operations. Responsibilities:- Create and manage Certificate Authorities
- Issue, renew, and revoke certificates
- Generate and maintain Certificate Revocation Lists (CRLs)
- Manage issuance profiles for different certificate types
- Track certificate lifecycle and expiration
- Multi-level CA hierarchies
- Automated certificate monitoring
- Policy-based issuance with validation
- OCSP and CRL support
/home/daytona/workspace/source/backend/pkg/services/ca.go:1
Key Management Service (KMS)
Manages cryptographic keys across multiple storage backends with a unified interface. Responsibilities:- Create and import cryptographic keys
- Support multiple crypto engines (AWS KMS, Vault, HSM, filesystem)
- Provide signing operations without exposing private keys
- Track key metadata and usage statistics
- RSA (2048, 3072, 4096 bits)
- ECDSA (P-224, P-256, P-384, P-521)
- Software - In-memory key generation and storage
- Filesystem - File-based key storage
- AWS KMS - AWS Key Management Service integration
- AWS Secrets Manager - AWS Secrets Manager for key storage
- HashiCorp Vault - Vault KV v2 secrets engine
- PKCS#11 - Hardware Security Module (HSM) support
/home/daytona/workspace/source/backend/pkg/services/kms.go:1
Device Manager
Tracks IoT devices and their certificate-based identities. Responsibilities:- Register and manage IoT device inventory
- Track device identity certificates and renewal status
- Monitor device lifecycle states
- Organize devices into logical groups
- Generate device statistics and health metrics
NO_IDENTITY- Device registered but no certificateACTIVE- Device has valid certificateRENEWAL_WINDOW- Certificate approaching expirationABOUT_TO_EXPIRE- Certificate expiring soonEXPIRED- Certificate has expiredREVOKED- Certificate was revokedDECOMMISSIONED- Device removed from service
/home/daytona/workspace/source/backend/pkg/services/devicemanager.go:1
Device Manufacturing System (DMS) Manager
Manages enrollment protocols and device onboarding workflows. Responsibilities:- Configure and manage DMS instances
- Support EST (Enrollment over Secure Transport) protocol
- Handle device enrollment and re-enrollment
- Bind devices to DMSs for automated certificate issuance
- Manage downstream certificate delegation
- EST (RFC 7030) - Standard enrollment protocol
- Server-side key generation
- CSR-based enrollment
- Certificate renewal and re-enrollment
/home/daytona/workspace/source/backend/pkg/services/dmsmanager.go:1
Validation Authority (VA)
Provides certificate validation services using OCSP and CRL protocols. Responsibilities:- OCSP responder for real-time certificate validation
- CRL distribution and hosting
- Maintain revocation status database
- Serve validation requests over HTTP
- OCSP (RFC 6960) - Online Certificate Status Protocol
- CRL - Certificate Revocation List distribution
- File-based storage for CRL and OCSP response caching
- Supports local filesystem and S3-compatible storage
Alerts Service
Event-driven notification and alerting system for monitoring PKI operations. Responsibilities:- Subscribe to system events across all services
- Filter events based on user-defined conditions
- Send notifications through multiple channels
- Track event history and statistics
- JSONPath expressions
- JSON Schema validation
- JavaScript conditions
- Webhook callbacks
- Email (SMTP)
- Microsoft Teams
/home/daytona/workspace/source/backend/pkg/services/alerts.go:1
Pluggable Engines
Lamassu’s modularity comes from its pluggable engine architecture. Each subsystem can be swapped based on deployment requirements.Storage Engines
Persistent storage for all Lamassu data.- PostgreSQL
- SQLite
Production-grade relational database with full ACID compliance.Features:Implementation:
- Full-text search
- JSON/JSONB support for metadata
- Efficient indexing for queries
- Migration support with version tracking
engines/storage/postgres/Event Bus Engines
Asynchronous messaging for event-driven architecture.- AMQP (RabbitMQ)
- AWS SNS/SQS
- In-Memory
Production event bus using RabbitMQ.Features:Implementation:
- Reliable message delivery
- Topic-based routing
- Dead-letter queue support
- Management UI for monitoring
engines/eventbus/amqp/Crypto Engines
Flexible key storage and cryptographic operations.Software Crypto Engine
Software Crypto Engine
Pure Go implementation for key generation and signing.Use Cases:
- Testing and development
- Non-production environments
- Offline PKI operations
engines/crypto/software/Filesystem Crypto Engine
Filesystem Crypto Engine
File-based key storage with PEM encoding.Use Cases:Implementation:
- Development and testing
- Simple deployments
- Key backup and portability
engines/crypto/filesystem/AWS KMS Crypto Engine
AWS KMS Crypto Engine
Integration with AWS Key Management Service.Use Cases:Implementation:
- Cloud deployments on AWS
- Compliance requirements
- Managed key lifecycle
- FIPS 140-2 Level 2 validated
- Automatic key rotation
- CloudTrail audit logging
engines/crypto/aws/awskms.go:1AWS Secrets Manager Crypto Engine
AWS Secrets Manager Crypto Engine
Store keys as secrets in AWS Secrets Manager.Use Cases:
- AWS-native secret management
- Centralized key storage
- Integration with AWS IAM
engines/crypto/aws/secretsmanager.go:1HashiCorp Vault Crypto Engine
HashiCorp Vault Crypto Engine
Integration with Vault KV v2 secrets engine.Use Cases:Implementation:
- Multi-cloud deployments
- On-premises environments
- Advanced secret management
- Versioned secrets
- Dynamic secret generation
- Comprehensive audit logging
engines/crypto/vaultkv2/PKCS#11 Crypto Engine (HSM)
PKCS#11 Crypto Engine (HSM)
Hardware Security Module integration via PKCS#11 interface.Use Cases:Usage:Implementation:
- High-security environments
- Compliance requirements (FIPS 140-2 Level 3/4)
- Root CA key protection
- Thales Luna HSM
- Gemalto SafeNet
- SoftHSM (testing)
- YubiHSM
engines/crypto/pkcs11/Deployment Modes
Lamassu supports two deployment modes based on your needs:Monolithic Mode
All services run in a single process, ideal for development and small deployments. Characteristics:- Single executable
- Simplified deployment
- Shared resources
- Built-in API gateway
/home/daytona/workspace/source/monolithic/pkg/config.go:8
Microservices Mode
Each service deployed independently, ideal for production and Kubernetes. Characteristics:- Independent scaling
- Service isolation
- Kubernetes-native
- High availability
- Helm charts available at lamassuiot/lamassu-helm
- Service mesh integration (Istio, Linkerd)
- Horizontal pod autoscaling
Repository Structure
The Lamassu codebase is organized as a Go workspace with multiple modules:/home/daytona/workspace/source/go.work:1
The go.work file coordinates 24 modules, enabling local development while allowing external consumers to use tagged versions from GitHub.
API Gateway
In monolithic mode, Lamassu includes an integrated API gateway that routes requests to backend services. Service Routes:| Service | Path | Description |
|---|---|---|
| CA | /api/ca | Certificate Authority operations |
| KMS | /api/kms | Key management and crypto engines |
| Device Manager | /api/devmanager | Device inventory and tracking |
| DMS Manager | /api/dmsmanager | Enrollment systems |
| VA | /api/va | OCSP and CRL validation |
| Alerts | /api/alerts | Event subscriptions and notifications |
| EST | /api/.well-known/est | EST protocol endpoint |
Event-Driven Architecture
Lamassu services communicate asynchronously through an event bus, enabling: Event Flow:- Publishers - Services emit events when state changes occur
- Event Bus - Routes events to interested subscribers
- Subscribers - Services and Alerts consume relevant events
- Dead Letter Queue - Failed events are moved to DLQ for retry
- CA certificate issued
- Certificate about to expire
- Device identity revoked
- Key created in KMS
- DMS enrollment completed
- Alerts service filters and routes notifications
- Services update state based on cross-service events
- Monitoring systems track system health
Cloud Connectors
Lamassu integrates with cloud IoT platforms through connectors:AWS IoT Core Connector
Synchronizes Lamassu devices and certificates with AWS IoT Core. Features:- Automatic device registration in AWS IoT
- Certificate synchronization
- IoT policy management
- Thing group organization
/home/daytona/workspace/source/monolithic/pkg/assembler_awsiot.go:1
Security Considerations
Production Security:- Use HSM-backed crypto engines for root CAs
- Enable TLS for all service communication
- Implement mutual TLS (mTLS) authentication
- Use secrets management for credentials
- Enable audit logging to external SIEM
- Restrict network access with firewall rules
- Regular security updates and patching
Monitoring and Observability
Lamassu supports OpenTelemetry for comprehensive observability: Telemetry Features:- Metrics - Service health, operation counts, performance
- Traces - Distributed tracing across service calls
- Logs - Structured logging with configurable levels
Next Steps
Quickstart Guide
Get Lamassu running locally in minutes
Core Concepts
Deep dive into PKI concepts and Lamassu models
Production Deployment
Deploy to Kubernetes with Helm charts
API Reference
Explore the REST API documentation
