Overview
Loom LDAP Browser includes an offline demo mode that provides a fully functional in-memory LDAP directory. This is perfect for:- Testing the application without an LDAP server
- Demonstrating features in presentations or tutorials
- Developing and testing UI changes
- Learning LDAP concepts in a safe sandbox
Offline mode is implemented in
loom-core/src/offline.rs and provides a complete mock LDAP directory with realistic sample data.Enabling Offline Mode
In Configuration File
Addoffline = true to any connection profile in ~/.config/loom-ldapbrowser/config.toml:
Add offline profile
Add a connection with
offline = true. The host and port values are ignored in offline mode, but should be provided for consistency.From Connection Dialog
You can also enable offline mode when creating a new connection:Create new connection
Fill in basic connection details. The actual host and port don’t matter for offline mode.
Enable offline mode
Toggle the “Offline” field to
true (implementation may vary depending on the UI).Demo Directory Structure
The offline demo directory contains realistic sample data resembling a typical organization’s LDAP setup:Sample Entries
People (ou=people)
People (ou=people)
User entries with typical
inetOrgPerson and posixAccount attributes:Groups (ou=groups)
Groups (ou=groups)
Group entries with member references:
Systems (ou=systems)
Systems (ou=systems)
System and device entries:
Supported Operations
Offline mode supports all major LDAP operations, making it ideal for testing:Search
Full filter support including complex boolean filters. Uses in-memory filtering that mimics real LDAP behavior.
Modify
Add, replace, and delete attributes. Changes are stored in memory for the session.
Add
Create new entries under any branch. Schema validation is applied.
Delete
Remove entries from the directory. Subtree deletion is supported.
Schema
Browse object classes and attribute types from a built-in schema subset.
Export/Import
Export to LDIF, JSON, CSV, XLSX formats. Import is fully functional.
All modifications in offline mode are session-only and stored in memory. When you disconnect or quit the application, changes are lost.
Use Cases
Testing UI Changes
When developing new features or modifying the UI, offline mode lets you test without affecting a real LDAP server:Demonstrating Features
For presentations, tutorials, or screenshots, offline mode provides consistent, realistic data:Learning LDAP
New users can explore LDAP concepts without setting up a server:- Navigate the directory tree structure
- Experiment with LDAP filters (e.g.,
(objectClass=person),(uid=alice*)) - Practice attribute editing
- Test bulk updates safely
- Export data to understand LDIF format
Limitations
| Feature | Offline Mode | Real LDAP |
|---|---|---|
| Persistence | ❌ Memory only | ✅ Persistent storage |
| Concurrency | ❌ Single session | ✅ Multi-client |
| Replication | ❌ Not available | ✅ Multi-master |
| Complex ACLs | ❌ No access control | ✅ Full ACL support |
| Referrals | ❌ Not supported | ✅ Supported |
| Partial Schema | ⚠️ Limited object classes | ✅ Full schema |
Schema Limitations
The offline demo includes a subset of common object classes:top,person,organizationalPerson,inetOrgPersonposixAccount,posixGroupgroupOfNames,groupOfUniqueNamesorganizationalUnit,organization,domaindevice,ipHost
Implementation Details
Offline mode is implemented inloom-core/src/offline.rs as an in-memory LDAP backend:
The implementation uses the same
LdapEntry types as the real connection, ensuring consistent behavior between offline and online modes.Switching Between Offline and Online
You can run both offline and online connections simultaneously using tabs:Connect to offline profile
Start with an offline connection (auto-connects if it’s the first profile in config.toml).
Connect to real LDAP server
Select a non-offline profile. The real LDAP connection will open in a new tab.
Resetting Demo Data
Since offline mode is memory-only, simply disconnect and reconnect to reset the demo directory to its initial state:- Close the tab with
Ctrl+w - Reconnect via
F2or relaunch the application