My App
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 compose auth/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 account bằng credential.
  • Sở hữu session trong identity.auth_session.
  • Issue accessToken, accountAccessToken, refreshToken.
  • Publish JWKS tại GET /.well-known/jwks.json.
  • Resolve workspace, member, branch membership cho auth.
  • Hỗ trợ single branch login và multi branch select-branch.
  • Set/clear refreshToken bằng HttpOnly cookie khi applicable.
  • Cung cấp GET /api/auth/me cho 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 Service

Gateway routes auth requests tới Identity Service.

Trong local compose, Gateway gọi Identity qua:

http://centeros-identity-service:8081

Gateway dùng Identity JWKS để validate JWT, rồi inject trusted headers cho downstream services.

Current status

Hành viTrạ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/**.

On this page