lizenzserver API gedöns
Dieser Commit ist enthalten in:
@@ -1,14 +1,16 @@
|
||||
# TODO: Lizenzserver Konfiguration Implementation
|
||||
# Lizenzserver Konfiguration Implementation
|
||||
|
||||
## Overview
|
||||
Implement client configuration management and single-session enforcement for Account Forger software.
|
||||
✅ COMPLETED: Implemented client configuration management and single-session enforcement for Account Forger software.
|
||||
|
||||
## Current State
|
||||
- License activation works (consumes device slots)
|
||||
- Basic verification exists at `/api/license/verify`
|
||||
- No heartbeat system
|
||||
- No single-session enforcement
|
||||
- Admin panel has UI for "Lizenzserver Konfiguration" but backend is missing
|
||||
## Implementation Status (2025-06-21)
|
||||
✅ License activation works (consumes device slots)
|
||||
✅ Basic verification exists at `/api/license/verify`
|
||||
✅ Heartbeat system implemented (30-second intervals)
|
||||
✅ Single-session enforcement implemented
|
||||
✅ Admin panel has full UI and backend for "Lizenzserver Konfiguration"
|
||||
✅ Session management and monitoring
|
||||
✅ Automatic cleanup of expired sessions
|
||||
|
||||
## Requirements
|
||||
1. **Single Session Enforcement**: Only one device can run the software at a time (even if activated on multiple devices)
|
||||
@@ -16,9 +18,9 @@ Implement client configuration management and single-session enforcement for Acc
|
||||
3. **Version Management**: Control minimum supported version and update notifications
|
||||
4. **Client Configuration**: Manage Account Forger settings from admin panel
|
||||
|
||||
## Implementation Tasks
|
||||
## Completed Features
|
||||
|
||||
### 1. Database Schema
|
||||
### 1. Database Schema ✅
|
||||
|
||||
#### Admin Panel Database
|
||||
```sql
|
||||
@@ -63,9 +65,9 @@ CREATE TABLE session_history (
|
||||
);
|
||||
```
|
||||
|
||||
### 2. License Server Endpoints
|
||||
### 2. License Server Endpoints ✅
|
||||
|
||||
#### New endpoints needed in `/v2_lizenzserver/app/api/license.py`:
|
||||
#### Implemented endpoints in `/v2_lizenzserver/app/api/license.py`:
|
||||
|
||||
1. **POST /api/license/session/start**
|
||||
- Input: license_key, machine_id, hardware_hash, version
|
||||
@@ -86,9 +88,9 @@ CREATE TABLE session_history (
|
||||
|
||||
4. **Background job**: Clean up sessions older than 60 seconds without heartbeat
|
||||
|
||||
### 3. Admin Panel Implementation
|
||||
### 3. Admin Panel Implementation ✅
|
||||
|
||||
#### Routes needed in `/v2_adminpanel/routes/admin_routes.py`:
|
||||
#### Implemented routes in `/v2_adminpanel/routes/admin_routes.py`:
|
||||
|
||||
1. **GET /lizenzserver/config**
|
||||
- Show current client configuration
|
||||
@@ -105,9 +107,9 @@ CREATE TABLE session_history (
|
||||
4. **POST /lizenzserver/sessions/{session_id}/terminate**
|
||||
- Force close a session (admin only: rac00n, w@rh@mm3r)
|
||||
|
||||
5. **GET /lizenzserver/config/client/new** (currently 404)
|
||||
- This is what's missing and causing the error
|
||||
- Should handle creating initial client config
|
||||
5. **GET /lizenzserver/config/client/new** ✅
|
||||
- Shows client configuration page
|
||||
- Handles initial client config and updates
|
||||
|
||||
### 4. Security
|
||||
|
||||
@@ -152,18 +154,51 @@ CREATE TABLE session_history (
|
||||
- View session history (last 24h)
|
||||
- Manage client configuration
|
||||
|
||||
## Implementation Order
|
||||
## Implementation Completed
|
||||
|
||||
1. Create database tables
|
||||
2. Implement session management in license server
|
||||
3. Add heartbeat endpoint
|
||||
4. Create admin panel routes for configuration
|
||||
5. Implement session viewing/management
|
||||
6. Add background cleanup job
|
||||
7. Test with Account Forger client
|
||||
1. ✅ Created database tables (client_configs, license_sessions, session_history)
|
||||
2. ✅ Implemented session management in license server
|
||||
3. ✅ Added heartbeat endpoint
|
||||
4. ✅ Created admin panel routes for configuration
|
||||
5. ✅ Implemented session viewing/management with terminate capability
|
||||
6. ✅ Added background cleanup job (runs every 60 seconds)
|
||||
7. ⏳ Ready for testing with Account Forger client
|
||||
|
||||
## Notes
|
||||
- YAGNI: One global config for all Account Forger instances
|
||||
- No per-customer settings
|
||||
- No grace period for session reclaim
|
||||
- Generic error messages (no "who's using it" info)
|
||||
## Implementation Notes
|
||||
- ✅ YAGNI: One global config for all Account Forger instances
|
||||
- ✅ No per-customer settings
|
||||
- ✅ No grace period for session reclaim
|
||||
- ✅ Generic error messages (no "who's using it" info)
|
||||
- ✅ Version format: 1.0.0
|
||||
- ✅ Session tokens: UUID format
|
||||
- ✅ Background cleanup: Every 60 seconds
|
||||
- ✅ API Key: Single global key stored in client_configs
|
||||
|
||||
## UI Improvements (2025-06-21)
|
||||
|
||||
### Single-Page Administration
|
||||
- ✅ Merged all configuration into the main administration page
|
||||
- ✅ Removed separate "Account Forger Konfiguration" page
|
||||
- ✅ Removed "Neuer Client" button (not needed with single global config)
|
||||
|
||||
### Account Forger Configuration Section
|
||||
- ✅ Inline version management (current and minimum version)
|
||||
- ✅ API key display with copy-to-clipboard functionality
|
||||
- ✅ Removed download_url and whats_new fields (handled elsewhere)
|
||||
- ✅ Direct save without page navigation
|
||||
|
||||
### Live Session Monitor
|
||||
- ✅ Real-time session count with badge
|
||||
- ✅ Mini table showing last 5 active sessions
|
||||
- ✅ Auto-refresh every 30 seconds via AJAX
|
||||
- ✅ "Alle anzeigen" link to full session management page
|
||||
|
||||
### Technical Settings
|
||||
- ✅ Feature flags in collapsible accordion
|
||||
- ✅ Rate limits in collapsible accordion
|
||||
- ✅ Clean separation between daily operations and technical settings
|
||||
|
||||
### Database Schema Updates
|
||||
- ✅ Removed download_url column from client_configs
|
||||
- ✅ Removed whats_new column from client_configs
|
||||
- ✅ Simplified to only essential configuration fields
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren