Skip to content

Commit 0dd71bd

Browse files
committed
feat: Complete iTop Integration v1.0.0 - Comprehensive Nextcloud ITSM Integration
🎟️ Complete iTop ITSM Integration for Nextcloud A comprehensive integration that brings iTop IT Service Management functionality directly into Nextcloud, enabling seamless access to tickets, incidents, and configuration items without leaving the collaboration platform. ✨ Key Features: • Dynamic Reference Provider - Rich link previews in Talk, Deck, Collectives • Unified Search Integration - Search iTop tickets from Nextcloud search bar • Smart Picker - Insert iTop references in Text app and Talk • Professional Settings Dashboard - Real-time status monitoring • Enterprise Admin Panel - Centralized configuration and user management • Secure Dual-Token Architecture - Enhanced security with data isolation 🔐 Security: • Application token (admin-level) for all API queries • Personal token for one-time identity verification (never stored) • Person ID mapping for secure user identification • Data isolation - users only see their own data • Portal user support via SAML/external authentication 🏗️ Architecture: • Clean MVC structure with dedicated service layer • Professional UI matching Nextcloud design standards • Comprehensive error handling and logging • Modular design for easy extension 📋 Components: • Reference Provider for rich link previews • Search Provider for unified search integration • Dashboard Widget for ticket overview • Admin/Personal Settings interfaces • Background notification system • REST API integration layer 🎯 Perfect for IT teams, help desk agents, service managers, and end users managing incidents and service requests in organizations using both Nextcloud and iTop ITSM. Requires: Nextcloud 30.0+, iTop 1.3+ with REST API, PHP 8.1+ License: AGPL-3.0
1 parent 9c77ffc commit 0dd71bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+21268
-472
lines changed

.eslintrc.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
extends: [
3+
'@nextcloud',
4+
],
5+
globals: {
6+
__webpack_nonce__: 'writable',
7+
__webpack_public_path__: 'writable',
8+
},
9+
}

