- JWT claims extended with tenantId; login enforces strict tenant verification - AuthorityMiddleware: tenant scope check + Casbin path permission + anti-spoofing - CRM relation API (upstream/downstream one-hop, create/update/history, full graph) - CrmRepo backed by PostgreSQL with $N placeholders - gRPC tenant propagation via UnaryClientInterceptor (x-tenant-id metadata) - All legacy tables (12) gain tenant_id column with indexes - All model queries inject WHERE tenant_id filter - Casbin gorm-adapter downgraded to v3.28.0 for v2 compatibility - GraphSyncWorker (Kafka -> Neo4j) with idempotent MERGE - Full graph API restricted to admin role only - Database migrations for MySQL (CRM tables + tenant columns) and PostgreSQL (CRM init) - Docker Compose: added postgres service to main stack, graph stack with Kafka/Debezium/Neo4j Made-with: Cursor
31 lines
579 B
YAML
31 lines
579 B
YAML
Name: gateway-api
|
|
Host: 0.0.0.0
|
|
Port: 8888
|
|
|
|
Auth:
|
|
AccessSecret: muyu-wms-jwt-secret-key-2026
|
|
AccessExpire: 7200
|
|
DefaultTenantId: t_default_001
|
|
|
|
DataSource: root:muyu2026@tcp(mysql:3306)/muyu_wms?charset=utf8mb4&parseTime=true&loc=Asia%2FShanghai
|
|
PostgresDataSource: "postgres://muyu:muyu2026@postgres:5432/muyu_crm?sslmode=disable"
|
|
|
|
SystemRpc:
|
|
Etcd:
|
|
Hosts:
|
|
- etcd:2379
|
|
Key: system.rpc
|
|
NonBlock: true
|
|
|
|
InventoryRpc:
|
|
Etcd:
|
|
Hosts:
|
|
- etcd:2379
|
|
Key: inventory.rpc
|
|
NonBlock: true
|
|
|
|
Log:
|
|
ServiceName: gateway-api
|
|
Mode: console
|
|
Level: info
|