Pre-Submission Checklist
Type Of Change
Checklist:
Description
Add auth_web3 module for blockchain-based authentication
This PR introduces a new authentication module that provides blockchain-powered
digest authentication via Oasis Sapphire smart contracts while maintaining full
compatibility with standard Kamailio auth module functions.
Key Features:
- Blockchain-based digest authentication via Oasis Sapphire smart contracts
- RFC2617 compliant MD5 and SHA-256 digest authentication
- Full compatibility with standard auth functions (www_authenticate, proxy_authenticate)
- Configurable parameters: web3_rpc_url, web3_contract_address, web3_debug_mode, web3_timeout
- Comprehensive error handling for network failures and blockchain connectivity
- Nonce management and replay protection identical to traditional auth
Files Added:
- src/modules/auth_web3/ (complete module with 9 .c files and supporting headers)
- Comprehensive documentation in doc/ subfolder
- CMakeLists.txt with curl dependency handling
Testing Summary:
- Build Verification: Module compiles successfully with curl dependency
- Load Testing: Module loads without errors in Kamailio configuration
- Authentication Scenarios:
- Valid credentials: Successful authentication with correct blockchain credentials
- Invalid credentials: Proper rejection of wrong passwords (tested with Zoiper)
- Network failures: Graceful handling of blockchain RPC connectivity issues
- Parameter validation: All module parameters properly validated
- Compatibility Testing: Full compatibility with existing auth module functions
- Error Handling: Comprehensive error logging and fallback behavior
Documentation Status:
- Complete XML documentation in doc/ subfolder
- Module parameters documented (auth_web3_params.xml)
- Functions documented (auth_web3_functions.xml)
- Configuration examples provided
- Usage patterns and best practices included
Limitations:
- Requires external blockchain RPC endpoint (Oasis Sapphire)
- Network dependency for authentication (no offline fallback)
- Requires curl library for HTTP requests to blockchain
- Smart contract must be deployed on target blockchain network
- Authentication speed depends on blockchain network response time
Build System:
- Added to MOD_LIST_UTILS group for proper curl dependency handling
- Includes CMakeLists.txt with find_package(CURL REQUIRED)
This module provides a drop-in replacement for traditional authentication while
leveraging blockchain technology for credential verification.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4328
Commit Summary
- d2377ba auth_web3: initial blockchain authentication module
- 1b929d1 cmake: add auth_web3 to MOD_LIST_UTILS group
File Changes
(27 files)
Patch Links:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4328@github.com>