seaislee1209 7feb007f57 feat: rewrite API Key management as manual entry mode
- New ArkApiKey model (encrypted storage, bound to user+project)
- Admin enters API Key from Volcengine console into AirGate
- Sub-accounts can only view their own keys
- Reveal endpoint decrypts key on demand with audit log
- Updated research report: documented Ark API limitation (CreateApiKey
  doesn't return plaintext) and manual entry solution

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 01:25:12 +08:00

58 lines
2.5 KiB
Python

from django.urls import path
from . import views
urlpatterns = [
# Dashboard
path('dashboard/', views.dashboard_view),
# Volcengine account management
path('volc-accounts/', views.volc_account_view),
path('volc-accounts/<int:pk>/', views.volc_account_detail_view),
path('volc-accounts/<int:pk>/test/', views.volc_account_test_view),
# IAM user management
path('iam-users/', views.iam_user_list_view),
path('iam-users/create/', views.iam_user_create_view),
path('iam-users/sync/', views.iam_user_sync_view),
path('iam-users/import/', views.iam_user_import_view),
path('iam-users/<int:pk>/', views.iam_user_detail_view),
path('iam-users/<int:pk>/update/', views.iam_user_update_view),
path('iam-users/<int:pk>/disable/', views.iam_user_disable_view),
path('iam-users/<int:pk>/enable/', views.iam_user_enable_view),
path('iam-users/<int:pk>/policies/', views.iam_user_policies_view),
path('iam-users/<int:pk>/policies/attach/', views.iam_user_attach_policy_view),
path('iam-users/<int:pk>/policies/detach/', views.iam_user_detach_policy_view),
# IAM user projects (multi-project)
path('iam-users/<int:pk>/projects/', views.iam_user_project_list_view),
path('iam-users/<int:pk>/projects/add/', views.iam_user_project_add_view),
path('iam-users/<int:pk>/projects/<int:pid>/', views.iam_user_project_update_view),
path('iam-users/<int:pk>/projects/<int:pid>/policies/', views.iam_user_project_policies_view),
path('iam-users/<int:pk>/projects/<int:pid>/delete/', views.iam_user_project_delete_view),
path('iam-users/<int:pk>/projects/toggle-all/', views.iam_user_project_toggle_all_view),
# Quota
path('iam-users/<int:pk>/allocate/', views.quota_allocate_view),
path('iam-users/<int:pk>/quota-history/', views.quota_history_view),
# Billing
path('billing/overview/', views.spending_overview_view),
path('billing/refresh/', views.spending_refresh_view),
path('billing/balance/', views.balance_view),
# Global config
path('config/', views.global_config_view),
# Alerts
path('alerts/', views.alert_list_view),
# Projects
path('projects/', views.project_list_view),
# Ark API Key management (manual entry)
path('ark-keys/', views.ark_key_list_view),
path('ark-keys/create/', views.ark_key_create_view),
path('ark-keys/<int:pk>/', views.ark_key_update_view),
path('ark-keys/<int:pk>/delete/', views.ark_key_delete_view),
path('ark-keys/<int:pk>/reveal/', views.ark_key_reveal_view),
]