Files
smom-dbis-138/orchestration/portal/ADMIN_PANEL.md
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- 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.
2025-12-12 14:57:48 -08:00

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

  1. Service Management

    • View all services
    • Enable/disable services
    • Track service configuration changes
  2. Provider Management

    • View all cloud providers
    • Enable/disable providers
    • Track provider configuration changes
  3. Environment Management

    • View all environments
    • Enable/disable environments
    • Updates environments.yaml file
  4. Audit Logging

    • View all admin actions
    • Track who made changes
    • IP address logging
    • Timestamp tracking
  5. 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 set ADMIN_PASSWORD environment variable)

API Endpoints

Authentication

  • POST /api/admin/login - Login and get admin token

Services

  • GET /api/admin/services - Get all services
  • GET /api/admin/services/:name - Get specific service
  • PUT /api/admin/services/:name - Update service (enable/disable)

Providers

  • GET /api/admin/providers - Get all providers
  • GET /api/admin/providers/:name - Get specific provider
  • PUT /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 key
  • service_name - Unique service identifier
  • enabled - Boolean flag
  • config_json - JSON configuration
  • updated_at - Timestamp
  • updated_by - Admin username

provider_config

  • id - Primary key
  • provider_name - Unique provider identifier
  • enabled - Boolean flag
  • config_json - JSON configuration
  • updated_at - Timestamp
  • updated_by - Admin username

admin_audit_log

  • id - Primary key
  • admin_user - Username who made the change
  • action - Action performed
  • resource_type - Type of resource (service, provider, environment)
  • resource_id - Resource identifier
  • details - JSON details
  • ip_address - IP address of admin
  • timestamp - When the action occurred

Usage

Enabling/Disabling Services

  1. Navigate to Admin Panel
  2. Click on "Services" tab
  3. Toggle the switch for any service
  4. Changes are saved immediately
  5. Audit log entry is created

Enabling/Disabling Providers

  1. Navigate to Admin Panel
  2. Click on "Providers" tab
  3. Toggle the switch for any provider
  4. Changes are saved immediately
  5. Audit log entry is created

Enabling/Disabling Environments

  1. Navigate to Admin Panel
  2. Click on "Environments" tab
  3. Toggle the switch for any environment
  4. Changes update environments.yaml file
  5. 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: admin or ADMIN_PASSWORD env 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