How identinet/did-web-server works
Main Components
a) Core Server Components:
• HTTP Server Layer (Rocket Framework)
• DID Management Module
• Storage Layer (with multiple implementations)
• Resolver Module
• Authentication/Verification Layer
b) External Interfaces:
• HTTP/HTTPS Endpoints
• DNS System Integration
• File System Interface
Key Architectural Aspects to Highlight
a) Modular Storage Design:
• Both File-based and In-Memory storage implementations
• Storage interface/trait that allows for extensibility
b) Authentication Flow:
• Use of DIDs, Verifiable Credentials, and Verifiable Presentations
• Verification process flow
Specific Implementation Details
┌─ Client Layer ─────────────────────────┐
• HTTP/HTTPS Clients │
• ┬─────────────────────┘
• ↓
┌─ API Layer ──────────────────────────────────────────┐
• Rocket Web Framework │
• DID Registration │
• DID Resolution │
• DID Update │
• DID Deactivation │
• ┬────────────────────────────────────┘
• ↓
┌─ Core Services Layer ──────────────────────────────┐
• ┌─ DID Management ─┐ ┌─ Resolver ─┐ ┌─ Auth ─┐ │
• Creation │ │ - DNS │ │ - VC │ │
• Updates │ │ - HTTP │ │ - VP │ │
• Validation │ └───────────┘ └────────┘ │
• ┘ │
• ┬─────────────────────────────────┘
• ↓
┌─ Storage Layer ────────────────────────────────────┐
• ┌─ Storage Interface ─┐ │
• ┌─ File Store ─┐ │ │
• ┘ │ │
• ┌─ Memory Store ┐ │ │
• ┘ │ │
• ┘ │
• ┘
Important Elements
• Relationship between the DID document storage and the HTTP server
• Verification flow for DID operations
• Integration with DNS for did:web resolution
• Separation between authentication and DID management
Technical Details to Note
• Rocket framework as the web server implementation
• SSI library integration from Spruce Systems
• Storage abstraction that allows for different backends
• Test fixtures and their relationship to the testing infrastructure