Repository navigation
feat(spec): tencentcloud-tc3-hmac-sha256 joins the signed connector auth schemes (ADR-0143 D2.3, slice 2 of #26710) - #28279
Conversation
…uth schemes; the request signer's scheme is typed by the scheme list Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cxRP1AqTeP2PWAhwGK
…to the tencentcloud-sdk-nodejs vectors Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cxRP1AqTeP2PWAhwGK
…rtefacts and the changeset Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cxRP1AqTeP2PWAhwGK
📓 Docs Drift CheckThis PR changes 2 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 168 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a997b267d297f4cef00f5d1ce38b1065f859bf11 && git checkout a997b267d297f4cef00f5d1ce38b1065f859bf11
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6285203da7ec7e0587b6aab25ebfb28277ab454d baa3375ab08c377e5d9f590c0ae655080165066e && git checkout -B drift-repro 6285203da7ec7e0587b6aab25ebfb28277ab454d && git merge --no-ff baa3375ab08c377e5d9f590c0ae655080165066e
node scripts/docs-audit/affected-docs.mjs --json 6285203da7ec7e0587b6aab25ebfb28277ab454d
|
|
domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia Contract-review-claim: The lane seat runs the |
|
domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia Seat ACCEPT · PR #28279 · head
|
Requested by Elon · project thread
domain:server#3 · os-elon-musk · session_016WV4cxRP1AqTeP2PWAhwGK
Refs #26710
Clause-②: yes (widening: one member added to the closed signing-scheme list and one shape to the
signedunion; one schema export and its type added.ConnectorRequestSigner.schemeis now typed by the scheme list, but that interface is in no release yet: it ships with #28273's pending changeset, so no published surface narrows)Metadata-protocol: added
维护者速读
signed认证新增第二个签名方案,腾讯云 API 3.0 签名 v3(tencentcloud-tc3-hmac-sha256)。元数据仍只写方案名、公开的 SecretId(keyId)和密钥引用credentialRef;rest/openapi每次请求(含重试)用新的时间戳重新签名。signature拒绝、mcp上拒绝;secretId提示改写为keyId;未知 scheme 的提示现在列出两个方案。bearer/api-key/basic不变;签名接缝只把scheme的类型从任意字符串收紧到方案列表(该接口尚未发布)。packages/services/service-automation/src/request-signing/tencentcloud-tc3-hmac-sha256.ts和它的测试。pnpm --filter @objectstack/service-automation exec vitest run src/request-signing,看到腾讯 SDK 的 POST 与 GET 两个签名逐字节复现,错误密钥得到不同签名。What changes
@objectstack/specConnectorSigningSchemeSchemagainstencentcloud-tc3-hmac-sha256. Thesignedunion gainsConnectorInstanceSignedTencentCloudTc3AuthSchema:{ type: 'signed', scheme: 'tencentcloud-tc3-hmac-sha256', keyId, credentialRef }, astrictObject.keyIdis the SecretId. The SecretKey is only ever acredentialRef.secret,privateKey,secretKeyandaccessKeySecretby name with thecredentialRefprescription, an authoredsignature, andsignedonprovider: 'mcp'.secretIdis answered withkeyId. The unknown-scheme refusal names both shipped schemes.ConnectorRequestSigner.schemeis typedConnectorSigningSchemerather thanstring.@objectstack/service-automationrequest-signing/tencentcloud-tc3-hmac-sha256.ts:content-type:andhost:,content-type;host, and the hex SHA-256 of the body.TC3-HMAC-SHA256, the timestamp, the scope<date>/<service>/tc3_requestand the hashed canonical request.HMAC("TC3"+SecretKey, date)→ service →tc3_request.X-TC-Timestamp.X-TC-Action/-Version/-Regionstay unsigned, as in the vendor's SDK.application/x-www-form-urlencoded(what the SDK sends on a GET), so the signed header is the sent header.authitself againstnever, which still names an unhandled scheme at compile time (ablation below).Docs:
connectors.mdx"Request signing" gains the Tencent example and the scheme's header rules. Thevariant-docs.jsonscheme key lists both members. The references are regenerated withcheck:generated --fix.The surface is inside the amended claim 6535175098.
Why
ADR-0143 D2.3 / Q4 A: the closed list grows one scheme at a time, each with its signer and vectors. D2.3's vector rule takes the vendor's worked example when it is complete, and otherwise the vendor's official SDK test suite named with its version. Tencent's own example masks the SecretKey, so this slice takes the second branch.
Verification
tencentcloud-tc3-hmac-sha256.test.tsreproduces, byte for byte, the twosign3cases of the officialtencentcloud-sdk-nodejsrelease 4.1.336,test/common/sign.test.ts: POSTapplication/jsonand GETapplication/x-www-form-urlencoded. It uses that suite's own placeholder key pair, timestamp and service, and the file header names the SDK, release and file. The suite's multipart case is not carried, because a signed body is text here. A wrong key gives a different signature. The bound signer at the vector's instant gives the vector.cvm.connector-auth-signed.test.tsadds:restandopenapisecretIdaliasconnector-rest-plugin.test.tsruns a real host with the rest provider and atencentcloud-tc3-hmac-sha256instance. The call carries a TC3Authorizationscoped tocvmand anX-TC-Timestamp, and the key is absent from calls and descriptors.pnpm --filter <pkg> typecheckis green for spec, service-automation and connector-rest.tencentcloud-tc3-hmac-sha256registry case removed,service-automationtypecheck fails, naming the unhandled shape (TS2322 at thenevercheck)."TC3"prefix dropped from the key derivation, 6 vector pins go red.dispatch-gates --commandsderives (105) ran and exited 0, reconciled with--ran: 105 run, 0 NOT-MEASURED.pnpm lintexits 0.Skills-docs:
grep -rlnE "credentialRef|app-credential|api-key" skillshitsskills/objectstack-automation/{SKILL.md,references/integration-recipes.md,evals/integrations-declared.json}. Thesignedtext rides #28226, as for #28273, because askills/**edit would make this slice Tier H.content/docs/automation/connectors.mdxcarries it here.Human Minimum
packages/specholds no runtime logic. (The signer is inservice-automation.)pnpm lintpasses.main, one pull request (slice 2 of 3 of connectors: request-signing auth kind for the openapi and rest providers (RSA2 / HMAC canonical-request signers: Alipay, WeChat Pay, Aliyun, Tencent Cloud, e签宝) — the vendor-auth half that #26702 does not cover #26710).packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cxRP1AqTeP2PWAhwGK