feat(credentials): add stage 3 authenticated OAuth and access-token issuance
Add explicit legacy/broker configuration. Broker mode requires a protected keyring, product-approved permission profiles and enabled platform OAuth; production requires PostgreSQL. Default legacy behavior stays unchanged. Wire the broker to v2 signed device status, authorization start/status and access-token issuance routes. Bind proofs to protocol, environment, app, method/path and complete payload; verify nonce, certificate, owner and binding generation. Add an additive generation migration and return the current generation in binding receipts or authenticated bootstrap status. Persist encrypted OAuth state and atomically claim callbacks. Verify the actual consenting user, supersede older pending authorization intents and recheck bindings/transactions before credential writes and issuance. Preserve rotated credentials if unbind occurs mid-refresh, but deny issuance. Return an explicit access-only response and record metadata-only audit. Extract shared legacy device authentication so notifications do not depend on the business proxy module. Broker mode omits legacy refresh/claim/start and /work/api routes; authorization cards reference server-owned v2 transactions. Document signatures, configuration and migration boundaries. Validation: 185 passed, 3 skipped (real PostgreSQL not configured), with 15 existing dependency deprecation warnings. New API coverage: 38 passed, 1 real PostgreSQL case skipped. AST, docs and staged diff checks pass. No production deployment, key generation, client upgrade or real Work API calls were performed. Compose/mount configuration, full unbind/connection compensation and durable message-task lifecycle remain later stages.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 海诺中继服务部署项目
|
||||
|
||||
集中凭据改造按阶段交付,见 [改造与阶段记录](CREDENTIAL_MIGRATION.md)。阶段1已提供加密存储基础,阶段2已提供内部Broker与集中刷新;尚未接入公开OAuth/领取路由或改变当前客户端协议,不能据此判断现网已切换。
|
||||
集中凭据改造按阶段交付,见 [改造与阶段记录](CREDENTIAL_MIGRATION.md)。阶段1/2已提供存储与刷新,阶段3新增显式broker模式的OAuth及认证领取接口,默认仍为legacy;[v2接口契约](CREDENTIAL_PROTOCOL_V2.md)包含签名、配置和兼容边界。尚未部署或发布新客户端,不能据此判断现网已切换。
|
||||
|
||||
2026-10-28 新增[客户端主动消息与授权卡片](NOTIFICATIONS.md),本地代码已实现,现网部署和卡片验收待完成。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user