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.
Device Enrollment
Device enrollment is the process of provisioning cryptographic identities to IoT devices. Lamassu implements the EST (Enrollment over Secure Transport) protocol defined in RFC 7030 for automated, secure device certificate enrollment.EST Protocol Overview
EST (RFC 7030) is a protocol for certificate management over HTTPS:- Transport: HTTPS (TLS 1.2+)
- Format: PKCS#10 (CSR), PKCS#7 (certificates)
- Encoding: Base64-encoded DER
- Authentication: mTLS, JWT, PSK, or no auth
Why EST?
- Industry standard: RFC 7030 is widely adopted for IoT device enrollment
- Secure transport: Built on TLS with mutual authentication
- Simple workflow: Minimal endpoints for enrollment and re-enrollment
- Client support: Libraries available for embedded systems
- Scalable: Supports automated enrollment for large device fleets
Lamassu’s EST implementation follows RFC 7030 with extensions for IoT-specific requirements.
EST Endpoints
Lamassu implements the core EST endpoints:GET /cacerts
Purpose: Retrieve CA certificates (trust anchors) URL:/.well-known/est/{dmsId}/cacerts
Authentication: None required
Response: Base64-encoded PKCS#7 containing CA certificates
Use case: Bootstrap trust before enrollment
POST /simpleenroll
Purpose: Enroll a new device certificate URL:/.well-known/est/{dmsId}/simpleenroll
Authentication: Depends on DMS configuration (mTLS, webhook, or none)
Request: Base64-encoded DER CSR
Response: Base64-encoded PKCS#7 containing signed certificate
Use case: Initial device provisioning
POST /simplereenroll
Purpose: Renew an existing device certificate URL:/.well-known/est/{dmsId}/simplereenroll
Authentication: Current device certificate (mTLS)
Request: Base64-encoded DER CSR
Response: Base64-encoded PKCS#7 containing new certificate
Use case: Certificate renewal before expiration
POST /serverkeygen
Purpose: Request server-generated key and certificate URL:/.well-known/est/{dmsId}/serverkeygen
Authentication: Depends on DMS configuration
Request: Base64-encoded DER CSR (without private key)
Response: multipart/mixed containing:
- Private key (PKCS#8, Base64-encoded)
- Certificate (PKCS#7, Base64-encoded)
GET /csrattrs
Purpose: Retrieve recommended CSR attributes URL:/.well-known/est/{dmsId}/csrattrs
Authentication: None required
Response: ASN.1 encoded CSR attributes
Use case: Discover required CSR fields before enrollment
DMS (Device Management Service)
The DMS controls enrollment policies and settings:DMS Settings
Each DMS has a unique ID used in EST URLs:
/.well-known/est/{dmsId}/...Authentication Modes
Lamassu supports multiple EST authentication modes:mTLS (Mutual TLS)
Mode:CLIENT_CERTIFICATE
How it works:
- Device presents client certificate during TLS handshake
- Server validates certificate against configured CAs
- If valid, enrollment proceeds
- Production enrollment with bootstrap certificates
- Re-enrollment (device authenticates with current cert)
- High-security environments
Webhook
Mode:EXTERNAL_WEBHOOK
How it works:
- Lamassu receives enrollment request
- Calls external webhook with device info and CSR
- Webhook returns allow/deny decision
- Enrollment proceeds or fails based on webhook response
- Custom authorization logic
- Integration with external systems
- Dynamic enrollment policies
- SCEP migration
No Authentication
Mode:NO_AUTH
How it works: Enrollment proceeds without authentication
Use cases:
- Development and testing
- Closed networks where physical access control is sufficient
- Pre-registered devices in JITP mode
Registration Modes
Lamassu supports two device registration modes:JITP (Just-In-Time Provisioning)
Mode:JITP
How it works:
- Device enrolls without pre-registration
- Lamassu automatically creates device record on first enrollment
- Device is provisioned with identity certificate
- Zero-touch provisioning
- Simplified deployment
- Automatic inventory management
- Any device can enroll (mitigate with authentication)
- Less control over device population
Use JITP with strong authentication (mTLS or webhook) to prevent unauthorized device enrollment.
Pre-Registration
Mode:PRE_REGISTRATION
How it works:
- Administrator pre-registers devices via API
- Device ID is recorded in Lamassu
- Device can enroll only if ID matches pre-registered entry
- Strict control over enrolled devices
- Prevent unauthorized devices
- Known inventory before deployment
- Import device IDs from manufacturing system
- Pre-register devices via API
- Provision bootstrap certificates (optional)
- Devices enroll on first connection
Enrollment Settings
Key Settings
EnrollmentCA
CA that issues device certificates during enrollment. Example:ca-issuing-devices-01
VerifyCSRSignature
Iftrue, Lamassu verifies the CSR signature matches the public key.
Purpose: Prevent MITM attacks on CSR
EnableReplaceableEnrollment
Iftrue, already-enrolled devices can re-enroll with a new key pair.
Use cases:
- Key compromise recovery
- Device re-provisioning
- Certificate replacement
Re-Enrollment Settings
Renewal Windows
PreventiveReEnrollmentDelta
Time before expiration when device status changes toRENEWAL_PENDING.
Example: 90d (90 days before expiration)
Purpose: Early warning for certificate renewal
CriticalReEnrollmentDelta
Time before expiration when device status changes toEXPIRING_SOON.
Example: 30d (30 days before expiration)
Purpose: Critical alert for imminent expiration
RevokeOnReEnrollment
Iftrue, the old certificate is revoked when a new one is issued.
Benefits:
- Cleaner certificate lifecycle
- Prevents old certificates from being used
- Compliance with some security policies
- Requires careful timing to avoid service disruption
- Device must activate new certificate before old one is revoked
EnableExpiredRenewal
Iftrue, devices with expired certificates can re-enroll.
Use case: Device was offline during renewal window
Security consideration: Requires authentication via bootstrap cert or webhook
CA Distribution Settings
/cacerts:
- IncludeLamassuSystemCA: Include Lamassu root CA
- IncludeEnrollmentCA: Include the CA that issues device certificates
- ManagedCAs: List of additional CA IDs to distribute
Distribute the full CA chain (root + intermediates) to ensure devices can build complete trust chains.
Server-Side Key Generation
- Resource-constrained devices
- Devices without RNG
- Centralized key escrow
- Private key is transmitted over TLS (encrypted but still transmitted)
- Server has access to device private key
- Higher risk of key compromise
Enrollment Workflow
Typical EST enrollment workflow:Step-by-Step
-
Fetch CA certificates (
/cacerts)- Device retrieves trust anchors
- Validates EST server TLS certificate
-
Generate key pair
- Device generates RSA or ECDSA key pair
- Private key never leaves device
-
Create CSR
- Device creates PKCS#10 CSR with public key
- Signs CSR with private key
- Includes subject DN and extensions
-
Authenticate
- mTLS: Present bootstrap certificate
- Webhook: Server calls external service
- No-auth: Skip authentication (not recommended)
-
Validate CSR
- Verify CSR signature
- Check public key algorithm and size
- Validate against issuance profile
-
Sign certificate
- CA signs certificate using KMS
- Applies issuance profile policies
- Sets validity period, key usage, etc.
-
Return certificate
- Server returns signed certificate in PKCS#7
- Device extracts and installs certificate
-
Update device status
- Device status changes to
ACTIVE - Identity slot is populated
- Event is recorded
- Device status changes to
Related API Endpoints
EST Endpoints
GET /.well-known/est/{dmsId}/cacertsPOST /.well-known/est/{dmsId}/simpleenrollPOST /.well-known/est/{dmsId}/simplereenrollPOST /.well-known/est/{dmsId}/serverkeygenGET /.well-known/est/{dmsId}/csrattrs
DMS Management
GET /v2/dms— List DMS instancesPOST /v2/dms— Create DMSGET /v2/dms/{dmsId}— Get DMS detailsPATCH /v2/dms/{dmsId}— Update DMS settingsDELETE /v2/dms/{dmsId}— Delete DMS
Best Practices
Security
- Use mTLS authentication for production enrollments
- Separate bootstrap CAs from production CAs
- Verify CSR signatures to prevent MITM attacks
- Limit enrollment CA validity to reduce compromise impact
- Revoke bootstrap certificates after successful enrollment
- Monitor enrollment events for anomalies
Enrollment Policy
- Pre-register devices when possible for strict control
- Use JITP with strong authentication for zero-touch provisioning
- Configure renewal windows appropriately (preventive: 90d, critical: 30d)
- Enable replaceable enrollment only if needed
- Distribute full CA chain via
/cacerts
Certificate Validity
- Short device cert validity (1-2 years) reduces exposure
- Automated renewal using
/simplereenroll - Preventive renewal well before expiration
- Expired renewal option for offline devices
Key Management
- Device-generated keys preferred over server-generated
- Use appropriate key sizes (RSA 2048, ECDSA P-256)
- Never transmit private keys unless absolutely necessary
- Secure key storage on device (TPM, secure element)
Operational
- Monitor enrollment failures for issues
- Alert on expired certificates using critical delta
- Track enrollment metrics (success rate, timing)
- Test enrollment workflow regularly
- Document recovery procedures for failed enrollments
Troubleshooting
Common Issues
400 Bad Request
Cause: Malformed CSR or incorrect encoding Solution: Ensure CSR is Base64-encoded DER (not PEM)401 Unauthorized
Cause: Authentication failure Solutions:- Check client certificate is signed by validation CA
- Verify client certificate is not expired (unless AllowExpired=true)
- Ensure webhook is responding correctly
404 Not Found
Cause: Incorrect DMS ID Solution: Verify DMS ID exists and is correct in URLDevice Not Created (JITP)
Cause: Pre-registration mode enabled Solution: Pre-register device or switch to JITP modeCertificate Rejected
Cause: CSR doesn’t meet issuance profile requirements Solutions:- Check key algorithm and size match profile
- Verify subject DN fields
- Review crypto enforcement policies
Next Steps
EST Enrollment Guide
Practical guide to setting up EST enrollment
Device Management
Learn about device lifecycle management
Certificate Authorities
Understand CA setup for enrollment
DMS Manager API
Explore the DMS Manager API
