feat(runtime-control): 注册流程改为通过AuthZ服务

注册现在通过AuthZ进行处理,而登录/运行时查找仍然使用deploy-control。
更新了API调用逻辑,将注册请求从直接调用deploy-control和instance-api
改为统一调用AuthZ服务。

- 修改了注册API路由(/api/runtime/register)以使用callAuthzService
- 更新README.md文档说明新的架构流程
- 添加AUTHZ_API_BASE_URL环境变量配置
- 更新注册页面描述信息
- 移除了不再使用的callDeployControl和callInstanceApi相关代码
This commit is contained in:
2026-03-16 11:07:08 +08:00
parent be30aa9465
commit df5e3d693c
16 changed files with 247 additions and 16 deletions

View File

@ -80,6 +80,14 @@ Authorization: Bearer <AUTHZ_INTERNAL_TOKEN>
3. 配置 `POST /backends/{backend_id}/permissions`
4.`POST /oauth/token` 获取 token
### 流程 C由 Auth Portal 发起的一站式注册
1. Auth Portal 调用 `POST /portal/register`
2. AuthZ 先调用 deploy-control 创建或解析实例
3. AuthZ 再调用实例自己的 `POST /api/auth/register`
4. 实例在注册过程中回调 AuthZ 的 `/oauth/register` / `/backends/register`
5. AuthZ 将最终 token 和 backend 连接信息回传给 Auth Portal
## 注册时需要提供什么信息
### 用户注册接口:`POST /oauth/register`