Skip to content

fix(enterprise): enforce multi-tenant isolation for EnterpriseInfo and Agent sync - #843

Merged
yaojin3616 merged 1 commit into
mainfrom
fix/enterprise-info-tenant-isolation
Aug 7, 2026
Merged

fix(enterprise): enforce multi-tenant isolation for EnterpriseInfo and Agent sync#843
yaojin3616 merged 1 commit into
mainfrom
fix/enterprise-info-tenant-isolation

Conversation

@yaojin3616

Copy link
Copy Markdown
Collaborator

Summary of Changes

  • Multi-tenant Data Isolation Fix: Added missing tenant_id column and composite unique constraint uq_enterprise_info_tenant_type on (tenant_id, info_type) for EnterpriseInfo model to eliminate cross-tenant data overwrite/bleed.
  • Prevent Cross-tenant Agent Push: Updated enterprise_sync_service.sync_to_all_agents and sync_to_agent to restrict Agent file synchronization strictly to running agents belonging to the active tenant.
  • Alembic Migration: Added v1_0_0_f061_enterprise_info_tenant_id.py complying with single head constraint and DDL-only rules.
  • Unit Tests: Added tests/test_enterprise_info_tenant_isolation.py to verify API & agent file sync multi-tenant boundaries. All 2144 tests passed.

@yaojin3616
yaojin3616 merged commit 2adf9a3 into main Aug 7, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant