mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-06 15:12:30 +09:00
Add full SSO (Google, GitHub, generic OIDC, SAML) support and integrate Alembic-based DB migrations. Introduces OAuthIdentity model, sso_service, SSO API blueprint (authorize/callback/link/unlink/admin/config/test), and settings to enable/configure providers and enforce SSO-only logins. Integrates Flask-Migrate and a MigrationService with API endpoints for status/backup/apply/history and includes Alembic scaffolding (migrations/versions/001_baseline.py). Update app init to register SSO and migrations blueprints and initialize Migrate; replace fragile auto-column hack with MigrationService.prepare/check. Update User model (nullable password_hash, auth_provider, has_password/to_dict fields), add AuditLog SSO actions, add frontend SSO components/pages and a migration UI, and update ROADMAP and requirements. Notes: token encryption uses Fernet derived from SECRET_KEY; migrations may add the new auth_provider column at startup.
30 lines
1.6 KiB
Python
30 lines
1.6 KiB
Python
from app.models.user import User
|
|
from app.models.application import Application
|
|
from app.models.domain import Domain
|
|
from app.models.env_variable import EnvironmentVariable, EnvironmentVariableHistory
|
|
from app.models.notification_preferences import NotificationPreferences
|
|
from app.models.deployment import Deployment, DeploymentDiff
|
|
from app.models.system_settings import SystemSettings
|
|
from app.models.audit_log import AuditLog
|
|
from app.models.metrics_history import MetricsHistory
|
|
from app.models.workflow import Workflow
|
|
from app.models.webhook import GitWebhook, WebhookLog, GitDeployment
|
|
from app.models.server import Server, ServerGroup, ServerMetrics, ServerCommand, AgentSession
|
|
from app.models.security_alert import SecurityAlert
|
|
from app.models.wordpress_site import WordPressSite, DatabaseSnapshot, SyncJob
|
|
from app.models.environment_activity import EnvironmentActivity
|
|
from app.models.promotion_job import PromotionJob
|
|
from app.models.sanitization_profile import SanitizationProfile
|
|
from app.models.email_account import EmailAccount
|
|
from app.models.oauth_identity import OAuthIdentity
|
|
|
|
__all__ = [
|
|
'User', 'Application', 'Domain', 'EnvironmentVariable', 'EnvironmentVariableHistory',
|
|
'NotificationPreferences', 'Deployment', 'DeploymentDiff', 'SystemSettings', 'AuditLog',
|
|
'MetricsHistory', 'Workflow', 'GitWebhook', 'WebhookLog', 'GitDeployment',
|
|
'Server', 'ServerGroup', 'ServerMetrics', 'ServerCommand', 'AgentSession', 'SecurityAlert',
|
|
'WordPressSite', 'DatabaseSnapshot', 'SyncJob',
|
|
'EnvironmentActivity', 'PromotionJob', 'SanitizationProfile', 'EmailAccount',
|
|
'OAuthIdentity'
|
|
]
|