feat: multi-region rule isolation — region column + config + queries
- DB: add region column to leaudit_rule_sets + leaudit_rule_type_bindings - DB: change UNIQUE constraint from (rule_type) to (rule_type, region) - Config: add APP_REGION to app.toml + AppSettings + __init__.pyi - AuditServiceImpl: filter bindings by APP_REGION - RuleServiceImpl: ListBindings/CreateBinding use APP_REGION - Seed script: accept --region arg, tag rules by region - OssPathUtils: BuildRuleYamlKey already accepts Region parameter Each region can now have its own independent copy of the same rule_type, stored in separate OSS paths and DB rows, keyed by region.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
APP_NAME: str
|
||||
APP_HOST: str
|
||||
APP_PORT: int
|
||||
APP_REGION: str
|
||||
APP_CORS_ORIGINS: str
|
||||
|
||||
# JWT
|
||||
|
||||
@@ -19,6 +19,7 @@ class AppSettings(_Base):
|
||||
APP_NAME: str = "LeAudit Platform"
|
||||
APP_HOST: str = "0.0.0.0"
|
||||
APP_PORT: int = 8000
|
||||
APP_REGION: str = "default"
|
||||
APP_CORS_ORIGINS: str = "*"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user