Security Model & Data Privacy
Relevant source files
The following files were used as context for generating this wiki page:
LuCI Mobile implements a client-side security model centered on local data sovereignty and secure router communication. The system architecture ensures that sensitive administrative credentials and network telemetry remain strictly between the user's mobile device and the OpenWrt router.
The application operates as an independent, third-party client for LuCI RPC, prioritizing encryption for data at rest and in transit. It avoids third-party tracking, analytics, and external data storage to maintain user privacy.
Sources: README.md:94-96, PRIVACY_POLICY.md:10-18, fastlane/metadata/android/en-US/full_description.txt:38-42
Data Sovereignty and Storage
LuCI Mobile stores all user-provided information locally on the device. It does not transmit credentials or usage statistics to external servers or third-party services.
Local Credential Encryption
The application requires the router's IP address, username, and password to establish a connection. To protect these at rest, the app uses flutter_secure_storage, which utilizes platform-specific secure enclaves (like Keychain on iOS or Keystore on Android).
Sources: PRIVACY_POLICY.md:12-16, README.md:94, pubspec.yaml:49
Privacy-By-Design Principles
| Data Type | Storage Location | Transmission |
|---|---|---|
| User Credentials | Local (Encrypted) | Only to Router |
| Network Telemetry | Real-time / RAM | None |
| Analytics/Usage Data | Not Collected | None |
| Third-party SDKs | None Included | N/A |
| Sources: PRIVACY_POLICY.md:10-25, README.md:94-96 |
Communication Security
The application manages communication between the mobile client and the OpenWrt router through the LuCI RPC protocol.
Transport Layer Security
LuCI Mobile supports both HTTP and HTTPS protocols. For HTTPS connections, the application specifically handles self-signed certificates, which are common in local router environments. The app prompts the user to verify and trust these certificates manually based on their fingerprints.
Sources: PRIVACY_POLICY.md:33-35, README.md:94-95, fastlane/metadata/android/en-US/full_description.txt:29-30
Connection Flow
The following diagram illustrates the direct communication path between the App and the Router, emphasizing the absence of intermediate servers.
Sources: PRIVACY_POLICY.md:13-25, README.md:14-16
Configuration Safety and Integrity
The application integrates with OpenWrt's native safety mechanisms to prevent configuration-induced lockouts.
Apply-with-Rollback Protocol
When making network configuration changes (e.g., SSID edits, firewall rules), the app utilizes the router's apply-with-rollback protocol. If the mobile client cannot confirm the change within a specific timeout—indicating a potential loss of connectivity—the router automatically reverts to the previous stable configuration.
Sources: README.md:88-92, fastlane/metadata/android/en-US/full_description.txt:26-28
Permission Validation
If a specific router does not grant the required permissions for the rollback protocol, the application warns the user before committing the change immediately.
Sources: README.md:90-93
Static Analysis and Resource Management
The project enforces security and stability through strict static analysis rules in analysis_options.yaml.
Critical Linting Rules
The codebase must comply with specific rules to prevent memory leaks and ensure basic security practices during development.
- Resource Management:
close_sinksandcancel_subscriptionsare enabled to ensure memory safety. - Data Leakage Prevention:
avoid_printis enabled to prevent sensitive information from appearing in production logs. - Stability:
unawaited_futuresandavoid_catching_errorsare utilized to ensure robust error handling.
Sources: analysis_options.yaml:40-54
System Permissions
LuCI Mobile requests only the necessary permissions required for router management.
| Permission | Usage Context |
|---|---|
android.permission.INTERNET | Required for RPC communication with the router and development debugging. |
android.permission.POST_NOTIFICATIONS | (Android 13+) Used for background network activity monitoring alerts. |
| Sources: android/app/src/main/AndroidManifest.xml:2-5, android/app/src/debug/AndroidManifest.xml:6 |
Summary
The Security Model & Data Privacy framework for LuCI Mobile relies on three pillars: local encryption of credentials using flutter_secure_storage, direct device-to-router communication without third-party telemetry, and the use of the OpenWrt apply-with-rollback protocol for configuration integrity. These measures ensure that the user maintains full control over their network data and administrative access.
Sources: PRIVACY_POLICY.md, README.md:88-96