OpenStack VM Management Platform
Wiretap is a comprehensive web-based platform for managing OpenStack virtual machine instances, designed for educational workshops, competitions, and team-based environments. It provides a user-friendly interface for provisioning, monitoring, and controlling VM instances with advanced features like scheduled lockouts, team management, and console access.
- VM Instance Management: Create, update, delete, and monitor OpenStack VM instances
- Power Controls: Start, stop, restart instances with soft/hard reboot options
- Real-time Status Sync: Automatic synchronization with OpenStack every 30 seconds
- Console Access: VNC/NoVNC console access for direct VM interaction
- Multi-Provider Support: Manage instances across multiple OpenStack providers
- Workshop Organization: Organize instances by workshops with custom configurations
- Team Management: Assign users to teams with role-based access control
- Scheduled Lockouts: Automatically lock/unlock instances based on time windows
- Competition Mode: Support for competitive environments with access restrictions
- Role-Based Access Control: Admin, Service Account, and regular user roles
- OpenID Connect Integration: SSO authentication support
- JWT Authentication: Secure token-based authentication
- Bulk User Operations: Generate and manage multiple users efficiently
- Pending Team Assignments: Manage team membership requests
- Provider Management: Configure and test OpenStack provider connections
- Instance Lockout Controls: Manual lock/unlock capabilities for instances
- System Statistics: Dashboard with usage statistics and metrics
- Audit Logging: Comprehensive logging system with automatic cleanup
- Service Account Management: Create and manage service accounts for automation
- RESTful API: Well-documented REST API with Swagger/OpenAPI documentation
- WebSocket Support: Real-time communication capabilities
- Scheduled Tasks: Automated background tasks for maintenance
- Database Abstraction: MySQL-based data persistence
- Framework: Express.js (Node.js)
- Database: MySQL
- Authentication: JWT + OpenID Connect
- API Documentation: Swagger/OpenAPI
- Scheduled Tasks: Automated instance sync, session cleanup, log maintenance
- Framework: Vue.js 3
- Build Tool: Vite
- UI Library: Headless UI + Heroicons
- Styling: Tailwind CSS
- State Management: Pinia
- Node.js (v16 or higher)
- MySQL (v5.7 or higher)
- OpenStack environment with API access
- npm or yarn package manager
git clone <repository-url>
cd wiretapcd backend
npm installCreate a .env file in the backend directory:
# Database Configuration
DB_HOST=localhost
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=wiretap
DB_PORT=3306
# Server Configuration
PORT=3000
NODE_ENV=development
# JWT Configuration
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=24h
# OpenID Connect (Optional)
OPENID_ISSUER=https://your-oidc-provider.com
OPENID_CLIENT_ID=your_client_id
OPENID_CLIENT_SECRET=your_client_secret
OPENID_REDIRECT_URI=http://localhost:3000/api/auth/openid/callback
# CORS Configuration
CORS_ORIGIN=http://localhost:5173cd frontend
npm installCreate a .env file in the frontend directory:
VITE_API_URL=http://localhost:3000The database tables will be automatically created on first run. Ensure your MySQL server is running and the database exists.
Backend:
cd backend
npm run devFrontend:
cd frontend
npm run devBackend:
cd backend
npm startFrontend:
cd frontend
npm run build
npm run previewThe backend API will be available at http://localhost:3000 and the frontend at http://localhost:5173 (development) or your configured production URL.
Once the backend is running, access the Swagger API documentation at:
http://localhost:3000/api-docs
Wiretap supports multiple authentication methods:
- Username/Password: Traditional login with JWT tokens
- OpenID Connect: SSO authentication via OIDC providers
- Service Accounts: Token-based authentication for automation
On first run, you may need to create an admin user. Check the authentication routes for user creation endpoints.
- Navigate to Providers section (Admin only)
- Add OpenStack provider credentials
- Test the connection
- Ingest existing instances if needed
- Create a new workshop
- Associate it with a provider
- Configure OpenStack project name
- Set lockout schedules if needed
- View all instances in the dashboard
- Filter by workshop, team, or status
- Use power controls to manage VM state
- Access console for direct VM interaction
- Sync instances to update status from OpenStack
- Create teams and assign users
- Associate instances with teams
- Manage pending team assignments
- Control access based on team membership
The application runs several automated tasks:
- Instance Status Sync: Every 30 seconds - Updates instance status from OpenStack
- Session Cleanup: Every hour - Removes expired console sessions
- Log Cleanup: Daily at 2 AM - Removes logs older than 7 days
- Lockout Scheduler: Monitors and enforces scheduled lockout windows
wiretap/
βββ backend/
β βββ index.js # Application entry point
β βββ routes/ # API route handlers
β βββ managers/ # Business logic managers
β βββ middleware/ # Express middleware
β βββ utils/ # Utility functions
β βββ swaggerConfig/ # API documentation config
βββ frontend/
β βββ src/
β β βββ components/ # Vue components
β β βββ views/ # Page views
β β βββ stores/ # Pinia stores
β β βββ router/ # Vue Router config
β βββ public/ # Static assets
βββ README.md
- Backend: Follow Express.js best practices
- Frontend: ESLint + Prettier configured
- Run
npm run lintandnpm run formatbefore committing
API endpoints are documented with Swagger. Use the Swagger UI to test endpoints interactively.
ISC
Contributions are welcome! Please ensure your code follows the project's style guidelines and includes appropriate tests.
For issues, questions, or contributions, please open an issue on the repository.
Built with β€οΈ for OpenStack VM management