Repository navigation
v5.21.0
Minor Changes
-
602d0a3: Address SigningProvider first-adopter friction (#1022 from #3283 KMS integration)
Six small additions surfaced by the first KMS-backed SigningProvider deployment. All additive — no breaking changes, no wire-format changes.
pemToAdcpJwk(pem, { kid, algorithm, adcp_use })— new export from@adcp/client/signing(viasrc/lib/signing/jwks-helpers.ts). Converts a public-key PEM to an AdCP JWK with the fields that matter for publication at/.well-known/jwks.json:alguses the JOSE name ("EdDSA"/"ES256"), not the AdCP wire identifier — confusing the two is the most common footgun and silently producesrequest_signature_key_purpose_invalidat step 8.adcp_useis required by AdCP verifiers at step 8 (hard gate).key_ops: ["verify"]because the published JWK is the public half. ThrowsTypeErroron private-key PEM input (credential leak guard) and on unsupported algorithm values.createGcpKmsSigningProviderLazy(example) — synchronous variant of the eager factory. DefersgetPublicKeyto the firstsign()call. Uses rejection-clearing in-flight promise dedup to prevent thundering herd on concurrent first calls and avoid permanently caching transient init failures.expectedPublicKeyPemtripwire (example) — optional field onGcpKmsSigningProviderOptions(both factories). Compares SPKI bytes at init time; throws explicitly when KMS returns null PEM with the tripwire set (no silent bypass). Catches out-of-band key rotations before they cause widespread verifierrequest_signature_key_unknownfailures.SigningProvider.fingerprintJSDoc — clarifies that the field may embed infra identifiers (e.g., GCP project ID via the version resource name) and recommendskidfor shared observability pipelines.- Multi-purpose key publication guidance — example JSDoc now points at the JWKS-shape guidance (two JWK entries with different
kidvalues and matching key bytes, taggedadcp_use: 'request-signing'/'webhook-signing'). Cryptographically safe via RFC 9421'stagprofile isolation. jwks_uriinformational override — new optional field onAgentRequestSigningOperationOverrides(visible on both inline and provider config shapes). Mirrors what brand.json publishes for split-domain setups where the JWKS lives off the conventional${agent_url}/.well-known/jwks.jsonpath. Carried for self-describing config + audit logs; the SDK doesn't consume it for signing (verifiers walk brand.json fromagent_url).
-
ecf015e: feat(signing): add
signerProvideroption tocreateWebhookEmitterfor KMS-backed webhook signingAdopters who moved request signing to a managed key store (GCP KMS, AWS KMS, Azure Key Vault) via the 5.20.0
SigningProviderabstraction previously still had to hold a private JWK in process for webhook signing, defeating the KMS threat model.WebhookEmitterOptionsnow acceptssignerProvider?: SigningProvideras a KMS-backed alternative tosignerKey. Internally, the emitter routes tosignWebhookAsyncwhen a provider is set andsignWebhookwhen asignerKeyis set. Exactly one must be provided; construction throwsTypeErrorif neither or both are given.All existing emitter semantics (retries, idempotency-key stability, content-digest, redirect policy) are identical between the two paths — only the signing dispatch differs.
Migration note:
signerKeychanges from required to optional at the TypeScript type level. Existing callers that passsignerKeyare unaffected. Callers who forwardWebhookEmitterOptionsand rely onsignerKeybeing a required field in their own type signatures should update those types.JWKS note: The JWK published at
jwks_urifor the key wrapped by asignerProviderMUST carryadcp_use: "webhook-signing"— receivers validate key purpose against this field.