.gitignore

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,60 @@
1+
# Dependencies
12
vendor/
2-
.DS_Store
3-
*.log
3+
node_modules/
4+
composer.lock
5+
6+
# Node/Vite build artifacts
7+
dist/
8+
.vite/
9+
vite.config.local.*.ts
10+
npm-debug.log*
11+
yarn-error.log*
12+
pnpm-debug.log*
13+
14+
# Nextcloud build artifacts
15+
appstore/
16+
build/
17+
.php_cs.cache
18+
.php-cs-fixer.cache
19+
20+
# Vite build outputs (reference widget)
21+
# Note: admin-settings.js and personal-settings.js are NOT generated by vite
22+
# They are manually created and must be tracked in git
23+
js/*.mjs
24+
js/*.mjs.map
25+
js/vendor.LICENSE.txt
26+
27+
# IDE files
428
.idea/
529
.vscode/
6-
node_modules/
7-
/build/
8-
/js/
9-
/css/*.css
10-
/css/*.css.map
11-
krankerl.toml
30+
.warp.md
31+
.claude
32+
33+
# OS/System files
34+
.DS_Store
35+
Thumbs.db
36+
*.swp
37+
*~
38+
39+
# Logs
40+
*.log
41+
42+
# Testing/Coverage
43+
coverage/
44+
junit.xml
45+
.phpunit.result.cache
46+
47+
# Temporary files
48+
*.tmp
49+
*.temp
50+
51+
# Backup files
52+
*.bak
53+
*.backup
54+
55+
# Cache
56+
.cache/
57+
58+
# Environment files
59+
.env
60+
.env.local

README.md

Lines changed: 222 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,233 @@
1-
# Nextcloud iTop integration
1+
# iTop Integration for Nextcloud
22

3-
🎫 iTop integration into Nextcloud
3+
🎟️ **Complete iTop ITSM Integration** - Seamlessly connect your Nextcloud with iTop IT Service Management
44

5-
This app provides integration between Nextcloud and iTop IT Service Management platform. It allows users to:
5+
A comprehensive Nextcloud integration that brings iTop ITSM functionality directly into your Nextcloud environment, enabling users to access tickets, incidents, and configuration items without leaving their collaboration platform.
66

7-
- View assigned tickets on the Nextcloud dashboard
8-
- Search for tickets and configuration items from Nextcloud's unified search
9-
- Get notifications for new assigned tickets
10-
- Rich previews of iTop links in Nextcloud apps
7+
## ✨ Key Features
118

12-
## Features
9+
### 🔗 Dynamic Reference Provider
10+
Transform iTop links into rich, interactive previews across Nextcloud apps (Talk, Deck, Collectives, etc.).
1311

14-
- **Dashboard widget**: Shows your assigned tickets and recent activity
15-
- **Unified search**: Search tickets, incidents, and CIs directly from Nextcloud
16-
- **Notifications**: Get notified when new tickets are assigned to you
17-
- **Rich references**: Share iTop links with rich previews in Talk and other apps
12+
![Dynamic Reference Provider Screenshot](docs/images/dynamic-reference-provider.png)
1813

19-
## Configuration
14+
**Features:**
15+
- Automatic link detection and rich preview generation
16+
- Detailed ticket information display
17+
- Status indicators and priority badges
18+
- Direct navigation to iTop
19+
- Works in Talk chats, Deck cards, and Collectives documents
2020

21-
### Admin settings
22-
1. Go to Settings > Administration > Connected accounts
23-
2. Configure your iTop server URL and admin settings
21+
### 🔍 Unified Search Integration
22+
Search your iTop tickets and CIs directly from Nextcloud's unified search bar.
2423

25-
### User settings
26-
1. Go to Settings > Connected accounts
27-
2. Enter your iTop server URL (if not set by admin)
28-
3. Configure your personal API token from iTop
24+
![Unified Search Screenshot](docs/images/unified-search.png)
2925

30-
### iTop API Token Setup
31-
1. Log into your iTop instance
32-
2. Go to "My Account" menu
33-
3. Generate a personal API token with appropriate scopes
34-
4. Copy and paste the token into Nextcloud settings
26+
**Features:**
27+
- Search tickets by title, description, or reference number
28+
- Filter results by ticket type (Incidents, User Requests)
29+
- Real-time status and priority indicators
30+
- Quick access to ticket details
31+
- Searches tickets you created or are assigned to
3532

36-
## Requirements
33+
### 🎯 Smart Picker Integration
34+
Quick access to iTop content when creating or editing documents and communications.
3735

38-
- Nextcloud 30+
39-
- iTop with REST/JSON API enabled
40-
- iTop Authentication by Token extension installed
36+
![Smart Picker Screenshot](docs/images/smart-picker.png)
37+
38+
**Features:**
39+
- Browse recent tickets and CIs
40+
- Search and filter functionality
41+
- Insert references with rich previews
42+
- Context-aware suggestions
43+
- Seamless integration with Text app and Talk
44+
45+
### ⚙️ Personal Settings Dashboard
46+
Professional user configuration with real-time status monitoring.
47+
48+
![Personal Settings Screenshot](docs/images/personal-settings.png)
49+
50+
**Features:**
51+
- Secure token-based authentication
52+
- Real-time connection status
53+
- User profile information display
54+
- Open tickets counter (Incidents + User Requests)
55+
- Notification preferences management
56+
- Clean, intuitive interface
57+
58+
### 🛠️ Admin Configuration Panel
59+
Comprehensive administration interface for system-wide configuration.
60+
61+
![Admin Settings Screenshot](docs/images/admin-settings1.png)
62+
![Admin Settings Screenshot](docs/images/admin-settings2.png)
63+
64+
**Features:**
65+
- Application token management (encrypted storage)
66+
- Connection testing and validation
67+
- User-facing name customization
68+
- Connected users monitoring
69+
- Professional, theme-aware UI
70+
71+
## 🔐 Security Architecture
72+
73+
**Dual-Token Approach:**
74+
- **Application Token**: Admin-level token (encrypted) for all data queries
75+
- **Personal Token**: User-provided token for one-time identity verification only (never stored)
76+
- **Person ID Mapping**: Secure user identification without exposing sensitive data
77+
- **Data Isolation**: All queries filtered by Person ID to ensure users only see their own data
78+
- **Portal User Support**: Works with SAML/external authentication through iTop Portal Personal Tokens extension
79+
80+
## 🚀 Installation
81+
82+
### Prerequisites
83+
- Nextcloud 30.0 or higher
84+
- iTop with REST API enabled (version 1.3+)
85+
- PHP 8.1 or higher
86+
- [iTop Portal Personal Tokens Extension](https://github.com/LexioJ/itop-portal-personal-tokens) (recommended for Portal users)
87+
88+
### Quick Setup
89+
1. **Install the app**:
90+
```bash
91+
# Place in apps directory and enable
92+
sudo -u www-data php occ app:enable integration_itop
93+
```
94+
95+
2. **Configure admin settings** (Settings → Administration → iTop Integration):
96+
- Enter your iTop server URL
97+
- Add application token (see configuration guide below)
98+
- Test connection
99+
100+
3. **Users configure personal settings** (Settings → Personal → iTop Integration):
101+
- Add personal token for identity verification
102+
- Enable desired features (search, notifications)
103+
104+
## ⚙️ Configuration Guide
105+
106+
### Admin Configuration
107+
108+
1. **Create Application Token in iTop**:
109+
- Login as Administrator in iTop
110+
- Navigate to: **Admin tools → User accounts → + New... → Application Token**
111+
- Configure:
112+
- **Person**: Select admin user
113+
- **Profiles**: **Administrator** + **REST Services User**
114+
- **Remote application**: "Nextcloud Integration"
115+
- **Scope**: **REST/JSON**
116+
- Save and copy the generated token (shown only once)
117+
118+
2. **Configure in Nextcloud**:
119+
- Go to **Settings → Administration → iTop Integration**
120+
- Enter your iTop server URL (e.g., `https://itop.company.com`)
121+
- Paste the application token
122+
- Customize the user-facing name (default: "iTop")
123+
- Click "Test Connection" to verify
124+
125+
### User Setup
126+
127+
1. **Create Personal Token in iTop**:
128+
- **Portal Users**: Use "Personal Tokens" in My Profile (requires Portal Personal Tokens extension)
129+
- **Regular Users**: Navigate to **My Account → Personal Tokens**
130+
- Create token with **REST/JSON** scope
131+
- Copy token immediately (shown only once)
132+
133+
2. **Configure Personal Settings**:
134+
- Go to **Settings → Personal → iTop Integration**
135+
- Paste your personal token
136+
- Click **Save** - the token validates your identity and is then discarded
137+
- View your real-time status dashboard
138+
139+
## 🏗️ Technical Architecture
140+
141+
### Core Components
142+
```
143+
lib/
144+
├── Controller/
145+
│ ├── ConfigController.php # Settings and user validation
146+
│ └── ItopAPIController.php # API endpoints for tickets/CIs
147+
├── Service/
148+
│ └── ItopAPIService.php # Core iTop API integration
149+
├── Reference/
150+
│ └── ItopReferenceProvider.php # Dynamic link previews
151+
├── Search/
152+
│ ├── ItopSearchProvider.php # Unified search integration
153+
│ └── ItopSearchResultEntry.php # Search result formatting
154+
├── Dashboard/
155+
│ └── ItopWidget.php # Dashboard widget
156+
└── Settings/
157+
├── Admin.php # Admin configuration panel
158+
└── Personal.php # User settings interface
159+
```
160+
161+
### API Integration
162+
- **REST API Version**: 1.3+
163+
- **Authentication**: Token-based (Auth-Token header)
164+
- **Query Method**: POST with form-encoded JSON data
165+
- **Response Format**: JSON with object arrays
166+
- **Security**: All queries filtered by Person ID for data isolation
167+
168+
### Supported iTop Objects
169+
- **Tickets**: UserRequest, Incident
170+
- **Configuration Items**: FunctionalCI and subclasses
171+
- **Persons**: User profile information
172+
- **Organizations**: Company/department info
173+
174+
## 🔧 Development
175+
176+
### Architecture Principles
177+
- **Clean separation**: MVC pattern with dedicated service layer
178+
- **Security first**: Dual-token architecture prevents unauthorized access
179+
- **User experience**: Professional UI matching Nextcloud design standards
180+
- **Extensibility**: Modular design allows easy feature additions
181+
182+
### Key Files for Extension
183+
- `ItopAPIService.php` - Add new API interactions here
184+
- `ItopAPIController.php` - Add new REST endpoints
185+
- `ItopReferenceProvider.php` - Customize link preview behavior
186+
- `ItopSearchProvider.php` - Extend search functionality
187+
188+
### Testing Environment
189+
- Containerized development setup
190+
- Database backend compatibility testing
191+
- Comprehensive error handling and logging
192+
193+
## 📋 Roadmap
194+
195+
### ✅ v1.0.0 (Current Release)
196+
- [x] Dynamic Reference Provider with rich link previews
197+
- [x] Unified Search integration
198+
- [x] Smart Picker for content insertion
199+
- [x] Personal Settings dashboard
200+
- [x] Admin Configuration panel
201+
- [x] Secure dual-token authentication
202+
- [x] Dashboard widget for ticket overview
203+
- [x] Background notifications for new assignments
204+
205+
### 🔄 Future Enhancements
206+
- [ ] Advanced filtering and sorting options
207+
- [ ] Ticket creation from within Nextcloud
208+
- [ ] Configuration Item browsing and management
209+
- [ ] Enhanced notification system with email digest
210+
- [ ] API rate limiting and caching improvements
211+
- [ ] Multi-language support expansion
212+
213+
## 🆘 Support
214+
215+
### Common Issues
216+
- **Connection failed**: Verify iTop server URL and application token
217+
- **User not configured**: Ensure personal token was created and validated
218+
- **Search not working**: Check that search is enabled in personal settings
219+
- **Links not previewing**: Verify reference provider is properly configured
220+
221+
### Getting Help
222+
- Check the logs: `data/nextcloud.log`
223+
- Review iTop API logs for authentication issues
224+
- Ensure all prerequisites are met
225+
- Verify token permissions and scopes
226+
227+
## 📄 License
228+
229+
This project is licensed under the AGPL v3 License - see the [LICENSE](LICENSE) file for details.
230+
231+
---
232+
233+
**Developed for seamless ITSM integration** • Made with ❤️ for the Nextcloud community

0 commit comments

Comments
 (0)