@kya-os/checkpoint-shared 1.7.0 → 1.9.0
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.md +159 -9
- package/README.md +24 -7
- package/dist/agent-catalog.d.mts +12 -0
- package/dist/agent-catalog.d.mts.map +1 -0
- package/dist/agent-catalog.d.ts +12 -0
- package/dist/agent-catalog.d.ts.map +1 -0
- package/dist/agent-catalog.js +105 -0
- package/dist/agent-catalog.mjs +105 -0
- package/dist/agent-catalog.mjs.map +1 -0
- package/dist/beacon-nonce/index.d.mts +1 -0
- package/dist/beacon-nonce/index.d.mts.map +1 -1
- package/dist/beacon-nonce/index.d.ts +1 -0
- package/dist/beacon-nonce/index.d.ts.map +1 -1
- package/dist/beacon-nonce/index.js +9 -3
- package/dist/beacon-nonce/index.mjs +9 -4
- package/dist/beacon-nonce/index.mjs.map +1 -1
- package/dist/beacon-types/index.d.mts +41 -1
- package/dist/beacon-types/index.d.mts.map +1 -1
- package/dist/beacon-types/index.d.ts +41 -1
- package/dist/beacon-types/index.d.ts.map +1 -1
- package/dist/beacon-types/index.js +153 -4
- package/dist/beacon-types/index.mjs +139 -4
- package/dist/beacon-types/index.mjs.map +1 -1
- package/dist/{browser-posture-BLhw-MON.d.mts → browser-posture-5fPrsxx7.d.mts} +6 -6
- package/dist/{browser-posture-BLhw-MON.d.mts.map → browser-posture-5fPrsxx7.d.mts.map} +1 -1
- package/dist/{browser-posture-B8YiPa5c.d.ts → browser-posture-CCR1kh5e.d.ts} +6 -6
- package/dist/{browser-posture-B8YiPa5c.d.ts.map → browser-posture-CCR1kh5e.d.ts.map} +1 -1
- package/dist/browser-posture-cookie.js +1 -1
- package/dist/browser-posture-cookie.mjs +1 -1
- package/dist/browser-posture-cookie.mjs.map +1 -1
- package/dist/browser-posture-proof-verifier-DvsOmFrM.js +202 -0
- package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs +180 -0
- package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs.map +1 -0
- package/dist/browser-posture-proof-verifier.d.mts +25 -0
- package/dist/browser-posture-proof-verifier.d.mts.map +1 -0
- package/dist/browser-posture-proof-verifier.d.ts +25 -0
- package/dist/browser-posture-proof-verifier.d.ts.map +1 -0
- package/dist/browser-posture-proof-verifier.js +7 -0
- package/dist/browser-posture-proof-verifier.mjs +3 -0
- package/dist/browser-posture-proof.d.mts +4 -5
- package/dist/browser-posture-proof.d.mts.map +1 -1
- package/dist/browser-posture-proof.d.ts +4 -5
- package/dist/browser-posture-proof.d.ts.map +1 -1
- package/dist/browser-posture-proof.js +10 -79
- package/dist/browser-posture-proof.mjs +6 -77
- package/dist/browser-posture-proof.mjs.map +1 -1
- package/dist/browser-posture.d.mts +1 -1
- package/dist/browser-posture.d.ts +1 -1
- package/dist/browser-posture.js +6 -5
- package/dist/browser-posture.mjs +4 -3
- package/dist/browser-posture.mjs.map +1 -1
- package/dist/browser.d.mts +25 -286
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +25 -286
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/browser.mjs.map +1 -1
- package/dist/canonical-signer/index.js +30 -28
- package/dist/canonical-signer/index.mjs +31 -1
- package/dist/canonical-signer/index.mjs.map +1 -1
- package/dist/clearance.d.mts +1 -1
- package/dist/clearance.d.ts +1 -1
- package/dist/clearance.js +2 -2
- package/dist/clearance.mjs +2 -2
- package/dist/client-ip-B7w-uHfS.d.mts +55 -0
- package/dist/client-ip-B7w-uHfS.d.mts.map +1 -0
- package/dist/client-ip-B7w-uHfS.d.ts +55 -0
- package/dist/client-ip-B7w-uHfS.d.ts.map +1 -0
- package/dist/{client-ip-CW6pRyLf.js → client-ip-B8wFzJ5f.js} +117 -7
- package/dist/{client-ip-B2Xeo-GK.mjs → client-ip-DIJyr6px.mjs} +113 -9
- package/dist/client-ip-DIJyr6px.mjs.map +1 -0
- package/dist/client-ip.d.mts +2 -2
- package/dist/client-ip.d.ts +2 -2
- package/dist/client-ip.js +3 -2
- package/dist/client-ip.mjs +2 -2
- package/dist/consent-handoff.d.mts +0 -3
- package/dist/consent-handoff.d.mts.map +1 -1
- package/dist/consent-handoff.d.ts +0 -3
- package/dist/consent-handoff.d.ts.map +1 -1
- package/dist/consent-handoff.mjs.map +1 -1
- package/dist/default-sign-in-host.d.mts +10 -0
- package/dist/default-sign-in-host.d.mts.map +1 -0
- package/dist/default-sign-in-host.d.ts +10 -0
- package/dist/default-sign-in-host.d.ts.map +1 -0
- package/dist/default-sign-in-host.js +72 -0
- package/dist/default-sign-in-host.mjs +66 -0
- package/dist/default-sign-in-host.mjs.map +1 -0
- package/dist/detection-reason-mapping-B9RSkOs8.js +277 -0
- package/dist/detection-reason-mapping-BGymWIPl.mjs +249 -0
- package/dist/detection-reason-mapping-BGymWIPl.mjs.map +1 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.mts +52 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.mts.map +1 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.ts +52 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.ts.map +1 -0
- package/dist/engine-enforcing-AYEcgNsb.js +39 -0
- package/dist/engine-enforcing-B5eNfCpG.mjs +29 -0
- package/dist/engine-enforcing-B5eNfCpG.mjs.map +1 -0
- package/dist/engine-enforcing-DiOclGqf.d.mts +11 -0
- package/dist/engine-enforcing-DiOclGqf.d.mts.map +1 -0
- package/dist/engine-enforcing-DiOclGqf.d.ts +11 -0
- package/dist/engine-enforcing-DiOclGqf.d.ts.map +1 -0
- package/dist/engine-info.d.mts +2 -0
- package/dist/engine-info.d.ts +2 -0
- package/dist/engine-info.js +4 -0
- package/dist/engine-info.mjs +3 -0
- package/dist/errors/index.d.mts +6 -0
- package/dist/errors/index.d.mts.map +1 -1
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +28 -6
- package/dist/errors/index.mjs +28 -6
- package/dist/errors/index.mjs.map +1 -1
- package/dist/{external-B7WI9FyQ.d.ts → external-m3Kmafwj.d.mts} +2 -2
- package/dist/{external-B7WI9FyQ.d.mts.map → external-m3Kmafwj.d.mts.map} +1 -1
- package/dist/{external-B7WI9FyQ.d.mts → external-m3Kmafwj.d.ts} +2 -2
- package/dist/{external-B7WI9FyQ.d.ts.map → external-m3Kmafwj.d.ts.map} +1 -1
- package/dist/fetcher-C8qvwdnA.d.ts +44 -0
- package/dist/fetcher-C8qvwdnA.d.ts.map +1 -0
- package/dist/fetcher-D2vjr7jB.d.mts +44 -0
- package/dist/fetcher-D2vjr7jB.d.mts.map +1 -0
- package/dist/gateway-client-ip.d.mts +1 -3
- package/dist/gateway-client-ip.d.mts.map +1 -1
- package/dist/gateway-client-ip.d.ts +1 -3
- package/dist/gateway-client-ip.d.ts.map +1 -1
- package/dist/gateway-client-ip.js +2 -2
- package/dist/gateway-client-ip.mjs +2 -2
- package/dist/gateway-client-ip.mjs.map +1 -1
- package/dist/host-adapter/index.d.mts +2 -2
- package/dist/host-adapter/index.d.ts +2 -2
- package/dist/host-adapter/index.js +2 -1
- package/dist/host-adapter/index.mjs +2 -2
- package/dist/{host-adapter-C-4IxmqM.mjs → host-adapter-BKdQHwbi.mjs} +56 -3
- package/dist/{host-adapter-C-4IxmqM.mjs.map → host-adapter-BKdQHwbi.mjs.map} +1 -1
- package/dist/{host-adapter-CwW9YB0U.js → host-adapter-bWftXA9T.js} +60 -1
- package/dist/index-DnFsmr_o.d.ts +156 -0
- package/dist/index-DnFsmr_o.d.ts.map +1 -0
- package/dist/index-rvw5Bz-r.d.mts +156 -0
- package/dist/index-rvw5Bz-r.d.mts.map +1 -0
- package/dist/index.d.mts +6681 -11335
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +6681 -11335
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2322 -6900
- package/dist/index.mjs +2236 -6574
- package/dist/index.mjs.map +1 -1
- package/dist/{kya-http-error-codes-UYb1zpGM.js → kya-http-error-codes-B4rUmUEI.js} +2 -0
- package/dist/{kya-http-error-codes-7ewV5RuK.d.ts → kya-http-error-codes-C14E4gi3.d.mts} +2 -1
- package/dist/kya-http-error-codes-C14E4gi3.d.mts.map +1 -0
- package/dist/{kya-http-error-codes-7ewV5RuK.d.mts → kya-http-error-codes-C14E4gi3.d.ts} +2 -1
- package/dist/kya-http-error-codes-C14E4gi3.d.ts.map +1 -0
- package/dist/{kya-http-error-codes-C2JiWPsi.mjs → kya-http-error-codes-DSBrxNry.mjs} +3 -1
- package/dist/kya-http-error-codes-DSBrxNry.mjs.map +1 -0
- package/dist/kya-http.d.mts +3 -3
- package/dist/kya-http.d.ts +3 -3
- package/dist/kya-http.js +10 -2
- package/dist/kya-http.mjs +4 -3
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -1
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -1
- package/dist/mcpi/dashboard-config/index.mjs.map +1 -1
- package/dist/mcpi/status-list/index.d.mts +72 -0
- package/dist/mcpi/status-list/index.d.mts.map +1 -0
- package/dist/mcpi/status-list/index.d.ts +72 -0
- package/dist/mcpi/status-list/index.d.ts.map +1 -0
- package/dist/mcpi/status-list/index.js +703 -0
- package/dist/mcpi/status-list/index.mjs +684 -0
- package/dist/mcpi/status-list/index.mjs.map +1 -0
- package/dist/patterns-Bp40cwh2.d.mts +110 -0
- package/dist/patterns-Bp40cwh2.d.mts.map +1 -0
- package/dist/patterns-Bp40cwh2.d.ts +110 -0
- package/dist/patterns-Bp40cwh2.d.ts.map +1 -0
- package/dist/patterns-CiMpbdAF.js +243 -0
- package/dist/patterns-D4OAsNQY.mjs +173 -0
- package/dist/patterns-D4OAsNQY.mjs.map +1 -0
- package/dist/patterns.d.mts +2 -0
- package/dist/patterns.d.ts +2 -0
- package/dist/patterns.js +15 -0
- package/dist/patterns.mjs +3 -0
- package/dist/policy/enforcement.d.mts +3 -2
- package/dist/policy/enforcement.d.ts +3 -2
- package/dist/policy/enforcement.js +8 -2
- package/dist/policy/enforcement.mjs +3 -2
- package/dist/policy/fetcher.d.mts +2 -0
- package/dist/policy/fetcher.d.ts +2 -0
- package/dist/policy/fetcher.js +240 -0
- package/dist/policy/fetcher.mjs +238 -0
- package/dist/policy/fetcher.mjs.map +1 -0
- package/dist/policy/schemas.d.mts +3 -0
- package/dist/policy/schemas.d.ts +3 -0
- package/dist/policy/schemas.js +27 -0
- package/dist/policy/schemas.mjs +4 -0
- package/dist/{posture-origins-Ba83O0cD.mjs → posture-origins-Ci6k4Zh1.js} +24 -173
- package/dist/{posture-origins-CdVOdiMT.js → posture-origins-DGyS4Vuk.mjs} +2 -267
- package/dist/posture-origins-DGyS4Vuk.mjs.map +1 -0
- package/dist/{project-verification-key-BccT12tQ.js → project-verification-key-B-L3D2nC.js} +1 -1
- package/dist/{project-verification-key-66N4edKn.mjs → project-verification-key-CWXdu3-n.mjs} +2 -2
- package/dist/{project-verification-key-66N4edKn.mjs.map → project-verification-key-CWXdu3-n.mjs.map} +1 -1
- package/dist/provider-registry.d.mts +2 -0
- package/dist/provider-registry.d.ts +2 -0
- package/dist/provider-registry.js +51 -0
- package/dist/provider-registry.mjs +3 -0
- package/dist/reason-codes.d.mts +2 -0
- package/dist/reason-codes.d.ts +2 -0
- package/dist/reason-codes.js +8 -0
- package/dist/reason-codes.mjs +3 -0
- package/dist/{registered-sid-hUl-bvM5.mjs → registered-sid-26hNxp6t.mjs} +11 -2
- package/dist/registered-sid-26hNxp6t.mjs.map +1 -0
- package/dist/registered-sid-D6KCaT1E.d.mts +33 -0
- package/dist/registered-sid-D6KCaT1E.d.mts.map +1 -0
- package/dist/registered-sid-D6KCaT1E.d.ts +33 -0
- package/dist/registered-sid-D6KCaT1E.d.ts.map +1 -0
- package/dist/{registered-sid-eLCNZvIF.js → registered-sid-DVGTSH0L.js} +15 -0
- package/dist/ruleset-hash-Cmv8MSO5.js +34 -0
- package/dist/ruleset-hash-IRN5eI9H.d.mts +5 -0
- package/dist/ruleset-hash-IRN5eI9H.d.mts.map +1 -0
- package/dist/ruleset-hash-IRN5eI9H.d.ts +5 -0
- package/dist/ruleset-hash-IRN5eI9H.d.ts.map +1 -0
- package/dist/ruleset-hash-QQIaLuPi.mjs +30 -0
- package/dist/ruleset-hash-QQIaLuPi.mjs.map +1 -0
- package/dist/{schemas-YhagYDx_.js → schemas-BlScS1it.js} +0 -20
- package/dist/{index-HaqfPtaL.d.ts → schemas-CGKHzcMV.d.ts} +23 -195
- package/dist/schemas-CGKHzcMV.d.ts.map +1 -0
- package/dist/schemas-Cm4C4Z5G.js +703 -0
- package/dist/schemas-DPIT8usF.mjs +525 -0
- package/dist/schemas-DPIT8usF.mjs.map +1 -0
- package/dist/{schemas-7qodsG-Z.mjs → schemas-IHAhH3gV.mjs} +2 -16
- package/dist/schemas-IHAhH3gV.mjs.map +1 -0
- package/dist/{index-B7rTovHa.d.mts → schemas-m-GqyfyO.d.mts} +23 -195
- package/dist/schemas-m-GqyfyO.d.mts.map +1 -0
- package/dist/{step-up-COlmWJN8.mjs → step-up-BK0oBi11.mjs} +91 -41
- package/dist/step-up-BK0oBi11.mjs.map +1 -0
- package/dist/{step-up-C2d8C20x.js → step-up-Bp8RAQwv.js} +117 -55
- package/dist/{step-up-BjP--hG-.d.mts → step-up-Bz12gYKT.d.mts} +28 -12
- package/dist/step-up-Bz12gYKT.d.mts.map +1 -0
- package/dist/{step-up-BjP--hG-.d.ts → step-up-Bz12gYKT.d.ts} +28 -12
- package/dist/step-up-Bz12gYKT.d.ts.map +1 -0
- package/dist/test-fixtures/index.d.mts +4 -4
- package/dist/test-fixtures/index.d.mts.map +1 -1
- package/dist/test-fixtures/index.d.ts +4 -4
- package/dist/test-fixtures/index.d.ts.map +1 -1
- package/dist/test-fixtures/index.js +4 -4
- package/dist/test-fixtures/index.mjs +4 -4
- package/dist/test-fixtures/index.mjs.map +1 -1
- package/dist/tool-protection/index.d.mts +12 -0
- package/dist/tool-protection/index.d.mts.map +1 -1
- package/dist/tool-protection/index.d.ts +12 -0
- package/dist/tool-protection/index.d.ts.map +1 -1
- package/dist/tool-protection/index.js +46 -0
- package/dist/tool-protection/index.mjs +44 -1
- package/dist/tool-protection/index.mjs.map +1 -1
- package/dist/verification-BAw9N8Pt.js +181 -0
- package/dist/verification-Cvvv86TT.mjs +123 -0
- package/dist/verification-Cvvv86TT.mjs.map +1 -0
- package/fixtures/client-ip-resolution.n01.json +101 -0
- package/fixtures/kya-http/error-codes.json +2 -1
- package/fixtures/reviewer-grant-revocation.v1.json +53 -81
- package/package.json +55 -4
- package/dist/client-ip-B2Xeo-GK.mjs.map +0 -1
- package/dist/client-ip-DFamiNoz.d.mts +0 -34
- package/dist/client-ip-DFamiNoz.d.mts.map +0 -1
- package/dist/client-ip-DFamiNoz.d.ts +0 -34
- package/dist/client-ip-DFamiNoz.d.ts.map +0 -1
- package/dist/index-B7rTovHa.d.mts.map +0 -1
- package/dist/index-HaqfPtaL.d.ts.map +0 -1
- package/dist/kya-http-error-codes-7ewV5RuK.d.mts.map +0 -1
- package/dist/kya-http-error-codes-7ewV5RuK.d.ts.map +0 -1
- package/dist/kya-http-error-codes-C2JiWPsi.mjs.map +0 -1
- package/dist/posture-origins-Ba83O0cD.mjs.map +0 -1
- package/dist/registered-sid-D3g-gZQF.d.mts +0 -11
- package/dist/registered-sid-D3g-gZQF.d.mts.map +0 -1
- package/dist/registered-sid-D3g-gZQF.d.ts +0 -11
- package/dist/registered-sid-D3g-gZQF.d.ts.map +0 -1
- package/dist/registered-sid-hUl-bvM5.mjs.map +0 -1
- package/dist/schemas-7qodsG-Z.mjs.map +0 -1
- package/dist/step-up-BjP--hG-.d.mts.map +0 -1
- package/dist/step-up-BjP--hG-.d.ts.map +0 -1
- package/dist/step-up-COlmWJN8.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,156 @@
|
|
|
1
|
+
<!-- Generated by `pnpm changelog:generate` from the "## Release notes" sections of merged pull requests. Do not edit this file by hand: change the PR's release notes and regenerate. -->
|
|
2
|
+
|
|
1
3
|
# @kya-os/checkpoint-shared
|
|
2
4
|
|
|
3
|
-
##
|
|
5
|
+
## 1.9.0 - 2026-10-22
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
`@kya-os/checkpoint-nextjs` types its `events` option with it, so it no longer depends on `@kya-os/checkpoint`.
|
|
7
|
-
- **Removed:** `DEFAULT_ENV_VARS.AGENTSHIELD_WASM_PATH`, the path to the retired `agentshield_wasm` binary.
|
|
8
|
-
Nothing reads it.
|
|
9
|
-
Shipped under a minor because nothing consumes it yet.
|
|
7
|
+
### Breaking changes
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
- Removed: Unused dashboard and bouncer schemas: the analytics query and response schemas and types (`AnalyticsQuery`, `AnalyticsSessionsQuery`, `AnalyticsAgentSourcesQuery`, `AnalyticsAgentTypesQuery`, `AnalyticsExportQuery`, `AnalyticsRealtimeQuery`, `AnalyticsTimeSeries`, `AnalyticsChartData`, `AnalyticsSessionsResponse`, `AgentSourceDistribution`, their schemas, and the `AnalyticsSessionsSummary*`, `SharedAgentTypeDistribution*` and `SharedConfidenceDistribution*` aliases), the sign-in, sign-up, forgot-password, change-password and verify-email schemas and types, the inferred admin request types, the delegation, delegation status, delegation polling status, bouncer proof and tool consent override schemas and types, the unused bouncer OAuth, provider and consent types (`OAuthConnectionStatus`, `OAuthMode`, `OAuthTokensResponse`, `CRISPBudget`, `AuthProviderType`, `AuthProviderTypeInput`, `LegacyAuthProviderType`, `BaseAuthProvider`, `OAuthProvidersMap`, `AddUpdateProviderRequest`, `ProviderDefinition`, `ConsentCapability`, `ConsentAgentMetadata`, `ConsentSignInCopy`), the provider registry conversion helpers (`toProviderRegistryFormat`, `fromProviderRegistryFormat`, `fromProviderRegistryFormatSafe`, `isSupportedAuthType`, `SupportedProviderAuthType`), `parseRules`, and the schemas `AuthProviderTypeSchema`, `ProviderDefinitionSchema`, `BouncerOutcomeSchema`, `RuleLoadOptionsSchema`, `RuleUpdateEventSchema` and `RuleMatchResultSchema`. (#6563)
|
|
10
|
+
- Removed: Unused types from the `./consent-handoff` entry (`ConsentHandoffReportOutcome`, `ConsentHandoffModuleReason`, `ConsentHandoffProbeCode`) and the `./gateway-client-ip` entry (`GatewayClientIpPublicJwk`, `GatewayClientIpPrivateJwk`). (#6563)
|
|
11
|
+
- Changed: The root `AnalyticsQuerySchema` is now the internal API's analytics query schema, the one `AnalyticsQueryRequest` is inferred from; it was an unused dashboard schema of the same name. (#6563)
|
|
12
|
+
- Removed: Unused exports of the `./browser` entry: the old beacon worker, transport, circuit-breaker, retry, offline-queue and config types (`BeaconBatch`, `BatchEvent`, `BeaconIdentity`, `BeaconConfig`, `TransportConfig`, `TransportOptions`, `TransportResponse`, `TransportState`, `TransportMetrics`, `ConnectionType`, `NetworkInfo`, `MessagePriority`, `WorkerConfig`, `WorkerErrorType`, `WorkerAction`, `WorkerMessageType`, `WorkerMessage`, `WorkerState`, `WorkerHealthStatus`, `WorkerMetrics`, `WorkerError`, `WorkerCapabilities`, `WorkerTask`, `FallbackOptions`, `ResourceUsage`, `WorkerPoolConfig`, `BeaconWorkerMessageType`, `ProtocolVersion`, `BeaconWorkerMessage`, `CircuitBreakerConfig`, `CircuitBreakerState`, `RetryStrategy`, `OfflineQueueEntry`), their parsers and validators (`validateBeaconConfig`, `validateBeaconBatch`, `parseBeaconConfig`, the twelve `parse*` worker functions), `Guards`, `DEFAULT_CONFIG`, `ERROR_TYPES`, and `BrowserDetectionResult` with its alias `DetectionResult`, `AgentCategory`, `ConfidenceLevel` and `AgentInfo`.
|
|
13
|
+
`./browser` keeps the client-IP helpers and `validateBeaconEvent` with its event types; the beacon's own types stay in `./beacon-types`. (#6567)
|
|
14
|
+
- Added: `ERROR_CODES.FLY_CLEANUP_FAILED` (HTTP 502): a delete was refused because a managed agent's Fly machine could
|
|
15
|
+
not be stopped, so the row that tracks the machine was kept. `DELETE /api/v1/projects/{id}` can now answer it. (#6241)
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `kyaos/unsupported-carriage` (403) in the kya-http error registry (`KYA_HTTP_ERROR.UNSUPPORTED_CARRIAGE`, `KYA_HTTP_ERROR_STATUS` and `fixtures/kya-http/error-codes.json`): a delegation presented in a form the verifier does not accept. (#6544)
|
|
20
|
+
- `defaultRequiredScopes(toolName, entry)` and `executeScopeFor(toolName)` in `@kya-os/checkpoint-shared/tool-protection`: the scopes a tool entry is stored with when it has none of its own. The result is never empty, and the default is `<name>:execute` cut down to the scope-token alphabet, 200 characters at most. (#6552)
|
|
21
|
+
- `AGENT_CATALOG` (also `@kya-os/checkpoint-shared/agent-catalog`): the agents a policy can name, each with its id, label, vendor, tier and the names the detection engine reports for it, and the generated `src/data/generated/agent-catalog.json`. (#6583)
|
|
22
|
+
- `@kya-os/checkpoint-shared/browser-posture-proof-verifier`, the posture proof verifier on WebCrypto with no jose or zod dependency. `verifyBrowserPostureProofKey`, `browserPostureKeyThumbprint` and the constants are the same bindings from `./browser-posture-proof`. (#6542)
|
|
23
|
+
- `keyless` on `BeaconBatch` and `TransportOptions`, the `BeaconKeyless` type, and `beaconBodyIdentityWithKeyless`. (#6595)
|
|
24
|
+
- `BEACON_EDGE_CAPABILITIES`, `BEACON_EDGE_CAPABILITIES_HEADER`, `BEACON_EDGE_CAPABILITIES_VALUE`, `BeaconEdgeCapability` and `parseBeaconEdgeCapabilities`, the capability the Worker advertises to the origin. (#6595)
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- `TRANSACTION_FAILED`'s default message now ends "The project was not deleted." instead of "Nothing was
|
|
29
|
+
deleted.": a project's agents are removed before the project, so they can already be gone when the project delete
|
|
30
|
+
fails. (#6241)
|
|
31
|
+
- a posture proof with `=` padding in any segment, or `+`, `/` or whitespace in its payload or signature segment, is rejected as `bad-signature`; the previous jose build tolerated exact padding and those characters. Node callers: `./browser-posture-proof` now verifies through WebCrypto instead of jose's Node build, so a JWK the Node build accepted is now rejected as `malformed` or `bad-signature` when it has a `d` of `""`, `0`, `false` or `null`, a `key_ops` of `["sign"]`, `["sign","verify"]`, `"verify"`, `null`, `{}`, `[]` or `["encrypt"]`, or some `ext` or `use` values. A public key with `key_ops: ["verify"]` and `ext: true`, as the beacon exports it, still verifies. (#6542)
|
|
32
|
+
- `beaconBodyIdentity` ignores `keyless`. (#6595)
|
|
33
|
+
|
|
34
|
+
### Other merged changes
|
|
35
|
+
|
|
36
|
+
- feat(authz): send a merchant login as a urlencoded form when the provider asks (#6492)
|
|
37
|
+
- feat(admin): list accounts that finished setup with no detection (KYA-1193, part A) (#6522)
|
|
38
|
+
- fix(beacon): bind posture cnf to the key each batch carries (#6528)
|
|
39
|
+
- feat(beacon): self-certifying session ids (#6554)
|
|
40
|
+
- feat(shared): name default sign-in hosts, with nothing on main calling the names yet (F5-0) (#6655)
|
|
12
41
|
|
|
13
|
-
##
|
|
42
|
+
## 1.8.0 - 2026-10-21
|
|
43
|
+
|
|
44
|
+
### Breaking changes
|
|
45
|
+
|
|
46
|
+
- Removed: The legacy JSON policy evaluator, which nothing used: `evaluatePolicy` and its evaluation context and result (`PolicyEvaluationContextSchema`, `PolicyEvaluationContext`, `parseEvaluationContext`, `PolicyEvaluationResultSchema`, `PolicyEvaluationResult`, `PolicyMatchTypeSchema`, `PolicyMatchType`, `POLICY_MATCH_TYPES`).
|
|
47
|
+
Policy decisions come from the engine's Cedar evaluator in `@kya-os/checkpoint-wasm-runtime`; `matchPath` is unchanged. (#6410)
|
|
48
|
+
- Removed: `parsePolicyConfig`; use `safeParsePolicyConfig` or `PolicyConfigSchema`. (#6410)
|
|
49
|
+
- Removed: `StrictEnforcementActionSchema` and `isPassThroughAction`, which nothing used. (#6410)
|
|
50
|
+
- Removed: `pathHasUnnarrowedDenyRule`, `pathHasExplicitDenyRuleFor`, `isUnnarrowedDenyBlock` and `isForbidBlock`, which nothing used.
|
|
51
|
+
Use `analyzePolicySource(cedar)`, whose `humanHazard(path)` and `explicitDenyFor(path, probe)` answer the same questions, or `pathHasUnnarrowedDenyRuleFor(cedar, path, probe)`. (#6413)
|
|
52
|
+
- Removed: Unused legacy types and schemas: everything in the former `types/worker`, `types/transport`, `types/wasm` and `types/session` modules (the worker and transport types remain available from `@kya-os/checkpoint-shared/beacon-types` and `./browser`, which declare their own), the pixel event, install, analytics and session schemas, the fingerprint profile, rule and test-result schemas, three legacy fingerprint log types, the `WasmAgentTypeSchema` alias (use `AgentTypeSchema`), and `callbackSchema`. (#6421)
|
|
53
|
+
- Removed: Unused legacy types: the classification, database and MCP JSON-RPC type modules; the route context and handler types, `API_ERROR_CODES`, `HTTP_STATUS` and the request parameter types from the API types; the `Shared*Response` aliases with the response interfaces and `create*Response` helpers behind them (the root's `SuccessResponse`, `ErrorResponse`, `PaginatedResponse` and `ApiResponse` from the API contracts are unchanged); and unused auth, analytics, admin overview, agent classification, organization, Shopify, rules, entity and detection metadata exports. (#6429)
|
|
54
|
+
- Removed: Unused legacy API types: the v1 public API types (`PublicProject`, `PublicDetection`, `PublicAnalytics*`, `PublicApiResponse`, `PaginationResponse`, `PublicApiQueryParams`, `PublicApiHeaders`, their schemas and the `PublicPagination*` aliases), the signature verification request, response, key and cache types, the fingerprint detect request, enhanced response and validators with the `FingerprintClientDetection*` aliases, `EventStorageRecord`, and four bulk operation types.
|
|
55
|
+
`FingerprintRecord`, `FingerprintRecordSchema`, `BotPattern` and `BotPatternSchema` stay exported from the root, now as the `types/fingerprint` and `constants/bots` declarations. (#6444)
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
- The `API_ENDPOINT_RETIRED` error code (HTTP 410), for a route that no longer serves requests and names its replacement. (#6443)
|
|
60
|
+
- `PostureReportPathsSchema`, `readPostureReportPathsSetting` and the project setting `settings.postureReportPaths`, validated on project update. (#6434)
|
|
61
|
+
- `contextTag(secret, context)` on `@kya-os/checkpoint-shared/beacon-nonce`, the HMAC context tag the beacon ingest Worker stores with a posture answer. (#6516)
|
|
62
|
+
- `verifyBrowserPostureProofKey` verifies a posture proof against any key and one or several acceptable URLs and returns the key thumbprint or the reason it failed, and `browserPostureKeyThumbprint` computes a public key's thumbprint. `verifyBrowserPostureProof` behaves as before. (#6518)
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- `PolicyFetcher` reads the policy API's allow list of agent names as client-name entries. It rejected any project policy with a non-empty allow list, so the Express and Next.js middleware answered every request on such a project with a retryable 503. (#6464)
|
|
67
|
+
|
|
68
|
+
### Other merged changes
|
|
69
|
+
|
|
70
|
+
- chore(release): set checkpoint-shared package.json to 1.7.0 (#6278)
|
|
71
|
+
- fix(shared): accept the bot types the engine emits (#6291)
|
|
72
|
+
- perf(shared): move provider-registry values off the root entry (#6286)
|
|
73
|
+
- docs(shared): say what the typescript status-list verifier is still for (#6307)
|
|
74
|
+
- fix(wasm-runtime): keep the engine's ruleset hash in sdk detection reports (#6324)
|
|
75
|
+
- perf(sdk): load lean checkpoint-shared entries in express and next.js (#6306)
|
|
76
|
+
- fix(sdk): raise the node floor to the versions that can require an es module (#6293)
|
|
77
|
+
- feat(web): managed workers delegate to the org authorization service [kx-d2b] (#6318)
|
|
78
|
+
- fix(admin): classify native ios installations correctly (#6375)
|
|
79
|
+
- chore(shared): remove dead config, defaults, event and fetcher-factory exports (#6353)
|
|
80
|
+
- perf(gateway): keep the worker off the checkpoint-shared root entry (#6335)
|
|
81
|
+
- fix(beacon-ingest): keep a live posture token when a later answer is unavailable (#6397)
|
|
82
|
+
- fix(beacon-ingest): ack every legitimate resend of a batch as a duplicate (#6365)
|
|
83
|
+
- feat(authz): hash user ids that are not did:web path segments (#6414)
|
|
84
|
+
- fix(admin): count the platform page and /api/admin/metrics the way the overview does (#6409)
|
|
85
|
+
- feat(db): the pr 3 post-deploy contract (c1, c2, c3 and the reviewer fold) (#5919)
|
|
86
|
+
|
|
87
|
+
### org signing keys: `#key-N` kids; `deriveMcpiOrgKid` is removed (#5887)
|
|
88
|
+
|
|
89
|
+
- **Added:** `mcpiOrgKeyFragment(sequence)`, the verification-method fragment of an org's key number `sequence`
|
|
90
|
+
(`key-<sequence>`; throws `RangeError` unless `sequence` is a positive integer).
|
|
91
|
+
- **Added:** `isMcpiOrgKeyId(orgDid, kid)`: true when `kid` is `<orgDid>#key-<n>` with n ≥ 1. Verifiers pin a
|
|
92
|
+
credential's `kid` with it before resolving the issuer's DID document, then take the key from the method with
|
|
93
|
+
that id.
|
|
94
|
+
- **Removed:** `deriveMcpiOrgKid` removed; resolve the current kid from the org's did.json.
|
|
95
|
+
It hardcoded `<org did>#key-1`, but an org now rotates its signing key, and key N signs under
|
|
96
|
+
`<org did>#key-N`. An issuer takes the `kid` from its signer; a verifier takes it from the credential and
|
|
97
|
+
checks it with `isMcpiOrgKeyId`.
|
|
98
|
+
Shipped under a minor: the package has no external users.
|
|
99
|
+
|
|
100
|
+
### the CJS `./canonical-signer` and `./mcpi/status-list` entries load in plain Node (#5887)
|
|
101
|
+
|
|
102
|
+
- **Fixed:** `require('@kya-os/checkpoint-shared/canonical-signer')` threw `ERR_PACKAGE_PATH_NOT_EXPORTED` in plain
|
|
103
|
+
Node (1.6.0). Its CJS build left the ESM-only `canonicalize` 3 external, as a `require('canonicalize')` Node refuses;
|
|
104
|
+
the ESM import was unaffected. The `canonical-signer` and `mcpi/status-list` CJS entries now bundle `canonicalize`,
|
|
105
|
+
as the signals entry already does, so `require()` works in plain Node with no `--conditions=import`.
|
|
106
|
+
A test loads every CJS entry in the `exports` map with plain Node's `require`.
|
|
107
|
+
A patch: nothing in the API changes.
|
|
108
|
+
|
|
109
|
+
### authenticated observed client addresses (#6187)
|
|
110
|
+
|
|
111
|
+
`resolveObservedClientAddress` adds an explicit authenticated-ingress contract with typed observed/unavailable results. Express and Next adapters adopt this API. Proxy origins must verify their actual socket peer and exact forwarding chain; arbitrary Next proxy profiles return no address because NextRequest has no transport peer. Migrate those configurations using the [client-IP resolution runbook](https://github.com/Know-That-Ai/checkpoint/blob/main/docs/runbooks/client-ip-resolution.md). The `vercel` profile resolves only when the caller passes `vercelRuntime: true`; the resolver reads no environment, so the `./client-ip` lean entry keeps no Node globals.
|
|
112
|
+
|
|
113
|
+
`resolveClientIp` retains its existing three-field, platform-assumed compatibility contract. Existing gateway, web, WASM-runtime, and bouncer callers keep their previous behavior until each ingress migrates explicitly. Those legacy callers do not acquire N01 authentication guarantees from this release. Java and .NET continue using the legacy canonical fixtures.
|
|
114
|
+
|
|
115
|
+
## 1.7.0 - 2026-10-20
|
|
116
|
+
|
|
117
|
+
### Other merged changes
|
|
118
|
+
|
|
119
|
+
- chore(release): set shared 1.6.0, wasm-runtime 1.11.0 and checkpoint 1.4.0 (#6244)
|
|
120
|
+
- fix(shared): tighten the uuid pattern, scope device ids by the server rule (#6246)
|
|
121
|
+
- perf(shared): add lean zod-free entry points for request-path code (#6257)
|
|
122
|
+
- fix(shared): verify posture proofs and envelopes without a global buffer (#6266)
|
|
123
|
+
|
|
124
|
+
## 1.6.0 - 2026-10-19
|
|
125
|
+
|
|
126
|
+
### Other merged changes
|
|
127
|
+
|
|
128
|
+
- fix(pixel): normalize allowed domains on write and when matching (#5339)
|
|
129
|
+
- refactor(authz): lib/authz skeleton, ports and CI gates (PR 1·0) (#5853)
|
|
130
|
+
- chore(release): set checkpoint-shared package.json to 1.5.2 (#5873)
|
|
131
|
+
- fix(detection): classify zero-evidence requests as unknown instead of human (#5060)
|
|
132
|
+
- Revert "fix(detection): classify zero-evidence requests as unknown instead of human" (#5881)
|
|
133
|
+
- fix(fingerprint): harden the public routes and redact echoed credentials (#5908)
|
|
134
|
+
- fix(vault): make resolve assertions single use and verify every live agent key (#5888)
|
|
135
|
+
- feat(authz): org authorization service oauth surface (pr 1) (#5926)
|
|
136
|
+
- fix(dotnet): serve no protected resource metadata for a non-https issuer (#5983)
|
|
137
|
+
- fix(provisioning): verify installer account linking (#5711)
|
|
138
|
+
- fix(gateway): scope tool-call audit rows to the upstream's project (#4837)
|
|
139
|
+
- fix: fail closed on the delegation and posture trust boundary (#5652)
|
|
140
|
+
- feat(delegations): lifecycle panel, signed issuance receipt and merkle proof view (#5409)
|
|
141
|
+
- feat(admin): counted and excluded behind every admin number, with a drill-down (#6025)
|
|
142
|
+
- chore: remove artifacts and references from the repo (#6066)
|
|
143
|
+
- fix(review): revoke individual repository grants (#5726)
|
|
144
|
+
- fix(checkpoint-shared): check the approver allowlist before resolving its did (#6097)
|
|
145
|
+
- test(checkpoint-shared): gate test:unit on the 80% coverage thresholds (#6129)
|
|
146
|
+
- test(checkpoint-shared): run the suite on vitest 4, whose worker rpc has no 60 s timeout (#6128)
|
|
147
|
+
- perf(web): faster dashboard loads, activity paging and screen navigation, with a benchmark suite (#6193)
|
|
148
|
+
- fix(detection): separate proxy assertions from hosting (#6186)
|
|
149
|
+
- feat(beacon-ingest): publish replay posture through a durable posture queue (#6163)
|
|
150
|
+
- feat(authz): consent principal, sign-in methods and assurance (pr 2b) [kx-b] (#6164)
|
|
151
|
+
- fix(cli): approve pairing v2 on the claim page so the cli finishes on its own (#5720)
|
|
152
|
+
|
|
153
|
+
### zero-evidence requests and the `no_evidence` policy category (#5886)
|
|
14
154
|
|
|
15
155
|
The engine now sends a zero-evidence request as `IncompleteData` with `metadata.detection_basis = "no_evidence"`, and
|
|
16
156
|
composed policies see it as the category `no_evidence`. `withNoEvidenceExclusion(cedar)` is the serve-time rewrite that
|
|
@@ -84,7 +224,7 @@ visitors were counted as human before, including a visit that also sent a reques
|
|
|
84
224
|
counted in `totalRequests` and `humanSessions`; sessions whose incomplete data all comes from other reasons, such as
|
|
85
225
|
suspicious headers, are in no counter.
|
|
86
226
|
|
|
87
|
-
|
|
227
|
+
#### Security
|
|
88
228
|
|
|
89
229
|
`verifySignedApprovalQuorum` now checks a grant's `approverDid` against `quorum.approvers` before it resolves the
|
|
90
230
|
approver's key. Before, it resolved the request-supplied DID first and checked the allowlist after, so a did:web
|
|
@@ -93,6 +233,16 @@ before and the result is unchanged (`quorum_not_met:k/n`); it just never reaches
|
|
|
93
233
|
`verifyApprovalGrant` on its own still resolves whatever DID it is given, so a caller with an allowlist must check it
|
|
94
234
|
first.
|
|
95
235
|
|
|
236
|
+
### `CheckpointEvents` moves here; `AGENTSHIELD_WASM_PATH` is removed (#6084)
|
|
237
|
+
|
|
238
|
+
- **Added:** `CheckpointEvents`, the event-handler map the Checkpoint SDKs accept, moved from `@kya-os/checkpoint`.
|
|
239
|
+
`@kya-os/checkpoint-nextjs` types its `events` option with it, so it no longer depends on `@kya-os/checkpoint`.
|
|
240
|
+
- **Removed:** `DEFAULT_ENV_VARS.AGENTSHIELD_WASM_PATH`, the path to the retired `agentshield_wasm` binary.
|
|
241
|
+
Nothing reads it.
|
|
242
|
+
Shipped under a minor because nothing consumes it yet.
|
|
243
|
+
|
|
244
|
+
RELEASE ORDER: publish this first; the `@kya-os/checkpoint-nextjs` release that drops `@kya-os/checkpoint` needs `CheckpointEvents`.
|
|
245
|
+
|
|
96
246
|
## 1.5.2
|
|
97
247
|
|
|
98
248
|
### Changed
|
package/README.md
CHANGED
|
@@ -22,6 +22,30 @@ This package provides:
|
|
|
22
22
|
- **API Types**: Request/response schemas for API communication
|
|
23
23
|
- **Event Types**: Behavioral and real-time event definitions
|
|
24
24
|
|
|
25
|
+
## Resolve authenticated observed addresses
|
|
26
|
+
|
|
27
|
+
New ingress integrations use `resolveObservedClientAddress`. Supply the real transport peer and the deployment's actual peer verifier before accepting a proxy header:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { resolveObservedClientAddress } from '@kya-os/checkpoint-shared';
|
|
31
|
+
|
|
32
|
+
const observation = resolveObservedClientAddress({
|
|
33
|
+
headers: req.headers,
|
|
34
|
+
directAddress: req.socket.remoteAddress,
|
|
35
|
+
policy: {
|
|
36
|
+
platform: 'trusted-proxy',
|
|
37
|
+
trustedHops: 0,
|
|
38
|
+
isTrustedPeer: (peer) => peer === '192.0.2.10',
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The `vercel` profile resolves only when the caller passes `vercelRuntime: true` after confirming it runs inside Vercel's managed `VERCEL=1` runtime. The resolver reads no environment variables itself, so it stays safe on edge runtimes.
|
|
44
|
+
|
|
45
|
+
Replace the documentation address with your configured proxy allowlist. `observedClientAddress` and its `ip` compatibility alias are null when authentication or parsing fails. Check `status` and `reason`; do not substitute an untrusted header.
|
|
46
|
+
|
|
47
|
+
`resolveClientIp` remains the legacy platform-assumed API with its original three-field result. Existing gateway, web, WASM, and bouncer consumers retain their behavior until migrated explicitly. That compatibility API does not authenticate the nearest peer and does not provide the new N01 guarantees. See the [client-IP resolution runbook](https://github.com/Know-That-Ai/checkpoint/blob/main/docs/runbooks/client-ip-resolution.md) for supported SDK boundaries and migration guidance.
|
|
48
|
+
|
|
25
49
|
## Usage
|
|
26
50
|
|
|
27
51
|
### Import Types
|
|
@@ -30,7 +54,6 @@ This package provides:
|
|
|
30
54
|
import {
|
|
31
55
|
DetectionInput,
|
|
32
56
|
DetectionResult,
|
|
33
|
-
AgentShieldConfig,
|
|
34
57
|
AgentType,
|
|
35
58
|
ConfidenceLevel,
|
|
36
59
|
} from '@kya-os/checkpoint-shared';
|
|
@@ -73,12 +96,6 @@ const openAIPattern = KNOWN_AGENT_PATTERNS.find((p) => p.type === 'openai');
|
|
|
73
96
|
- `AgentInfo` - Information about detected agents
|
|
74
97
|
- `ConfidenceLevel` - Confidence levels (low, medium, high, very_high)
|
|
75
98
|
|
|
76
|
-
### Configuration Types
|
|
77
|
-
|
|
78
|
-
- `AgentShieldConfig` - Main configuration object
|
|
79
|
-
- `ExpressMiddlewareOptions` - Express.js middleware configuration
|
|
80
|
-
- `NextMiddlewareOptions` - Next.js middleware configuration
|
|
81
|
-
|
|
82
99
|
### Event Types
|
|
83
100
|
|
|
84
101
|
- `BehavioralData` - Mouse, keyboard, scroll events
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/agent-catalog.d.ts
|
|
2
|
+
export type AgentCatalogTier = 'assistant' | 'search' | 'crawler';
|
|
3
|
+
export interface AgentCatalogEntry {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly vendor: string;
|
|
7
|
+
readonly tier: AgentCatalogTier;
|
|
8
|
+
readonly engineNames: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export declare const AGENT_CATALOG: readonly AgentCatalogEntry[];
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=agent-catalog.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-catalog.d.mts","names":[],"sources":["../src/agent-catalog.ts"],"mappings":";YAgBY;iBAGK;WAEN;WAEA;WAEA;WACA,MAAM;WAON;;qBAGE,wBAAwB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/agent-catalog.d.ts
|
|
2
|
+
export type AgentCatalogTier = 'assistant' | 'search' | 'crawler';
|
|
3
|
+
export interface AgentCatalogEntry {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly vendor: string;
|
|
7
|
+
readonly tier: AgentCatalogTier;
|
|
8
|
+
readonly engineNames: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export declare const AGENT_CATALOG: readonly AgentCatalogEntry[];
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=agent-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-catalog.d.ts","names":[],"sources":["../src/agent-catalog.ts"],"mappings":";YAgBY;iBAGK;WAEN;WAEA;WAEA;WACA,MAAM;WAON;;qBAGE,wBAAwB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
//#region src/agent-catalog.ts
|
|
3
|
+
const AGENT_CATALOG = [
|
|
4
|
+
{
|
|
5
|
+
id: "claude",
|
|
6
|
+
label: "Claude",
|
|
7
|
+
vendor: "Anthropic",
|
|
8
|
+
tier: "assistant",
|
|
9
|
+
engineNames: ["Claude"]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "claudebot",
|
|
13
|
+
label: "ClaudeBot",
|
|
14
|
+
vendor: "Anthropic",
|
|
15
|
+
tier: "crawler",
|
|
16
|
+
engineNames: ["ClaudeBot"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "anthropic-ai",
|
|
20
|
+
label: "Anthropic AI",
|
|
21
|
+
vendor: "Anthropic",
|
|
22
|
+
tier: "crawler",
|
|
23
|
+
engineNames: ["Anthropic-AI Crawler"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "chatgpt",
|
|
27
|
+
label: "ChatGPT",
|
|
28
|
+
vendor: "OpenAI",
|
|
29
|
+
tier: "assistant",
|
|
30
|
+
engineNames: ["ChatGPT"]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "gptbot",
|
|
34
|
+
label: "GPTBot",
|
|
35
|
+
vendor: "OpenAI",
|
|
36
|
+
tier: "crawler",
|
|
37
|
+
engineNames: ["GPTBot"]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "googlebot",
|
|
41
|
+
label: "Googlebot",
|
|
42
|
+
vendor: "Google",
|
|
43
|
+
tier: "search",
|
|
44
|
+
engineNames: ["Googlebot"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "gemini",
|
|
48
|
+
label: "Gemini",
|
|
49
|
+
vendor: "Google",
|
|
50
|
+
tier: "assistant",
|
|
51
|
+
engineNames: ["Google Gemini"]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "perplexitybot",
|
|
55
|
+
label: "PerplexityBot",
|
|
56
|
+
vendor: "Perplexity",
|
|
57
|
+
tier: "search",
|
|
58
|
+
engineNames: ["PerplexityBot"]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "meta-externalagent",
|
|
62
|
+
label: "Meta AI",
|
|
63
|
+
vendor: "Meta",
|
|
64
|
+
tier: "crawler",
|
|
65
|
+
engineNames: ["Meta-ExternalAgent"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "meta-muse",
|
|
69
|
+
label: "Meta Muse",
|
|
70
|
+
vendor: "Meta",
|
|
71
|
+
tier: "assistant",
|
|
72
|
+
engineNames: ["Meta Muse"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "bytespider",
|
|
76
|
+
label: "ByteSpider",
|
|
77
|
+
vendor: "ByteDance",
|
|
78
|
+
tier: "crawler",
|
|
79
|
+
engineNames: ["Bytedance Crawler"]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "ccbot",
|
|
83
|
+
label: "CCBot",
|
|
84
|
+
vendor: "Common Crawl",
|
|
85
|
+
tier: "crawler",
|
|
86
|
+
engineNames: ["Common Crawl"]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "amazonbot",
|
|
90
|
+
label: "Amazonbot",
|
|
91
|
+
vendor: "Amazon",
|
|
92
|
+
tier: "crawler",
|
|
93
|
+
engineNames: ["Amazonbot"]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "cohere-ai",
|
|
97
|
+
label: "Cohere AI",
|
|
98
|
+
vendor: "Cohere",
|
|
99
|
+
tier: "crawler",
|
|
100
|
+
engineNames: ["CohereBot"]
|
|
101
|
+
}
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
exports.AGENT_CATALOG = AGENT_CATALOG;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
//#region src/agent-catalog.ts
|
|
2
|
+
const AGENT_CATALOG = [
|
|
3
|
+
{
|
|
4
|
+
id: "claude",
|
|
5
|
+
label: "Claude",
|
|
6
|
+
vendor: "Anthropic",
|
|
7
|
+
tier: "assistant",
|
|
8
|
+
engineNames: ["Claude"]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "claudebot",
|
|
12
|
+
label: "ClaudeBot",
|
|
13
|
+
vendor: "Anthropic",
|
|
14
|
+
tier: "crawler",
|
|
15
|
+
engineNames: ["ClaudeBot"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "anthropic-ai",
|
|
19
|
+
label: "Anthropic AI",
|
|
20
|
+
vendor: "Anthropic",
|
|
21
|
+
tier: "crawler",
|
|
22
|
+
engineNames: ["Anthropic-AI Crawler"]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "chatgpt",
|
|
26
|
+
label: "ChatGPT",
|
|
27
|
+
vendor: "OpenAI",
|
|
28
|
+
tier: "assistant",
|
|
29
|
+
engineNames: ["ChatGPT"]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "gptbot",
|
|
33
|
+
label: "GPTBot",
|
|
34
|
+
vendor: "OpenAI",
|
|
35
|
+
tier: "crawler",
|
|
36
|
+
engineNames: ["GPTBot"]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "googlebot",
|
|
40
|
+
label: "Googlebot",
|
|
41
|
+
vendor: "Google",
|
|
42
|
+
tier: "search",
|
|
43
|
+
engineNames: ["Googlebot"]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "gemini",
|
|
47
|
+
label: "Gemini",
|
|
48
|
+
vendor: "Google",
|
|
49
|
+
tier: "assistant",
|
|
50
|
+
engineNames: ["Google Gemini"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "perplexitybot",
|
|
54
|
+
label: "PerplexityBot",
|
|
55
|
+
vendor: "Perplexity",
|
|
56
|
+
tier: "search",
|
|
57
|
+
engineNames: ["PerplexityBot"]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "meta-externalagent",
|
|
61
|
+
label: "Meta AI",
|
|
62
|
+
vendor: "Meta",
|
|
63
|
+
tier: "crawler",
|
|
64
|
+
engineNames: ["Meta-ExternalAgent"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "meta-muse",
|
|
68
|
+
label: "Meta Muse",
|
|
69
|
+
vendor: "Meta",
|
|
70
|
+
tier: "assistant",
|
|
71
|
+
engineNames: ["Meta Muse"]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "bytespider",
|
|
75
|
+
label: "ByteSpider",
|
|
76
|
+
vendor: "ByteDance",
|
|
77
|
+
tier: "crawler",
|
|
78
|
+
engineNames: ["Bytedance Crawler"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "ccbot",
|
|
82
|
+
label: "CCBot",
|
|
83
|
+
vendor: "Common Crawl",
|
|
84
|
+
tier: "crawler",
|
|
85
|
+
engineNames: ["Common Crawl"]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "amazonbot",
|
|
89
|
+
label: "Amazonbot",
|
|
90
|
+
vendor: "Amazon",
|
|
91
|
+
tier: "crawler",
|
|
92
|
+
engineNames: ["Amazonbot"]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "cohere-ai",
|
|
96
|
+
label: "Cohere AI",
|
|
97
|
+
vendor: "Cohere",
|
|
98
|
+
tier: "crawler",
|
|
99
|
+
engineNames: ["CohereBot"]
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
export { AGENT_CATALOG };
|
|
105
|
+
//# sourceMappingURL=agent-catalog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-catalog.mjs","names":[],"sources":["../src/agent-catalog.ts"],"sourcesContent":["/**\n * The agent catalog: every agent a policy can name, with the names the\n * detection engine reports for it.\n *\n * A policy names an agent by its `id`. The engine reports a detected agent\n * by name, and that name is one of the entry's `engineNames`: a Tier 3\n * pattern name, from `data/generated/known-agent-patterns.json` or the\n * engine's non-AI pattern table. The catalog is the one place that ties the\n * two together, for the dashboard and, through\n * `data/generated/agent-catalog.json`, for the engine build. Regenerate that\n * file with `pnpm --filter @kya-os/checkpoint-shared build:agent-catalog`;\n * `src/__tests__/agent-catalog.test.ts` fails when it is stale, and when an\n * engine name is not one the engine reports.\n */\n\n/** How the dashboard groups an agent. */\nexport type AgentCatalogTier = 'assistant' | 'search' | 'crawler';\n\n/** One agent a policy can name. */\nexport interface AgentCatalogEntry {\n /** Stable id a policy names the agent by. Never renamed: stored policies hold it. */\n readonly id: string;\n /** Display label. */\n readonly label: string;\n /** The company behind the agent. */\n readonly vendor: string;\n readonly tier: AgentCatalogTier;\n /**\n * The names the engine reports for this agent. Exactly one for now: the\n * dashboard and compiled policies match on the first name only, so a\n * second would be ignored (`src/__tests__/agent-catalog.test.ts` holds the\n * line until they match any of them).\n */\n readonly engineNames: readonly string[];\n}\n\nexport const AGENT_CATALOG: readonly AgentCatalogEntry[] = [\n // The engine reports every Claude surface (desktop, code, API, web) as\n // \"Claude\"; only the crawler has a name of its own.\n {\n id: 'claude',\n label: 'Claude',\n vendor: 'Anthropic',\n tier: 'assistant',\n engineNames: ['Claude'],\n },\n {\n id: 'claudebot',\n label: 'ClaudeBot',\n vendor: 'Anthropic',\n tier: 'crawler',\n engineNames: ['ClaudeBot'],\n },\n {\n id: 'anthropic-ai',\n label: 'Anthropic AI',\n vendor: 'Anthropic',\n tier: 'crawler',\n engineNames: ['Anthropic-AI Crawler'],\n },\n // The engine reports the browsing assistant, ChatGPT-User and\n // OAI-SearchBot as \"ChatGPT\", verified or not.\n {\n id: 'chatgpt',\n label: 'ChatGPT',\n vendor: 'OpenAI',\n tier: 'assistant',\n engineNames: ['ChatGPT'],\n },\n { id: 'gptbot', label: 'GPTBot', vendor: 'OpenAI', tier: 'crawler', engineNames: ['GPTBot'] },\n {\n id: 'googlebot',\n label: 'Googlebot',\n vendor: 'Google',\n tier: 'search',\n engineNames: ['Googlebot'],\n },\n {\n id: 'gemini',\n label: 'Gemini',\n vendor: 'Google',\n tier: 'assistant',\n engineNames: ['Google Gemini'],\n },\n {\n id: 'perplexitybot',\n label: 'PerplexityBot',\n vendor: 'Perplexity',\n tier: 'search',\n engineNames: ['PerplexityBot'],\n },\n {\n id: 'meta-externalagent',\n label: 'Meta AI',\n vendor: 'Meta',\n tier: 'crawler',\n engineNames: ['Meta-ExternalAgent'],\n },\n {\n id: 'meta-muse',\n label: 'Meta Muse',\n vendor: 'Meta',\n tier: 'assistant',\n engineNames: ['Meta Muse'],\n },\n {\n id: 'bytespider',\n label: 'ByteSpider',\n vendor: 'ByteDance',\n tier: 'crawler',\n engineNames: ['Bytedance Crawler'],\n },\n {\n id: 'ccbot',\n label: 'CCBot',\n vendor: 'Common Crawl',\n tier: 'crawler',\n engineNames: ['Common Crawl'],\n },\n {\n id: 'amazonbot',\n label: 'Amazonbot',\n vendor: 'Amazon',\n tier: 'crawler',\n engineNames: ['Amazonbot'],\n },\n {\n id: 'cohere-ai',\n label: 'Cohere AI',\n vendor: 'Cohere',\n tier: 'crawler',\n engineNames: ['CohereBot'],\n },\n];\n"],"mappings":";AAoCA,MAAa,gBAA8C;CAGzD;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,QAAQ;CACxB;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,WAAW;CAC3B;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,sBAAsB;CACtC;CAGA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,SAAS;CACzB;CACA;EAAE,IAAI;EAAU,OAAO;EAAU,QAAQ;EAAU,MAAM;EAAW,aAAa,CAAC,QAAQ;CAAE;CAC5F;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,WAAW;CAC3B;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,eAAe;CAC/B;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,eAAe;CAC/B;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,oBAAoB;CACpC;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,WAAW;CAC3B;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,mBAAmB;CACnC;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,cAAc;CAC9B;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,WAAW;CAC3B;CACA;EACE,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa,CAAC,WAAW;CAC3B;AACF"}
|
|
@@ -22,6 +22,7 @@ export declare function beaconNonceContext(client: {
|
|
|
22
22
|
ip?: string;
|
|
23
23
|
userAgent?: string;
|
|
24
24
|
}): string;
|
|
25
|
+
export declare function contextTag(secret: string, context: string): Promise<string>;
|
|
25
26
|
export declare function isSignedBeaconNonce(nonce: string | undefined): nonce is string;
|
|
26
27
|
export declare function issueSignedBeaconNonce(secret: string, binding: BeaconNonceBinding, issuedAtMs: number): Promise<string>;
|
|
27
28
|
export declare function verifySignedBeaconNonce(secret: string | undefined, binding: BeaconNonceBinding, nonce: string | undefined, nowMs: number): Promise<BeaconNonceVerification>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/beacon-nonce/index.ts"],"mappings":";qBA4Da,uBAAqB;qBAGrB;qBAEA;qBAEA;YAED;YAEA;EACN;;EACA;EAAmB;;EAEnB;EACA;;iBAGW;EACf;EACA;EAEA;;wBA2Cc,mBAAmB;EAAU;EAAa;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/beacon-nonce/index.ts"],"mappings":";qBA4Da,uBAAqB;qBAGrB;qBAEA;qBAEA;YAED;YAEA;EACN;;EACA;EAAmB;;EAEnB;EACA;;iBAGW;EACf;EACA;EAEA;;wBA2Cc,mBAAmB;EAAU;EAAa;;wBA4FpC,WAAW,gBAAgB,kBAAkB;wBAiBnD,oBAAoB,4BAA4B;wBAS1C,uBACpB,gBACA,SAAS,oBACT,qBACC;wBAkBmB,wBACpB,4BACA,SAAS,oBACT,2BACA,gBACC,QAAQ;wBA+DW,kBAAkB,gBAAgB,oBAAoB;qBAS/D,2BAAyB;wBAGtB,kBAAkB;EAAgB;EAAe;;wBAS3C,sBACpB,4BACA,mBACA,iBACC"}
|
|
@@ -22,6 +22,7 @@ export declare function beaconNonceContext(client: {
|
|
|
22
22
|
ip?: string;
|
|
23
23
|
userAgent?: string;
|
|
24
24
|
}): string;
|
|
25
|
+
export declare function contextTag(secret: string, context: string): Promise<string>;
|
|
25
26
|
export declare function isSignedBeaconNonce(nonce: string | undefined): nonce is string;
|
|
26
27
|
export declare function issueSignedBeaconNonce(secret: string, binding: BeaconNonceBinding, issuedAtMs: number): Promise<string>;
|
|
27
28
|
export declare function verifySignedBeaconNonce(secret: string | undefined, binding: BeaconNonceBinding, nonce: string | undefined, nowMs: number): Promise<BeaconNonceVerification>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/beacon-nonce/index.ts"],"mappings":";qBA4Da,uBAAqB;qBAGrB;qBAEA;qBAEA;YAED;YAEA;EACN;;EACA;EAAmB;;EAEnB;EACA;;iBAGW;EACf;EACA;EAEA;;wBA2Cc,mBAAmB;EAAU;EAAa;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/beacon-nonce/index.ts"],"mappings":";qBA4Da,uBAAqB;qBAGrB;qBAEA;qBAEA;YAED;YAEA;EACN;;EACA;EAAmB;;EAEnB;EACA;;iBAGW;EACf;EACA;EAEA;;wBA2Cc,mBAAmB;EAAU;EAAa;;wBA4FpC,WAAW,gBAAgB,kBAAkB;wBAiBnD,oBAAoB,4BAA4B;wBAS1C,uBACpB,gBACA,SAAS,oBACT,qBACC;wBAkBmB,wBACpB,4BACA,SAAS,oBACT,2BACA,gBACC,QAAQ;wBA+DW,kBAAkB,gBAAgB,oBAAoB;qBAS/D,2BAAyB;wBAGtB,kBAAkB;EAAgB;EAAe;;wBAS3C,sBACpB,4BACA,mBACA,iBACC"}
|
|
@@ -155,7 +155,7 @@ async function mac(secret, binding, issuedAt, random) {
|
|
|
155
155
|
const signature = await crypto.subtle.sign("HMAC", await hmacKey(secret), input);
|
|
156
156
|
return base64url(new Uint8Array(signature, 0, MAC_BYTES));
|
|
157
157
|
}
|
|
158
|
-
async function
|
|
158
|
+
async function nonceContextTag(secret, binding, issuedAt, random) {
|
|
159
159
|
const input = canonical([
|
|
160
160
|
CONTEXT_INPUT_PREFIX,
|
|
161
161
|
binding.projectId,
|
|
@@ -167,6 +167,11 @@ async function contextTag(secret, binding, issuedAt, random) {
|
|
|
167
167
|
const signature = await crypto.subtle.sign("HMAC", await hmacKey(secret), input);
|
|
168
168
|
return base64url(new Uint8Array(signature, 0, CONTEXT_TAG_BYTES));
|
|
169
169
|
}
|
|
170
|
+
const POSTURE_CONTEXT_TAG_PREFIX = "checkpoint-beacon-posture-context:v1\0";
|
|
171
|
+
async function contextTag(secret, context) {
|
|
172
|
+
const signature = await crypto.subtle.sign("HMAC", await hmacKey(secret), encoder.encode(`${POSTURE_CONTEXT_TAG_PREFIX}${context}`));
|
|
173
|
+
return base64url(new Uint8Array(signature));
|
|
174
|
+
}
|
|
170
175
|
function constantTimeEqual(left, right) {
|
|
171
176
|
if (left.length !== right.length) return false;
|
|
172
177
|
let diff = 0;
|
|
@@ -191,7 +196,7 @@ async function issueSignedBeaconNonce(secret, binding, issuedAtMs) {
|
|
|
191
196
|
issuedAt,
|
|
192
197
|
random,
|
|
193
198
|
await mac(secret, binding, issuedAt, random),
|
|
194
|
-
await
|
|
199
|
+
await nonceContextTag(secret, binding, issuedAt, random)
|
|
195
200
|
].join(".");
|
|
196
201
|
}
|
|
197
202
|
/**
|
|
@@ -236,7 +241,7 @@ async function verifySignedBeaconNonce(secret, binding, nonce, nowMs) {
|
|
|
236
241
|
verdict: "unverified",
|
|
237
242
|
reason: "expired"
|
|
238
243
|
};
|
|
239
|
-
if (!constantTimeEqual(providedContextTag, await
|
|
244
|
+
if (!constantTimeEqual(providedContextTag, await nonceContextTag(secret, binding, issuedAt, random))) return {
|
|
240
245
|
verdict: "unverified",
|
|
241
246
|
reason: "context"
|
|
242
247
|
};
|
|
@@ -297,6 +302,7 @@ exports.BEACON_NONCE_TTL_SECONDS = BEACON_NONCE_TTL_SECONDS;
|
|
|
297
302
|
exports.HANDOFF_TOKEN_PATTERN = HANDOFF_TOKEN_PATTERN;
|
|
298
303
|
exports.HANDOFF_USER_HASH_PATTERN = HANDOFF_USER_HASH_PATTERN;
|
|
299
304
|
exports.beaconNonceContext = beaconNonceContext;
|
|
305
|
+
exports.contextTag = contextTag;
|
|
300
306
|
exports.handoffTokenAuthentic = handoffTokenAuthentic;
|
|
301
307
|
exports.isSignedBeaconNonce = isSignedBeaconNonce;
|
|
302
308
|
exports.issueHandoffToken = issueHandoffToken;
|
|
@@ -154,7 +154,7 @@ async function mac(secret, binding, issuedAt, random) {
|
|
|
154
154
|
const signature = await crypto.subtle.sign("HMAC", await hmacKey(secret), input);
|
|
155
155
|
return base64url(new Uint8Array(signature, 0, MAC_BYTES));
|
|
156
156
|
}
|
|
157
|
-
async function
|
|
157
|
+
async function nonceContextTag(secret, binding, issuedAt, random) {
|
|
158
158
|
const input = canonical([
|
|
159
159
|
CONTEXT_INPUT_PREFIX,
|
|
160
160
|
binding.projectId,
|
|
@@ -166,6 +166,11 @@ async function contextTag(secret, binding, issuedAt, random) {
|
|
|
166
166
|
const signature = await crypto.subtle.sign("HMAC", await hmacKey(secret), input);
|
|
167
167
|
return base64url(new Uint8Array(signature, 0, CONTEXT_TAG_BYTES));
|
|
168
168
|
}
|
|
169
|
+
const POSTURE_CONTEXT_TAG_PREFIX = "checkpoint-beacon-posture-context:v1\0";
|
|
170
|
+
async function contextTag(secret, context) {
|
|
171
|
+
const signature = await crypto.subtle.sign("HMAC", await hmacKey(secret), encoder.encode(`${POSTURE_CONTEXT_TAG_PREFIX}${context}`));
|
|
172
|
+
return base64url(new Uint8Array(signature));
|
|
173
|
+
}
|
|
169
174
|
function constantTimeEqual(left, right) {
|
|
170
175
|
if (left.length !== right.length) return false;
|
|
171
176
|
let diff = 0;
|
|
@@ -190,7 +195,7 @@ async function issueSignedBeaconNonce(secret, binding, issuedAtMs) {
|
|
|
190
195
|
issuedAt,
|
|
191
196
|
random,
|
|
192
197
|
await mac(secret, binding, issuedAt, random),
|
|
193
|
-
await
|
|
198
|
+
await nonceContextTag(secret, binding, issuedAt, random)
|
|
194
199
|
].join(".");
|
|
195
200
|
}
|
|
196
201
|
/**
|
|
@@ -235,7 +240,7 @@ async function verifySignedBeaconNonce(secret, binding, nonce, nowMs) {
|
|
|
235
240
|
verdict: "unverified",
|
|
236
241
|
reason: "expired"
|
|
237
242
|
};
|
|
238
|
-
if (!constantTimeEqual(providedContextTag, await
|
|
243
|
+
if (!constantTimeEqual(providedContextTag, await nonceContextTag(secret, binding, issuedAt, random))) return {
|
|
239
244
|
verdict: "unverified",
|
|
240
245
|
reason: "context"
|
|
241
246
|
};
|
|
@@ -290,5 +295,5 @@ async function handoffTokenAuthentic(secrets, projectId, token) {
|
|
|
290
295
|
}
|
|
291
296
|
|
|
292
297
|
//#endregion
|
|
293
|
-
export { BEACON_NONCE_CLOCK_SKEW_SECONDS, BEACON_NONCE_MAX_LENGTH, BEACON_NONCE_TTL_SECONDS, HANDOFF_TOKEN_PATTERN, HANDOFF_USER_HASH_PATTERN, beaconNonceContext, handoffTokenAuthentic, isSignedBeaconNonce, issueHandoffToken, issueSignedBeaconNonce, splitHandoffToken, verifySignedBeaconNonce };
|
|
298
|
+
export { BEACON_NONCE_CLOCK_SKEW_SECONDS, BEACON_NONCE_MAX_LENGTH, BEACON_NONCE_TTL_SECONDS, HANDOFF_TOKEN_PATTERN, HANDOFF_USER_HASH_PATTERN, beaconNonceContext, contextTag, handoffTokenAuthentic, isSignedBeaconNonce, issueHandoffToken, issueSignedBeaconNonce, splitHandoffToken, verifySignedBeaconNonce };
|
|
294
299
|
//# sourceMappingURL=index.mjs.map
|