@eduwork/dsh-oidc 0.2.3 → 0.3.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.en.md +6 -38
- package/CHANGELOG.md +7 -39
- package/CODE_OF_CONDUCT.en.md +1 -1
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.en.md +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +21 -130
- package/README_EN.md +36 -0
- package/SECURITY.en.md +1 -1
- package/SECURITY.md +1 -1
- package/SUPPORT.en.md +1 -1
- package/SUPPORT.md +1 -1
- package/docs/EDUWORK-MIGRATION.en.md +3 -31
- package/docs/EDUWORK-MIGRATION.md +3 -31
- package/docs/account-extensions.en.md +6 -6
- package/docs/account-extensions.md +3 -3
- package/docs/architecture.en.md +12 -117
- package/docs/architecture.md +12 -118
- package/docs/compatibility.en.md +6 -62
- package/docs/compatibility.md +6 -62
- package/docs/decisions/0001-one-plugin-composition-boundary.en.md +2 -2
- package/docs/decisions/0001-one-plugin-composition-boundary.md +2 -2
- package/docs/desktop-host.en.md +54 -55
- package/docs/desktop-host.md +63 -64
- package/docs/development.en.md +44 -44
- package/docs/development.md +6 -6
- package/docs/dsh-integration.en.md +13 -48
- package/docs/dsh-integration.md +14 -49
- package/docs/ecnu-reference.en.md +4 -61
- package/docs/ecnu-reference.md +4 -61
- package/docs/enterprise-profile.en.md +10 -31
- package/docs/enterprise-profile.md +11 -32
- package/docs/gateway-auth/README.md +168 -0
- package/docs/gateway-auth/README_EN.md +70 -0
- package/docs/gateway-auth/experimental-oidc-llm.en.md +53 -0
- package/docs/gateway-auth/experimental-oidc-llm.md +53 -0
- package/docs/gateway-auth/litellm-setup.en.md +114 -0
- package/docs/gateway-auth/litellm-setup.md +114 -0
- package/docs/gateway-auth/oidc-llm-draft.en.md +141 -0
- package/docs/gateway-auth/oidc-llm-draft.md +141 -0
- package/docs/getting-started.en.md +17 -122
- package/docs/getting-started.md +16 -225
- package/docs/key-binding-protocol.en.md +10 -220
- package/docs/key-binding-protocol.md +10 -220
- package/docs/oidc-interoperability.en.md +1 -1
- package/docs/oidc-interoperability.md +1 -1
- package/docs/open-integration.en.md +11 -0
- package/docs/open-integration.md +11 -0
- package/docs/public-resource-protocol.en.md +8 -44
- package/docs/public-resource-protocol.md +8 -43
- package/docs/release-checklist.en.md +7 -61
- package/docs/release-checklist.md +7 -61
- package/docs/security-model.en.md +10 -132
- package/docs/security-model.md +10 -132
- package/docs/server-integration-contract.en.md +12 -811
- package/docs/server-integration-contract.md +12 -823
- package/examples/ecnu.enterprise-profile.example.json +14 -19
- package/examples/enterprise-profile.example.json +73 -78
- package/examples/identity-only.example.json +1 -1
- package/examples/litellm.enterprise-profile.example.json +9 -0
- package/examples/oidc-llm.enterprise-profile.example.json +12 -0
- package/examples/resources-discovery.example.json +6 -9
- package/lib/callback-page.js +5 -5
- package/lib/client.js +31 -48
- package/lib/desktop-oidc.js +7 -11
- package/lib/gateway-backend.js +443 -0
- package/lib/gateway-protocol.js +6 -0
- package/lib/index.js +14 -15
- package/lib/litellm-protocol.js +117 -0
- package/lib/model-resource-transport.js +19 -0
- package/lib/oidc-llm-protocol.js +88 -0
- package/lib/oidc.js +37 -323
- package/lib/profile.js +34 -40
- package/lib/provider/authorization-scope.js +46 -0
- package/lib/provider/index.js +11 -2
- package/lib/provider/transforms.js +0 -1
- package/lib/typert-schemas.js +1 -1
- package/lib/typert.host.js +38 -38
- package/lib/typert.remote-client.js +37 -37
- package/package.json +7 -6
- package/protocol/openapi.yaml +33 -240
- package/protocol/resources.openapi.yaml +8 -9
- package/schema/enterprise-profile.v1alpha1.schema.json +595 -193
- package/README.en.md +0 -186
|
@@ -1,227 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 旧 Key Binding 接入迁移
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](key-binding-protocol.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
当前客户端源码已移除 Key Binding 模型凭据流程:不再调用 /bootstrap 或 /runtime-credential 的 provision、resolve、renew,也不再接受 keyBinding 配置或 backend: native 旧账户桥。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
服务端可以继续实现旧接口,供已发布的老客户端使用。新客户端的机构模型接入统一使用 Access Token;兼容责任不要求新客户端保留旧取 Key 分支。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 迁移步骤
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
1. 确认服务端已支持 [oidc-llm 实验契约](gateway-auth/experimental-oidc-llm.md),或使用 [LiteLLM native 契约](gateway-auth/README.md)。
|
|
12
|
+
2. 把旧 oidc + keyBinding + provider.baseURL 配置替换为完整 auth.discoveryUrl;OIDC 模式另外填写显式实验开关、预注册 public client ID 和 identityMode。
|
|
13
|
+
3. 保留稳定的 Profile/Provider ID 和模型能力元数据,但模型可见性、API 基址来自已验证的发现和目录。
|
|
14
|
+
4. 重新登录。客户端不猜测旧服务的新发现地址,不把旧模型 Key 当作 Access Token,也不自动回退。旧本地凭据不会被新模型路径读取;不批量删除可能仍由其他配置使用的 Key。
|
|
15
|
+
5. 仅身份登录可继续使用 oidc 配置,但不得同时配置模型 provider。
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## 2. 设计目标
|
|
16
|
-
|
|
17
|
-
协议区分三类凭据:
|
|
18
|
-
|
|
19
|
-
- 机构密码:只由 OIDC Provider 看见;
|
|
20
|
-
- OIDC access token:只用于 UserInfo 和 Key Binding 服务;
|
|
21
|
-
- 模型运行时 API Key:只用于模型 Provider 路由。
|
|
22
|
-
|
|
23
|
-
API Key 是可替换、可撤销的运行凭据,不是用户身份证明。Key Binding 服务端是决定其创建和解析权限的授权权威。
|
|
24
|
-
|
|
25
|
-
## 3. Base URL 与固定资源
|
|
26
|
-
|
|
27
|
-
Enterprise Profile 提供一个 HTTPS `keyBinding.baseURL`。其中不得包含 userinfo、query 或 fragment,并且应该包含类似 `/api/worker/v1` 的版本路径。
|
|
28
|
-
|
|
29
|
-
相对于该 base URL,以下路径固定不变:
|
|
30
|
-
|
|
31
|
-
| 方法 | 路径 | 用途 |
|
|
32
|
-
| --- | --- | --- |
|
|
33
|
-
| GET | `/bootstrap` | 读取 Provider、能力、授权资格和凭据状态。 |
|
|
34
|
-
| POST | `/runtime-credential/provision` | 状态为 `missing` 时创建或绑定凭据。 |
|
|
35
|
-
| POST | `/runtime-credential/resolve` | 返回活动凭据。 |
|
|
36
|
-
| POST | `/runtime-credential/renew` | 轮换 `expiring` 或 `expired` 凭据。 |
|
|
37
|
-
|
|
38
|
-
Profile 和用户不得覆盖路径、HTTP 方法、字段映射或凭据引用名。
|
|
39
|
-
|
|
40
|
-
## 4. 认证与授权
|
|
41
|
-
|
|
42
|
-
除显式 loopback 开发环境外,每个请求都必须使用 TLS。客户端发送:
|
|
43
|
-
|
|
44
|
-
```http
|
|
45
|
-
Authorization: Bearer <OIDC access token>
|
|
46
|
-
Accept: application/json
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
服务端至少必须验证:
|
|
50
|
-
|
|
51
|
-
- token 签名或 introspection 结果;
|
|
52
|
-
- issuer;
|
|
53
|
-
- 面向 Key Binding 服务的 audience;
|
|
54
|
-
- 过期时间和 not-before;
|
|
55
|
-
- 已认证 subject;
|
|
56
|
-
- 操作所需 scope;
|
|
57
|
-
- 机构成员资格、账号状态和模型授权。
|
|
58
|
-
|
|
59
|
-
建议 scope:
|
|
60
|
-
|
|
61
|
-
| 操作 | Scope |
|
|
62
|
-
| --- | --- |
|
|
63
|
-
| bootstrap | `worker.bootstrap.read` |
|
|
64
|
-
| provision | `worker.credential.provision` |
|
|
65
|
-
| resolve | `worker.credential.read` |
|
|
66
|
-
| renew | `worker.credential.renew` |
|
|
67
|
-
|
|
68
|
-
部署可以使用不同 scope 名称,但这些仍属于 OIDC 授权策略,并列在 Enterprise Profile `oidc.scopes` 中;网络操作本身不变。
|
|
69
|
-
|
|
70
|
-
服务端必须从已验证 access token 派生绑定 subject,不得接受请求 body 中由调用方提供的 subject ID。
|
|
71
|
-
|
|
72
|
-
## 5. Bootstrap
|
|
73
|
-
|
|
74
|
-
请求:
|
|
75
|
-
|
|
76
|
-
```http
|
|
77
|
-
GET /api/worker/v1/bootstrap HTTP/1.1
|
|
78
|
-
Authorization: Bearer …
|
|
79
|
-
Accept: application/json
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
最小成功响应:
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"provider": { "id": "example-ai" },
|
|
87
|
-
"capabilities": ["worker.credential.provision"],
|
|
88
|
-
"runtime_credential": {
|
|
89
|
-
"status": "missing",
|
|
90
|
-
"provisioning": { "allowed": true }
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
返回的 `provider.id` 是必需字段,必须与 Enterprise Profile `provider.id` 完全相等。不一致即视为绑定失败。
|
|
96
|
-
|
|
97
|
-
有效的 `runtime_credential.status`:
|
|
98
|
-
|
|
99
|
-
- `missing`:尚未绑定凭据;
|
|
100
|
-
- `active`:可以解析活动凭据;
|
|
101
|
-
- `expiring`:存在 `api_key_id` 时轮换,否则按服务端策略解析;
|
|
102
|
-
- `expired`:存在 `api_key_id` 时轮换,否则按服务端策略解析;
|
|
103
|
-
- `suspended`:授权或账号已停用;本地凭据不得继续视为可用;
|
|
104
|
-
- `unavailable`:服务当前无法提供凭据。
|
|
105
|
-
|
|
106
|
-
`subject` 可以携带仅供管理面显示的信息。客户端不得用它替换 OIDC `sub` 或 `name`。
|
|
107
|
-
|
|
108
|
-
若返回 `protocol_version`,其值必须是 `worker.user-center.v1`、`worker-user-center/v1` 或 `eduwork-resources/v1`(三个别名共享同一组 v1 字段与路径,未知版本拒绝)。该字段在 v1 采用阶段可选;未来 major 协议可以要求显式协商。
|
|
109
|
-
|
|
110
|
-
## 6. Provision
|
|
111
|
-
|
|
112
|
-
用户必须先完成 OIDC 认证。`dsh-oidc` 还要求显式 UI 操作(`allowProvision: true`),因此仅完成 callback 不会静默创建模型凭据。
|
|
113
|
-
|
|
114
|
-
```http
|
|
115
|
-
POST /api/worker/v1/runtime-credential/provision HTTP/1.1
|
|
116
|
-
Authorization: Bearer …
|
|
117
|
-
Content-Type: application/json
|
|
118
|
-
Idempotency-Key: <UUID>
|
|
119
|
-
|
|
120
|
-
{ "provider_id": "example-ai" }
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
服务端必须:
|
|
124
|
-
|
|
125
|
-
- 验证该 subject 获准使用 `provider_id`;
|
|
126
|
-
- 执行机构凭据创建策略;
|
|
127
|
-
- 对相同已认证 subject、Provider 和 Idempotency-Key 保证幂等;
|
|
128
|
-
- 在服务端幂等保留窗口内,对重放请求返回相同逻辑结果;
|
|
129
|
-
- 同一 key 与不同 payload 重用时返回 `409 Conflict`;
|
|
130
|
-
- 绝不记录返回的 API Key。
|
|
131
|
-
|
|
132
|
-
## 7. Resolve
|
|
133
|
-
|
|
134
|
-
```http
|
|
135
|
-
POST /api/worker/v1/runtime-credential/resolve HTTP/1.1
|
|
136
|
-
Authorization: Bearer …
|
|
137
|
-
Content-Type: application/json
|
|
138
|
-
|
|
139
|
-
{
|
|
140
|
-
"provider_id": "example-ai",
|
|
141
|
-
"api_key_id": "optional-known-id"
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Resolve 不得创建新的授权资格。它返回已绑定到 subject 的活动凭据,或者返回 `404`/策略错误。服务端可以在保持同一逻辑 `api_key_id` 的情况下轮换不透明秘密材料,但不得改变 Provider 所有权。
|
|
146
|
-
|
|
147
|
-
## 8. Renew
|
|
148
|
-
|
|
149
|
-
```http
|
|
150
|
-
POST /api/worker/v1/runtime-credential/renew HTTP/1.1
|
|
151
|
-
Authorization: Bearer …
|
|
152
|
-
Content-Type: application/json
|
|
153
|
-
Idempotency-Key: <UUID>
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
"provider_id": "example-ai",
|
|
157
|
-
"api_key_id": "key-123"
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Renew 要求提供 `api_key_id`,必须幂等,并轮换或替换即将过期/已过期凭据。服务端应该在操作安全允许后尽快使旧秘密材料失效,并且必须记录任何重叠有效窗口。
|
|
162
|
-
|
|
163
|
-
## 9. 凭据响应
|
|
164
|
-
|
|
165
|
-
三个 POST 操作成功时都返回:
|
|
166
|
-
|
|
167
|
-
```json
|
|
168
|
-
{
|
|
169
|
-
"provider_id": "example-ai",
|
|
170
|
-
"api_key": "secret-runtime-value",
|
|
171
|
-
"api_key_id": "key-123",
|
|
172
|
-
"status": "active",
|
|
173
|
-
"expires_at": "2026-09-01T00:00:00Z"
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
`provider_id`、`api_key` 和 `status=active` 是必需字段。Provider 缺失、不匹配或 key 为空时,客户端会拒绝响应。
|
|
178
|
-
|
|
179
|
-
凭据响应必须包含 `Cache-Control: no-store`,并且应该包含 `Pragma: no-cache`。服务端、代理、APM agent 和 WAF 必须脱敏 Authorization header 与 `api_key` 响应字段。不得把秘密写入 URL、错误详情、分析事件或审计日志。
|
|
180
|
-
|
|
181
|
-
## 10. 错误
|
|
182
|
-
|
|
183
|
-
错误应该遵循 RFC 9457,使用 `application/problem+json`,并提供稳定扩展字段 `code`。至少包含:
|
|
184
|
-
|
|
185
|
-
- `400`:请求或 Provider ID 格式错误;
|
|
186
|
-
- `401`:token 缺失、无效、过期或 audience 错误;
|
|
187
|
-
- `403`:scope、成员资格、授权、停用或创建策略拒绝;
|
|
188
|
-
- `404`:没有可解析或可更新的凭据;
|
|
189
|
-
- `409`:幂等或生命周期冲突;
|
|
190
|
-
- `429`:限流,最好包含 `Retry-After`;
|
|
191
|
-
- `5xx`:不包含秘密材料的服务端失败。
|
|
192
|
-
|
|
193
|
-
同一逻辑操作重试 provision/renew 时,客户端必须保留相同 Idempotency-Key。`dsh-oidc` 当前只发起一次调用;DSH 模型请求重试属于另一条链路,绝不会重复 Key Binding 操作。
|
|
194
|
-
|
|
195
|
-
## 11. 生命周期与撤销
|
|
196
|
-
|
|
197
|
-
以下情况发生时,Key Binding 服务应该撤销模型凭据:
|
|
198
|
-
|
|
199
|
-
- 机构成员资格或授权终止;
|
|
200
|
-
- OIDC subject 被停用;
|
|
201
|
-
- 凭据被轮换;
|
|
202
|
-
- 安全管理员撤销凭据;
|
|
203
|
-
- 达到最大生命周期。
|
|
204
|
-
|
|
205
|
-
本地退出会删除缓存模型 Key,但不能单独证明远程凭据已撤销。要求即时远程撤销的部署,应该在未来协议版本增加经过认证的管理操作,而不是复用 OIDC token revocation。
|
|
206
|
-
|
|
207
|
-
模型网关必须独立执行 API Key 状态、Provider scope、过期和配额策略。持有旧 Key 不得无限期绕过当前企业策略。
|
|
208
|
-
|
|
209
|
-
## 12. 隐私与审计
|
|
210
|
-
|
|
211
|
-
服务端应该尽量减少 bootstrap 返回的身份数据。审计记录应该包含事件时间、不透明 subject 引用、Provider ID、操作、结果、策略原因、请求关联 ID 和 `api_key_id`,绝不能包含 API Key 或 OIDC token。
|
|
212
|
-
|
|
213
|
-
数据保留、访问控制、泄露响应和跨境处理由部署方负责。该协议不授予收集更多个人数据的权限。
|
|
214
|
-
|
|
215
|
-
## 13. 符合性检查
|
|
216
|
-
|
|
217
|
-
服务端满足以下条件时符合本规范:
|
|
218
|
-
|
|
219
|
-
- 实现全部四个固定资源;
|
|
220
|
-
- 使用 OIDC access token 认证请求,绝不使用请求 body 中的 subject 数据;
|
|
221
|
-
- 返回完全匹配的 Provider 绑定;
|
|
222
|
-
- 执行所需 scope 和机构授权;
|
|
223
|
-
- 实现 provision/renew 幂等;
|
|
224
|
-
- 凭据响应使用 no-store;
|
|
225
|
-
- 不记录秘密;
|
|
226
|
-
- 提供稳定生命周期状态和问题代码;
|
|
227
|
-
- 通过仓库 OpenAPI 契约测试和机构特有授权测试。
|
|
17
|
+
这次删除属于尚未发布源码的破坏性配置变更;旧协议细节以历史版本为准。个人 API Key 入口保持可用。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](oidc-interoperability.md) | **English**
|
|
4
4
|
|
|
5
|
-
OIDC is the identity tier of the [server API specification](server-integration-contract.en.md). An identity-only Profile may implement this tier alone.
|
|
5
|
+
OIDC is the identity tier of the [server API specification](server-integration-contract.en.md). An identity-only Profile may implement this tier alone. Model access uses an explicitly advertised token gateway contract; see [gateway integration](gateway-auth/README_EN.md).
|
|
6
6
|
|
|
7
7
|
## Standards
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](oidc-interoperability.en.md)
|
|
4
4
|
|
|
5
|
-
OIDC 是[服务端接口规范](server-integration-contract.md)的身份能力档,纯身份 Profile
|
|
5
|
+
OIDC 是[服务端接口规范](server-integration-contract.md)的身份能力档,纯身份 Profile 可只实现本文件。模型接入使用独立声明的 Token 网关契约,见[网关接入](gateway-auth/README.md)。
|
|
6
6
|
|
|
7
7
|
## 标准依据
|
|
8
8
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Open identity and model integration
|
|
2
|
+
|
|
3
|
+
[简体中文](open-integration.md) | **English**
|
|
4
|
+
|
|
5
|
+
A user can authorize a general-purpose client in the browser and use their model permissions. OIDC verifies identity; the model service explicitly grants Access Token model access. Clients reuse discovery, PKCE, refresh and the model Provider.
|
|
6
|
+
|
|
7
|
+
Current implementations support [LiteLLM native OAuth](gateway-auth/README_EN.md) and the [experimental oidc-llm draft](gateway-auth/experimental-oidc-llm.en.md). An implementation does not make the draft a finalized standard. Personal models and identity-only sign-in remain independent.
|
|
8
|
+
|
|
9
|
+
New clients no longer consume Key Binding. Servers may support token model access alongside old client endpoints without retaining old logic in new clients. Institution quota, team policy, web pages and operations remain extensions using bounded Host transport.
|
|
10
|
+
|
|
11
|
+
Start with the [server contract](server-integration-contract.en.md), [profiles](enterprise-profile.en.md) and [development guide](development.en.md).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 开放身份与模型接入
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](open-integration.en.md)
|
|
4
|
+
|
|
5
|
+
机构用户可以通过一次浏览器授权,在通用客户端使用自己的模型访问权限。OIDC 负责身份验证;模型服务明确授予 Access Token 模型权限,客户端复用发现、PKCE、刷新和模型 Provider。
|
|
6
|
+
|
|
7
|
+
当前实现支持 [LiteLLM native OAuth](gateway-auth/README.md) 与 [oidc-llm 实验草案](gateway-auth/experimental-oidc-llm.md)。草案仍需评审,已实现不等于标准定稿。个人模型和纯身份登录保留独立入口。
|
|
8
|
+
|
|
9
|
+
新客户端不再消费 Key Binding。服务端可同时支持新 Token 模型接入和老客户端接口;新客户端无需保留旧实现。机构配额、团队策略、网页和运维功能由机构独立扩展,公共包提供受控 Host 传输。
|
|
10
|
+
|
|
11
|
+
参与接入请先阅读[服务端契约](server-integration-contract.md)、[配置](enterprise-profile.md)与[开发指南](development.md)。
|
|
@@ -1,51 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Token-authorized model resources
|
|
2
2
|
|
|
3
3
|
[简体中文](public-resource-protocol.md) | **English**
|
|
4
4
|
|
|
5
|
-
The
|
|
5
|
+
The current source uses authorized Access Tokens for organization models. Legacy Key Binding management and model-key flows are removed; see [migration](key-binding-protocol.en.md).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Identity-only profiles omit both `keyBinding` and `provider`; successful OIDC login completes identity integration. Users configure personal API keys through ordinary DSH model settings. Organization logout leaves those personal credentials alone. See the [identity-only example](../examples/identity-only.example.json).
|
|
10
|
-
|
|
11
|
-
Full integration includes both fields. `keyBinding.type` defaults to `worker-user-center-v1`, while `eduwork-resources-v1` explicitly names the public resource contract. Both use the existing deployed wire paths; current institutions do not need new endpoint URLs. See the [discovery example](../examples/resources-discovery.example.json).
|
|
12
|
-
|
|
13
|
-
Both modes permit other models and personal API keys. Optional `brand` only controls presentation; an empty brand leaves the host product name unchanged.
|
|
14
|
-
|
|
15
|
-
## Endpoints and credentials
|
|
16
|
-
|
|
17
|
-
| Capability | Endpoint | Authentication |
|
|
7
|
+
| Operation | Endpoint source | Credential |
|
|
18
8
|
| --- | --- | --- |
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
| Models | `GET {provider.baseURL}/models` | Managed model API key |
|
|
23
|
-
| Inference | `POST {provider.baseURL}/chat/completions` | Managed model API key |
|
|
24
|
-
|
|
25
|
-
The [Key Binding OpenAPI](../protocol/openapi.yaml) retains existing lifecycle fields and idempotency requirements. The [resource OpenAPI](../protocol/resources.openapi.yaml) defines model discovery. Optional bootstrap `protocol_version` accepts `worker.user-center.v1`, `worker-user-center/v1` or `eduwork-resources/v1`; unknown versions fail closed. Bootstrap never replaces verified OIDC identity, trusted endpoint configuration or executable components. Resource HTTP requests do not follow redirects.
|
|
26
|
-
|
|
27
|
-
## Model discovery
|
|
28
|
-
|
|
29
|
-
`provider.modelSource` defaults to `profile`, preserving reviewed distribution metadata. With `discovery`, `/models` is read after managed key resolution; initial `models` may be omitted and no fake route is registered before discovery.
|
|
30
|
-
|
|
31
|
-
The response is `{"data":[{"id":"model-a"}]}` with up to 128 unique model IDs. IDs already declared in the trusted Profile retain their capabilities. New IDs are conservatively text-only with reasoning disabled; model names are not capability evidence. Arbitrary URLs, scripts and adapter configuration in remote responses are ignored.
|
|
32
|
-
|
|
33
|
-
Empty or invalid discovery preserves the last usable catalog and returns `models_unavailable`. Successful discovery replaces the provider snapshot for new calls; prepared calls retain their earlier snapshot. After restart the first signed-in status read rediscovers models. Personal provider routes are unaffected.
|
|
34
|
-
|
|
35
|
-
## Host integration
|
|
36
|
-
|
|
37
|
-
The plugin is `@eduwork/dsh-oidc`, with bundle layer ID `enterprise-oidc`. Use `backend: web` and `uiMode: standard` for the public interface; `external` keeps public RPC while allowing a product-owned UI. `allowEmptyProfiles: true` supports a public client using only personal keys.
|
|
38
|
-
|
|
39
|
-
`EDUWORK_OIDC_PROFILE` names a single profile, an array, or a `{ "profiles": [...] }` file. When absent, `DSH_OIDC_ENTERPRISE_PROFILE` remains a compatible fallback. Explicit `profilePathEnv` names remain supported.
|
|
40
|
-
|
|
41
|
-
Existing `oidcAccounts.configuration/status/begin/reconcile/logout/management` RPCs remain available. New `resources(profileID)` returns `{profileID, modelSource, models, issues}` without secrets. `reconcile` automatically refreshes model metadata. The legacy native backend does not call its former quota method; new `backend: desktop` shares the Web OIDC implementation but uses a temporary loopback callback without requiring a persistent WebServer.
|
|
42
|
-
|
|
43
|
-
Institution plugins may call Host-only `ctx.oidcAccounts.authorizedFetch(profileID, endpoint, init)` to reuse the current OIDC access token, refresh and one 401 retry. It returns a regular `Response`, has no Remote marker, and never exposes tokens to the browser. Allowed origins default to the configured issuer and Key Binding origins. Additional exact HTTPS origins require trusted host `authorizedOrigins` configuration and cannot be set by browser RPC. Concurrent requests share one rotating refresh operation. This is an authenticated transport seam, not a heartbeat or speech business protocol.
|
|
44
|
-
|
|
45
|
-
Host event `oidc/accounts-changed` carries `{profileID, state}`. Both `authenticated` and `connected` mean identity is signed in; identity-only `connected` does not require a model key. `signed_out` means signed out. Authorized requests without a usable identity throw `oidc_login_required`; forbidden origins throw `oidc_authorized_origin_denied`. A second HTTP 401 remains a Response for the caller to handle. Explicit sign-out should not automatically produce an expiry warning.
|
|
46
|
-
|
|
47
|
-
Changed issuer, client ID or resource endpoints prevent stale managed keys from reaching a different deployment. Existing Web identity records can retain identity while reacquiring the managed model key. Personal API keys remain unaffected by organization logout or resource-binding changes.
|
|
48
|
-
|
|
9
|
+
| GET /models | Validated gateway API base | Current Access Token |
|
|
10
|
+
| JSON/SSE inference | Same API base | Current Access Token |
|
|
11
|
+
| Optional institution quota GET | Extension-declared relative path | Current Access Token through shared Host transport |
|
|
49
12
|
|
|
13
|
+
Catalog data[].id determines model visibility. Reviewed local metadata can describe context, modalities and reasoning but cannot expand server authorization. Logout or reauthorization cancels in-flight calls and prevents prepared old calls from borrowing a new account's credentials. Refresh within the same authorization can continue normally.
|
|
50
14
|
|
|
51
|
-
|
|
15
|
+
Public Remote returns only model-resource projections, never Tokens, quota or management APIs. Institutions own quota semantics and scope; see [account extensions](account-extensions.en.md). The [catalog OpenAPI](../protocol/resources.openapi.yaml) complements the [gateway contract](gateway-auth/README_EN.md).
|
|
@@ -1,50 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Token 模型资源接入
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](public-resource-protocol.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
当前源码只通过获准 Access Token 接入机构模型。旧 Key Binding 的管理和模型 Key 流程已移除,详见[迁移说明](key-binding-protocol.md)。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- 纯身份接入:只配置 `oidc`,省略 `keyBinding` 与 `provider`。登录成功即完成身份接入。用户继续在 DSH 原生模型设置添加自己的 API Key,退出机构身份不会删除个人凭据。见 [示例](../examples/identity-only.example.json)。
|
|
10
|
-
- 完整资源接入:同时配置 `keyBinding` 与 `provider`。`keyBinding.type` 默认为 `worker-user-center-v1`;也可显式声明 `eduwork-resources-v1`。两者复用同一组已部署的固定路径,不要求现有机构改造端点。见 [自动目录示例](../examples/resources-discovery.example.json)。
|
|
11
|
-
|
|
12
|
-
这两个模式都允许其他模型与个人 API Key,不能以组织登录覆盖原生模型配置。可选 `brand` 只负责展示,空品牌保持宿主产品名称。
|
|
13
|
-
|
|
14
|
-
## 路径与认证
|
|
15
|
-
|
|
16
|
-
| 能力 | 路径 | 凭据 |
|
|
7
|
+
| 操作 | 地址来源 | 使用凭据 |
|
|
17
8
|
| --- | --- | --- |
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
| 模型目录 | `GET {provider.baseURL}/models` | 获得的模型 API Key |
|
|
22
|
-
| 模型调用 | `POST {provider.baseURL}/chat/completions` | 获得的模型 API Key |
|
|
23
|
-
|
|
24
|
-
管理面既有字段、幂等语义见 [Key Binding OpenAPI](../protocol/openapi.yaml)。完整扩展见 [资源 OpenAPI](../protocol/resources.openapi.yaml)。Bootstrap 的可选 `protocol_version` 接受 `worker.user-center.v1`、`worker-user-center/v1` 或 `eduwork-resources/v1`;未知版本拒绝。主体身份只来自经验证的 OIDC,Bootstrap 不覆盖用户身份、发行配置、执行模块或服务地址。资源请求不跟随重定向。
|
|
25
|
-
|
|
26
|
-
## 模型目录
|
|
27
|
-
|
|
28
|
-
`provider.modelSource` 默认 `profile`,使用发行方已审查的模型事实,保证现有部署不受发现接口变化影响。设为 `discovery` 时登录/凭据关联后自动读取 `/models`;`models` 可省略,初始化时等待目录,不注册伪造的模型。
|
|
29
|
-
|
|
30
|
-
`/models` 返回 `{"data":[{"id":"model-a"}]}`,最多 128 个不同 ID。目录内已在 Profile 声明的 ID 沿用其 reasoning、模态和上下文等事实;其他新 ID 仅声明文本与不支持推理档位。不能从模型名猜能力,也不采用服务响应中的执行配置或任意 URL。目录为空、结构错误或暂不可用时保留上一份已可用目录,并单独返回 `models_unavailable`。
|
|
31
|
-
|
|
32
|
-
成功更新目录会替换同一 Provider 的运行模型快照,新调用使用新目录,已经准备的调用继续使用原快照。重启后首次读取已登录状态会重新发现。个人提供方不受影响。
|
|
33
|
-
|
|
34
|
-
## 宿主 RPC 与装配
|
|
35
|
-
|
|
36
|
-
插件名为 `@eduwork/dsh-oidc`,Bundle 层 ID 为 `enterprise-oidc`。`backend: web`、`uiMode: standard` 启用公共界面;`external` 允许产品自绘入口但保留公共 RPC。`allowEmptyProfiles: true` 允许公版先只用个人 Key。
|
|
37
|
-
|
|
38
|
-
环境变量 `EDUWORK_OIDC_PROFILE` 指向一个 Profile、Profile 数组或 `{ "profiles": [...] }` 文件。未设置时兼容 `DSH_OIDC_ENTERPRISE_PROFILE`;显式 `profilePathEnv` 仍遵循宿主指定名称。
|
|
39
|
-
|
|
40
|
-
`oidcAccounts.configuration/status/begin/reconcile/logout/management` 保持原契约;新增 `resources(profileID)` 返回 `{profileID, modelSource, models, issues}`,不含秘密。`reconcile` 自动同步模型元数据。旧 `native` backend 不调用原配额桥接口,不新增桌面框架依赖;新桌面 `backend: desktop` 与 Web 共享 OIDC 实现,使用临时 loopback 回调而不依赖常驻 WebServer。
|
|
41
|
-
|
|
42
|
-
专属插件可在 Host 调用 `ctx.oidcAccounts.authorizedFetch(profileID, endpoint, init)`,复用有效 OIDC Access Token、刷新及一次 401 重试,得到普通 `Response`。此方法没有 Remote 标记,不向浏览器暴露 Token;默认只允许该 Profile 的 issuer 和 Key Binding 精确 origin。额外 HTTPS origin 必须通过受信宿主插件配置 `authorizedOrigins` 声明,浏览器不能改变。并发请求共享一次 Refresh Token 轮换,避免心跳与模型配置同时刷新造成失效。该入口提供认证运输能力,不定义心跳或语音业务。
|
|
43
|
-
|
|
44
|
-
Host 事件 `oidc/accounts-changed` 返回 `{profileID, state}`。`authenticated` 与 `connected` 都表示身份已登录,纯身份的 `connected` 不要求模型 Key;`signed_out` 表示已退出。未登录的授权请求抛出 `oidc_login_required`,越界 origin 为 `oidc_authorized_origin_denied`;第二次 HTTP 401 仍返回 Response,由业务方处理。主动退出不应自动弹出过期提示。
|
|
45
|
-
|
|
46
|
-
Issuer、Client ID 或资源端点变化会阻止旧管理凭据流向新环境;旧 Web 登录记录仍可复用身份,但需要重新关联模型 Key。个人 API Key 不受机构注销与资源绑定变化影响。
|
|
47
|
-
|
|
9
|
+
| 模型目录 GET /models | 已验证网关发现的 API 基址 | 当前 Access Token |
|
|
10
|
+
| 模型 JSON/SSE 调用 | 相同 API 基址 | 当前 Access Token |
|
|
11
|
+
| 可选机构配额 GET | 机构扩展声明的相对路径 | 共享 Host 传输中的当前 Access Token |
|
|
48
12
|
|
|
13
|
+
目录响应中的 data[].id 决定可见模型;本地元数据可以补充上下文、模态和推理事实,不能扩大服务端授权。退出或重新授权会取消在途调用,并拒绝旧调用使用新账户凭据。同一授权正常刷新可以继续工作。
|
|
49
14
|
|
|
50
|
-
|
|
15
|
+
公共 Remote 只返回模型资源投影,不包含 Token、配额或管理接口。配额逻辑和授权范围由机构维护,见[账户扩展](account-extensions.md)。[目录 OpenAPI](../protocol/resources.openapi.yaml)与[网关契约](gateway-auth/README.md)共同说明接入表面。
|
|
@@ -1,65 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Package release checklist
|
|
2
2
|
|
|
3
3
|
[简体中文](release-checklist.md) | **English**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Source and publication are maintained in EduWork. Follow [the shared package workflow](https://github.com/ecnu/EduWork/blob/main/docs/PACKAGES_EN.md); this package retains its independent npm name and SemVer.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
- [ ] The `freedomkk-qfeng/dsh-oidc` remote and ownership of the `@eduwork/dsh-oidc` npm package are confirmed.
|
|
13
|
-
- [ ] Maintainer, security, and release-manager rosters recorded, accurately stating whether backups and a recovery path currently exist.
|
|
14
|
-
- [ ] GitHub Private Vulnerability Reporting is enabled and its entry point has been checked without sensitive data.
|
|
15
|
-
- [ ] ECNU/ChatECNU name, example text, colors, and trademark notice approved.
|
|
16
|
-
|
|
17
|
-
## Source and protocol review
|
|
18
|
-
|
|
19
|
-
- [ ] Independent technical review completed for OIDC, Key Binding, model-gateway invariants, Profile validation, Provider credentials, and the native boundary; the maintainer accepted findings and exceptions in the release record.
|
|
20
|
-
- [ ] Enterprise Profile JSON Schema matches runtime behavior.
|
|
21
|
-
- [ ] OpenAPI matches normative Key Binding prose and implementation.
|
|
22
|
-
- [ ] OIDC standard references and limitations are current.
|
|
23
|
-
- [ ] No unnecessary local reimplementation of a supported DSH capability.
|
|
24
|
-
- [ ] Compatibility matrix and changelog updated.
|
|
25
|
-
|
|
26
|
-
## Security and privacy
|
|
27
|
-
|
|
28
|
-
- [ ] Threat model reviewed for actual topology.
|
|
29
|
-
- [ ] Single-user Credential Provider, Profile ownership and shared-key-slot boundaries verified.
|
|
30
|
-
- [ ] OIDC success and negative conformance suite passed against staging.
|
|
31
|
-
- [ ] Cross-user/tenant Key Binding authorization tests passed.
|
|
32
|
-
- [ ] API-key expiry, rotation, suspension, and remote revocation behavior tested.
|
|
33
|
-
- [ ] Confirmed the WebServer listens only on `127.0.0.1` and no reverse proxy, port forward, or tunnel exposes the local session to other users.
|
|
34
|
-
- [ ] Remote TLS, CSP, cookies, CSRF, egress, clock, logging, APM, and backups reviewed.
|
|
35
|
-
- [ ] Privacy/legal review completed for identity and audit data.
|
|
36
|
-
- [ ] Secret scans of both the current tree and publishable Git history found no production hosts, IDs, keys, logs, personal paths, or personal data.
|
|
37
|
-
|
|
38
|
-
## Supply chain
|
|
39
|
-
|
|
40
|
-
- [ ] Clean `npm ci` and `npm run check` completed on Windows and Linux with Node 22 and 24.
|
|
41
|
-
- [ ] `npm audit` and static analysis reviewed (not merely run).
|
|
42
|
-
- [ ] Every direct/transitive license and exception reviewed.
|
|
43
|
-
- [ ] npm install scripts reviewed; unexpected scripts denied.
|
|
44
|
-
- [ ] Lockfile diff reviewed and dependency versions pinned as intended.
|
|
45
|
-
- [ ] GitHub Actions pinned to immutable commits before public release.
|
|
46
|
-
|
|
47
|
-
## Product acceptance
|
|
48
|
-
|
|
49
|
-
- [ ] Plain Web DSH: login, callback, display name/sub fallback, provision, model call, refresh, check, logout.
|
|
50
|
-
- [ ] Desktop backend: shared Wails/Electron flow, cancellation and model defaults verified; validate any maintained legacy native bridge separately.
|
|
51
|
-
- [ ] Native multimodal and text-only + image-transform routes tested.
|
|
52
|
-
- [ ] Unsupported reasoning-effort model still runs with thinking enabled.
|
|
53
|
-
- [ ] Failure UX tested: Discovery, token, UserInfo, bootstrap, policy denial, model key, expiry, network timeout.
|
|
54
|
-
|
|
55
|
-
## Build and publish
|
|
56
|
-
|
|
57
|
-
- [ ] `npm run check` passes from a clean checkout.
|
|
58
|
-
- [ ] `npm pack --dry-run` and extracted tarball reviewed; only intended files included.
|
|
59
|
-
- [ ] Source maps contain no private absolute paths or secrets.
|
|
60
|
-
- [ ] Tag/release notes/checksums prepared.
|
|
61
|
-
- [ ] The actual publication path is recorded: until a Trusted Publisher is configured, run the manual workflow only with `publish=false`; the first stable release may use the maintainer's npm CLI plus browser 2FA to publish the frozen tarball, explicitly without claiming provenance.
|
|
62
|
-
- [ ] When using Trusted Publishing, the Publisher is bound to repository `freedomkk-qfeng/dsh-oidc`, workflow `release.yml`, and environment `npm`; the job uses pinned npm CLI `11.6.2`, and this commit's Windows/Linux × Node 22/24 CI is successful.
|
|
63
|
-
- [ ] Inputs and artifacts are verified for the selected path: the CLI path checks frozen tarball identity, SHA-256, 2FA, and registry results; the Trusted path additionally checks the existing `v<package version>` tag, commit, workflow artifact, and an actual npm provenance attestation.
|
|
64
|
-
- [ ] Publishing credentials were not written to the repository, logs, or deliverables, and the release does not claim Trusted Publishing before it is configured.
|
|
65
|
-
- [ ] Rollback/deprecation and vulnerability-notification plan confirmed.
|
|
7
|
+
- Review the changed behavior, version, changelog, compatibility and package lock.
|
|
8
|
+
- Run npm ci and npm run check in this package directory, plus relevant real Host or browser acceptance when behavior changes. Use synthetic test data.
|
|
9
|
+
- Inspect the actual tarball, public documentation, licenses and exported entries. Never ship credentials or user data.
|
|
10
|
+
- Select this package in packages-release.yml; publish=false only produces artifacts. Explicit publication runs from the matching package version tag, using the npm environment and this repository's trusted publisher.
|
|
11
|
+
- Verify registry bytes before updating a product lock. Publishing npm does not publish a desktop Release or deploy a client.
|
|
@@ -1,65 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 包发布检查表
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](release-checklist.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
源码与发布入口统一在 EduWork;遵循[公共包发布流程](https://github.com/ecnu/EduWork/blob/main/docs/PACKAGES.md),本包保留独立的 npm 名称和 SemVer。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
- [ ] `freedomkk-qfeng/dsh-oidc` 远程仓库位置和 `@eduwork/dsh-oidc` npm 包所有权均已确认。
|
|
13
|
-
- [ ] 维护者、安全维护者和发布经理名单已记录,并如实说明当前是否存在替补及恢复路径。
|
|
14
|
-
- [ ] GitHub Private Vulnerability Reporting 已启用并完成一次无敏感数据的入口检查。
|
|
15
|
-
- [ ] ECNU/ChatECNU 名称、示例文字、颜色和商标声明获批。
|
|
16
|
-
|
|
17
|
-
## 源码与协议审查
|
|
18
|
-
|
|
19
|
-
- [ ] OIDC、Key Binding、模型网关一致性、Profile 校验、Provider 凭据和 native 边界已完成独立技术复核,维护者已在发布记录中接受结论和例外。
|
|
20
|
-
- [ ] Enterprise Profile JSON Schema 与运行行为一致。
|
|
21
|
-
- [ ] OpenAPI 与 Key Binding 规范正文和实现一致。
|
|
22
|
-
- [ ] OIDC 标准引用和限制仍然有效。
|
|
23
|
-
- [ ] 没有重复实现 DSH 已支持且适用的能力。
|
|
24
|
-
- [ ] 兼容性矩阵和变更日志已更新。
|
|
25
|
-
|
|
26
|
-
## 安全与隐私
|
|
27
|
-
|
|
28
|
-
- [ ] 已按实际部署拓扑审查威胁模型。
|
|
29
|
-
- [ ] 单机 Credential Provider、Profile 归属与共享 Key 槽隔离边界已验证。
|
|
30
|
-
- [ ] 已在预发布环境通过 OIDC 成功和反向符合性测试。
|
|
31
|
-
- [ ] 已通过跨用户/跨 tenant Key Binding 授权测试。
|
|
32
|
-
- [ ] 已测试 API Key 过期、轮换、停用和远程撤销行为。
|
|
33
|
-
- [ ] 已确认 WebServer 仅监听 `127.0.0.1`,没有反向代理、端口转发或隧道把本地会话暴露给其他用户。
|
|
34
|
-
- [ ] 已审查远端 TLS、CSP、Cookie、CSRF、出口、时钟、日志、APM 和备份。
|
|
35
|
-
- [ ] 已完成身份和审计数据的隐私/法律审查。
|
|
36
|
-
- [ ] 当前树与待公开 Git 历史的密钥扫描均未发现生产 host、ID、Key、日志、个人路径或个人数据。
|
|
37
|
-
|
|
38
|
-
## 供应链
|
|
39
|
-
|
|
40
|
-
- [ ] Windows 和 Linux 上分别使用 Node 22、24 完成干净 `npm ci` 与 `npm run check`。
|
|
41
|
-
- [ ] `npm audit` 和静态分析结果经过审查,而不只是执行。
|
|
42
|
-
- [ ] 所有直接/间接许可证和例外已经审查。
|
|
43
|
-
- [ ] npm 安装脚本已经审查,未预期脚本被拒绝。
|
|
44
|
-
- [ ] Lockfile diff 已审查,依赖版本按预期锁定。
|
|
45
|
-
- [ ] 公开发布前,GitHub Actions 已固定到不可变 commit。
|
|
46
|
-
|
|
47
|
-
## 产品验收
|
|
48
|
-
|
|
49
|
-
- [ ] 纯 Web DSH:登录、callback、显示 name/sub 降级、provision、模型调用、刷新、检查连接和退出。
|
|
50
|
-
- [ ] 桌面 backend:Wails/Electron 共用流程、取消和默认模型正确;仍需维护的旧 native 桥单独验证。
|
|
51
|
-
- [ ] 原生多模态和纯文本 + image-transform 路由均已测试。
|
|
52
|
-
- [ ] 不支持 reasoning effort 的模型仍能启用 thinking 并正常运行。
|
|
53
|
-
- [ ] 已测试失败 UX:Discovery、token、UserInfo、bootstrap、策略拒绝、模型 Key、过期和网络超时。
|
|
54
|
-
|
|
55
|
-
## 构建与发布
|
|
56
|
-
|
|
57
|
-
- [ ] 在干净 checkout 中通过 `npm run check`。
|
|
58
|
-
- [ ] 已审查 `npm pack --dry-run` 和解压后的 tarball,且只包含预期文件。
|
|
59
|
-
- [ ] Source map 不包含私有绝对路径或秘密。
|
|
60
|
-
- [ ] Tag、发布说明和 checksum 已准备。
|
|
61
|
-
- [ ] 实际发布路径已记录:Trusted Publisher 尚未配置时,手动 workflow 只以 `publish=false` 运行;首次稳定版可以使用维护者 npm CLI + 浏览器 2FA 发布冻结 tarball,且明确不声称 provenance。
|
|
62
|
-
- [ ] 若使用 Trusted Publishing,Publisher 已绑定仓库 `freedomkk-qfeng/dsh-oidc`、workflow `release.yml` 和 environment `npm`;发布 job 使用固定 npm CLI `11.6.2`,且该提交的 Windows/Linux × Node 22/24 CI 已成功。
|
|
63
|
-
- [ ] 发布输入与产物已按所选路径核验:CLI 路径核对冻结 tarball 身份、SHA-256、2FA 和 registry 结果;Trusted 路径还核对现有 `v<package version>` tag、提交、workflow artifact 和实际 npm provenance attestation。
|
|
64
|
-
- [ ] 发布凭据没有写入仓库、日志或交付物;未配置 Trusted Publisher 时也不宣称使用了 Trusted Publishing。
|
|
65
|
-
- [ ] 已确认回滚、弃用和漏洞通知计划。
|
|
7
|
+
- 核对变更行为、版本、变更记录、兼容范围和依赖锁。
|
|
8
|
+
- 在当前包目录执行 npm ci、npm run check;有行为变化时补对应 Host 或浏览器实测,使用合成测试数据。
|
|
9
|
+
- 检查实际 tarball、公开文档、许可证和导出入口,不携带凭据或用户数据。
|
|
10
|
+
- 在 packages-release.yml 中选择本包;publish=false 仅产出候选。明确发布时从匹配包版本的 tag 运行,使用 npm environment 与本仓库的 Trusted Publisher。
|
|
11
|
+
- 核验 registry 中的实际字节后再更新产品锁。发布 npm 不会发布桌面 Release 或替换客户端。
|