엔터프라이즈 경계
EnterpriseScope, RBAC, 감사, 보안 상호 운용, 부트스트랩 모드.
EnterpriseScope이 섹션으로 연결되는 링크: EnterpriseScope
조직 범위의 엔터프라이즈 포트에는 EnterpriseScope가 필요합니다. organizationId가 없으면 예외가 발생하며, 모든 테넌트의 데이터를 반환하는 일은 없습니다.
/// Fail-closed tenant + actor context for enterprise ports (ADR-002).
class EnterpriseScope {
final String organizationId;
final String actorId;
final PermissionSet permissions;
/// Throws if [organizationId] is missing/blank — never allow all-tenant lists.
static String requireOrganizationId(String? organizationId) {
final id = organizationId?.trim() ?? '';
if (id.isEmpty) {
throw StateError(
'EnterpriseScope: organizationId is required (fail-closed tenancy).',
);
}
return id;
}
}소스 supercore/packages/after_enterprise/lib/src/scope/enterprise_scope.dart (새 탭에서 열림)
RBAC 및 감사이 섹션으로 연결되는 링크: RBAC 및 감사
버티컬 기능은 데이터를 변경하는 호출 전에 PermissionSet.allows(...)를 확인합니다. 제품은 자체 권한 문자열을 선언합니다.
데이터를 변경하는 모든 엔터프라이즈 작업은 추가 전용 AuditLogRepository에 AuditLogEntry를 추가해야 합니다.
보안 상호 운용이 섹션으로 연결되는 링크: 보안 상호 운용
제품 간 호출은 AfterSecureInteropBridge를 거칩니다. After ID 대상, 스코프, RBAC, 조직 멤버십을 확인한 뒤 필수 감사 항목을 남깁니다.
- After ID 대상 확인
- 조직이 있는 경우 스코프, RBAC, 조직 멤버십 확인
- 필수 감사 항목 기록
- 엔드포인트 스키마에 따른 선택적 데이터 최소화
부트스트랩 모드이 섹션으로 연결되는 링크: 부트스트랩 모드
프로덕션 모드에서는 어댑터가 없으면 시작 시 예외가 발생하므로, 목 프로바이더가 조용히 프로덕션에 들어갈 수 없습니다.
/// Composition safety mode (ADR-007).
///
/// - [scaffold]: in-memory / mock adapters are allowed (templates, tests).
/// - [production]: missing real adapters must throw at startup.
enum AfterBootstrapMode {
scaffold,
production,
}소스 supercore/packages/after_core/lib/src/bootstrap/after_bootstrap_mode.dart (새 탭에서 열림)
엔터프라이즈 포트이 섹션으로 연결되는 링크: 엔터프라이즈 포트
실제 백엔드는 컴포지션 루트에서 MockEnterpriseRepository를 대체합니다. OS 계층은 벤더 이름을 알 필요가 없습니다.
- EnterpriseScope
- OrganizationRepository
- RbacRepository
- PermissionSet
- WorkflowEngine
- TaskRepository
- CalendarRepository
- DocumentRepository
- EnterpriseAiAssistant
- AuditLogRepository
- OfflineSyncQueue
- EnterpriseApiClient
- MockEnterpriseRepository
- EnterpriseProductRuntime
static Future<List<Override>> ensureConfigured({
EnterpriseRepository? enterpriseRepository,
}) async {
PlatformConfig.current = superAppEnterpriseManifest;
final prefs = await SharedPreferences.getInstance();
return [
...AfterStandardOverrides.create(
preferences: prefs,
userAgent: '${superAppEnterpriseManifest.appName}/'
'${superAppEnterpriseManifest.appId}',
),
enterpriseRepositoryProvider.overrideWithValue(
enterpriseRepository ?? MockEnterpriseRepository(),
),
];
}소스 supercore/templates/super_app_enterprise/after_framework.dart (새 탭에서 열림)
이는 supercore 저장소에 문서화된 아키텍처 통제입니다. After Framework는 인증 취득이나 규제 준수를 주장하지 않습니다.