How 61131/nginx-http-auth-totp works
Main Components
a. External Components:
• Client (Browser/API Client)
• Nginx Web Server
• TOTP Generator (Client-side authenticator app)
b. Internal Module Components:
• TOTP Authentication Module
• Configuration Handler
• TOTP Validator
• Cookie Manager
• User/Secret Store
Key Relationships to Highlight
Layer 1 (Client Interaction):
• Client making HTTP requests to Nginx
• TOTP generator (like Google Authenticator) interaction with the user
Layer 2 (Nginx Integration):
• How the module integrates with Nginx's request processing pipeline
• HTTP Basic Authentication flow
Layer 3 (Module Internals):
• TOTP validation logic
• Cookie-based session management
• User/secret file interaction
Specific Elements
Use the following visual elements:
• Diamonds for decision points
• Authentication requests
• TOTP validation
• Cookie management
• Configuration reading
Key Processes to Illustrate
a. Authentication Flow:
Session cookie creation and management
b. Configuration Flow:
Important Details to Note
• Configurable parameters:
• Time step (default 30s)
• TOTP length (1-8 digits)
• Skew window
• Cookie settings
• Realm configuration
Notes Section
A notes section highlighting:
• RFC compliance (4226, 6238, 7235)
• Security considerations
• Time synchronization requirements
• Cookie-based session handling
Remember to emphasize the integration points with Nginx and how the module hooks into the standard HTTP authentication flow. This will help developers understand both the module's operation and its place within the larger Nginx ecosystem.