Kiến trúc
Tổng quan hệ thống
Tổng quan kỹ thuật cấp cao về runtime backend hiện tại của CenterOS.
Tổng quan hệ thống
Mục tiêu
Mô tả runtime kỹ thuật hiện tại của CenterOS ở mức cao: client đi qua Go API Gateway, auth đi tới Go Identity Service, business APIs đi tới downstream services.
Trạng thái hiện tại
Đã đóng:
- Go API Gateway trong
api-gateway. - Go Identity Service trong
identity-service. local composecho Gateway + Identity.- Frontend login, refresh và select branch.
Chưa đóng:
- Entitlement Service E2E qua Gateway.
- Payment Service billing integration trong flow Entitlement.
Java Gateway và Java Identity là legacy/đã xóa, không phải runtime hiện tại.
Luồng chính
Current auth path:
Frontend
→ Go API Gateway
→ Go Identity Service
→ PostgreSQLProtected API path:
Frontend
→ Go API Gateway
→ downstream serviceEntitlement target path:
Frontend
→ Go API Gateway
→ Entitlement Service
→ PostgreSQLQuy tắc quan trọng
- API Gateway là entrypoint cho client traffic.
- Identity Service sở hữu authentication, session, token issuing và
JWKS. - Downstream services consume
trusted headersdo Gateway inject sau khi validate branch-scopedaccessToken. - Entitlement Service là target tiếp theo cho
current-context, setup, packages và selection resolve. - Không document Java Gateway/Identity như runtime hiện tại.
Liên quan
TODO
- Chưa đóng: Gateway -> Entitlement Service E2E cho
GET /api/workspaces/current-context. - Chưa đóng: setup, packages và selection resolve của Entitlement Service.