- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
4.0 KiB
4.0 KiB
🔐 Admin Panel Documentation
Overview
The Admin Panel provides a comprehensive interface for managing services, providers, and environments in the Multi-Cloud Orchestration Portal.
Features
✅ Implemented
-
Service Management
- View all services
- Enable/disable services
- Track service configuration changes
-
Provider Management
- View all cloud providers
- Enable/disable providers
- Track provider configuration changes
-
Environment Management
- View all environments
- Enable/disable environments
- Updates
environments.yamlfile
-
Audit Logging
- View all admin actions
- Track who made changes
- IP address logging
- Timestamp tracking
-
Authentication
- Simple token-based authentication
- Session management
- Secure admin routes
Access
URL: http://localhost:5000/admin (or /admin in the Vue app)
Default Credentials:
- Username:
admin - Password:
admin(or setADMIN_PASSWORDenvironment variable)
API Endpoints
Authentication
POST /api/admin/login- Login and get admin token
Services
GET /api/admin/services- Get all servicesGET /api/admin/services/:name- Get specific servicePUT /api/admin/services/:name- Update service (enable/disable)
Providers
GET /api/admin/providers- Get all providersGET /api/admin/providers/:name- Get specific providerPUT /api/admin/providers/:name- Update provider (enable/disable)
Environments
PUT /api/admin/environments/:name/toggle- Toggle environment enabled/disabled
Audit Logs
GET /api/admin/audit-logs?limit=100- Get audit logs
Database Schema
service_config
id- Primary keyservice_name- Unique service identifierenabled- Boolean flagconfig_json- JSON configurationupdated_at- Timestampupdated_by- Admin username
provider_config
id- Primary keyprovider_name- Unique provider identifierenabled- Boolean flagconfig_json- JSON configurationupdated_at- Timestampupdated_by- Admin username
admin_audit_log
id- Primary keyadmin_user- Username who made the changeaction- Action performedresource_type- Type of resource (service, provider, environment)resource_id- Resource identifierdetails- JSON detailsip_address- IP address of admintimestamp- When the action occurred
Usage
Enabling/Disabling Services
- Navigate to Admin Panel
- Click on "Services" tab
- Toggle the switch for any service
- Changes are saved immediately
- Audit log entry is created
Enabling/Disabling Providers
- Navigate to Admin Panel
- Click on "Providers" tab
- Toggle the switch for any provider
- Changes are saved immediately
- Audit log entry is created
Enabling/Disabling Environments
- Navigate to Admin Panel
- Click on "Environments" tab
- Toggle the switch for any environment
- Changes update
environments.yamlfile - Audit log entry is created
Security
- All admin routes require authentication token
- Token is stored in localStorage
- Token expires after 24 hours
- All actions are logged in audit log
- IP addresses are tracked
Future Enhancements
- Role-based access control (RBAC)
- Multi-user support
- Password hashing (bcrypt)
- JWT tokens instead of simple tokens
- Two-factor authentication (2FA)
- Email notifications for admin actions
- Advanced filtering in audit logs
- Export audit logs to CSV/PDF
Troubleshooting
Can't login
- Check username is
admin - Check password (default:
adminorADMIN_PASSWORDenv var) - Check browser console for errors
Changes not saving
- Check authentication token is valid
- Check browser console for API errors
- Check server logs for errors
Audit logs not showing
- Check database is initialized
- Check admin_audit_log table exists
- Check authentication token is valid
Last Updated: 2024-11-19 Version: 1.0.0