ServiceIdentity
Tổng quan Identity Service
Vai trò hiện tại của Go Identity Service trong runtime CenterOS.
Tổng quan Identity Service
Trạng thái
Go Identity Service là runtime hiện tại cho auth của CenterOS.
- Repo/folder:
identity-service - Container:
centeros-identity-service - Image:
dorrissdang/centeros-identity-service:main - Host/container port:
8081:8081 - Đã đóng cho
local composeauth/select-branch.
Java Identity là legacy/đã xóa, không document như runtime hiện tại.
Identity Service làm gì
- Xác thực
accountbằngcredential. - Sở hữu session trong
identity.auth_session. - Issue
accessToken,accountAccessToken,refreshToken. - Publish
JWKStạiGET /.well-known/jwks.json. - Resolve
workspace,member,branchmembership cho auth. - Hỗ trợ single branch login và multi branch select-branch.
- Set/clear
refreshTokenbằngHttpOnly cookiekhi applicable. - Cung cấp
GET /api/auth/mecho current account.
Identity Service không làm gì
- Không route request tới service khác.
- Không thay API Gateway validate protected business route.
- Không inject
trusted headers. - Không own setup/current-context.
- Không own entitlement/package/capability/navigation.
- Không own quote/order/subscription/payment.
Quan hệ với API Gateway
Frontend
→ API Gateway
→ Identity ServiceGateway routes auth requests tới Identity Service.
Trong local compose, Gateway gọi Identity qua:
http://centeros-identity-service:8081Gateway dùng Identity JWKS để validate JWT, rồi inject trusted headers cho downstream services.
Current status
| Hành vi | Trạng thái |
|---|---|
GET /healthz | Đã đóng |
GET /.well-known/jwks.json | Đã đóng |
POST /api/auth/login | Đã đóng |
POST /api/auth/refresh | Đã đóng sau valid session |
POST /api/auth/select-branch | Đã đóng |
| Frontend login/refresh/select branch | Đã đóng |
Entitlement current-context không phải trách nhiệm của Identity Service.
Liên quan
TODO
- Chưa đóng: Identity service docs cho IAM/system APIs vì Go runtime chưa implement
/api/iam/**,/api/system/**.