@kya-os/checkpoint-shared 1.6.0 → 1.8.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 +122 -9
- package/README.md +24 -7
- 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 +23 -1
- package/dist/beacon-types/index.d.mts.map +1 -1
- package/dist/beacon-types/index.d.ts +23 -1
- package/dist/beacon-types/index.d.ts.map +1 -1
- package/dist/beacon-types/index.js +49 -4
- package/dist/beacon-types/index.mjs +47 -4
- package/dist/beacon-types/index.mjs.map +1 -1
- package/dist/{browser-posture-BuChqmH5.d.mts → browser-posture-5fPrsxx7.d.mts} +2 -2
- package/dist/{browser-posture-BuChqmH5.d.mts.map → browser-posture-5fPrsxx7.d.mts.map} +1 -1
- package/dist/{browser-posture-DIaVLuW3.d.ts → browser-posture-CCR1kh5e.d.ts} +2 -2
- package/dist/{browser-posture-DIaVLuW3.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.d.mts +16 -2
- package/dist/browser-posture-proof.d.mts.map +1 -1
- package/dist/browser-posture-proof.d.ts +16 -2
- package/dist/browser-posture-proof.d.ts.map +1 -1
- package/dist/browser-posture-proof.js +114 -17
- package/dist/browser-posture-proof.mjs +112 -17
- 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 -4
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +25 -4
- 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.d.mts.map +1 -1
- package/dist/canonical-signer/index.d.ts.map +1 -1
- package/dist/canonical-signer/index.js +116 -79
- package/dist/canonical-signer/index.mjs +117 -52
- 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 -0
- package/dist/client-ip.d.ts +2 -0
- package/dist/client-ip.js +8 -0
- package/dist/client-ip.mjs +3 -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 +5 -0
- package/dist/errors/index.d.mts.map +1 -1
- package/dist/errors/index.d.ts +5 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +23 -4
- package/dist/errors/index.mjs +23 -4
- 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-CivUCbhL.d.ts +44 -0
- package/dist/fetcher-CivUCbhL.d.ts.map +1 -0
- package/dist/fetcher-cXQsbm6s.d.mts +44 -0
- package/dist/fetcher-cXQsbm6s.d.mts.map +1 -0
- package/dist/gateway-client-ip.d.mts +1 -1
- package/dist/gateway-client-ip.d.ts +1 -1
- package/dist/gateway-client-ip.js +2 -2
- package/dist/gateway-client-ip.mjs +2 -2
- package/dist/host-adapter/index.d.mts +2 -0
- package/dist/host-adapter/index.d.ts +2 -0
- package/dist/host-adapter/index.js +24 -0
- package/dist/host-adapter/index.mjs +3 -0
- package/dist/host-adapter-0F8EpbD6.js +753 -0
- package/dist/host-adapter-DHyISsIf.mjs +593 -0
- package/dist/host-adapter-DHyISsIf.mjs.map +1 -0
- package/dist/index-B3cHxr3O.d.mts +156 -0
- package/dist/index-B3cHxr3O.d.mts.map +1 -0
- package/dist/index-CXbOY7gB.d.ts +156 -0
- package/dist/index-CXbOY7gB.d.ts.map +1 -0
- package/dist/index.d.mts +6997 -12170
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +6997 -12170
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2510 -8893
- package/dist/index.mjs +2366 -8534
- package/dist/index.mjs.map +1 -1
- package/dist/kya-http-error-codes-7ewV5RuK.d.mts +29 -0
- package/dist/kya-http-error-codes-7ewV5RuK.d.mts.map +1 -0
- package/dist/kya-http-error-codes-7ewV5RuK.d.ts +29 -0
- package/dist/kya-http-error-codes-7ewV5RuK.d.ts.map +1 -0
- package/dist/kya-http-error-codes-C2JiWPsi.mjs +73 -0
- package/dist/kya-http-error-codes-C2JiWPsi.mjs.map +1 -0
- package/dist/kya-http-error-codes-UYb1zpGM.js +83 -0
- package/dist/kya-http.d.mts +3 -0
- package/dist/kya-http.d.ts +3 -0
- package/dist/kya-http.js +19 -0
- package/dist/kya-http.mjs +5 -0
- 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/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-B2r7M9wR.js +243 -0
- package/dist/patterns-B7dQoeE3.mjs +173 -0
- package/dist/patterns-B7dQoeE3.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.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 -0
- package/dist/policy/enforcement.d.ts +3 -0
- package/dist/policy/enforcement.js +21 -0
- package/dist/policy/enforcement.mjs +4 -0
- 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-Pn-ii-Pp.mjs → posture-origins-Ci6k4Zh1.js} +24 -173
- package/dist/{posture-origins-LFkX80oF.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-26hNxp6t.mjs +151 -0
- 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-DVGTSH0L.js +185 -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-02CI7jgm.d.mts +535 -0
- package/dist/schemas-02CI7jgm.d.mts.map +1 -0
- package/dist/{schemas-YhagYDx_.js → schemas-BlScS1it.js} +0 -20
- package/dist/schemas-C_3C72SR.d.ts +535 -0
- package/dist/schemas-C_3C72SR.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/step-up-BK0oBi11.mjs +1563 -0
- package/dist/step-up-BK0oBi11.mjs.map +1 -0
- package/dist/step-up-Bp8RAQwv.js +1759 -0
- package/dist/step-up-Bz12gYKT.d.mts +130 -0
- package/dist/step-up-Bz12gYKT.d.mts.map +1 -0
- package/dist/step-up-Bz12gYKT.d.ts +130 -0
- 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/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/reviewer-grant-revocation.v1.json +53 -81
- package/package.json +59 -2
- package/dist/client-ip-B2Xeo-GK.mjs.map +0 -1
- package/dist/posture-origins-Pn-ii-Pp.mjs.map +0 -1
- package/dist/schemas-7qodsG-Z.mjs.map +0 -1
|
@@ -0,0 +1,703 @@
|
|
|
1
|
+
const require_schemas = require('./schemas-BlScS1it.js');
|
|
2
|
+
|
|
3
|
+
//#region src/policy/constants.ts
|
|
4
|
+
/**
|
|
5
|
+
* Policy Constants
|
|
6
|
+
*
|
|
7
|
+
* Default values and constants for policy enforcement.
|
|
8
|
+
* Aligned with Rust types in agentshield-types/src/policy.rs
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Available enforcement actions.
|
|
12
|
+
*
|
|
13
|
+
* **Vocab-1 migration (2026-05-13, see [[ADR-001]] amendment + Vocab-1
|
|
14
|
+
* #2501).** The old vocabulary mixed two orthogonal axes — `'allow'` /
|
|
15
|
+
* `'block'` (a Decision) and `'log'` (an EnforcementMode). The new
|
|
16
|
+
* vocabulary separates them:
|
|
17
|
+
*
|
|
18
|
+
* - **Decision** (the engine's verdict): one of
|
|
19
|
+
* `'permit' | 'block' | 'redirect' | 'challenge' | 'instruct'`.
|
|
20
|
+
* - **EnforcementMode** (whether the host wrapper acts on the verdict):
|
|
21
|
+
* one of `'enforce' | 'observe'` — see ENFORCEMENT_MODES below.
|
|
22
|
+
*
|
|
23
|
+
* `ALLOW` is kept as an alias for `PERMIT` during the cutover window
|
|
24
|
+
* (per [[checkpoint-engine-phase-1-cutover]] runbook Cutover-2 — drop
|
|
25
|
+
* after 30 days of zero `'allow'` writes). `LOG` is kept similarly —
|
|
26
|
+
* a stored `'log'` row should be read as Permit + Observe mode.
|
|
27
|
+
*
|
|
28
|
+
* Producers (SDK middleware, gateway worker) emit `'permit'` going
|
|
29
|
+
* forward. Consumers (dashboard, ingest validators) accept both during
|
|
30
|
+
* the alias period and alias `'allow'` → display "Permit".
|
|
31
|
+
*/
|
|
32
|
+
const ENFORCEMENT_ACTIONS = {
|
|
33
|
+
/** New canonical name for "the engine permits this request through." */
|
|
34
|
+
PERMIT: "permit",
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use PERMIT. Kept as wire alias for the Vocab-1
|
|
37
|
+
* cutover window. Drop after 30 days of zero stored writes.
|
|
38
|
+
*/
|
|
39
|
+
ALLOW: "allow",
|
|
40
|
+
BLOCK: "block",
|
|
41
|
+
REDIRECT: "redirect",
|
|
42
|
+
CHALLENGE: "challenge",
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Pre-Vocab-1: a stored `'log'` action was "permit but
|
|
45
|
+
* record." Post-Vocab-1: the same shape is `action: 'permit'` +
|
|
46
|
+
* `mode: 'observe'` (orthogonal axes). Kept for read-back only;
|
|
47
|
+
* producers should not emit `'log'` after Vocab-1 lands.
|
|
48
|
+
*/
|
|
49
|
+
LOG: "log",
|
|
50
|
+
INSTRUCT: "instruct"
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* EnforcementMode — orthogonal to EnforcementAction.
|
|
54
|
+
*
|
|
55
|
+
* Vocab-1 (2026-05-13) split "what to do" (the action / Decision) from
|
|
56
|
+
* "whether to act on it" (the mode). Customers — especially regulated
|
|
57
|
+
* enterprises — want a low-stakes evaluation ramp: install in Observe,
|
|
58
|
+
* watch the dashboard for two weeks to see what *would have been*
|
|
59
|
+
* blocked, then flip to Enforce. CISO-friendly.
|
|
60
|
+
*
|
|
61
|
+
* The host wrapper (Express middleware, Next.js middleware, .NET
|
|
62
|
+
* filter, Cloudflare Worker) reads the mode and:
|
|
63
|
+
*
|
|
64
|
+
* - **Enforce**: applies the Decision — returns 401/403 for Block,
|
|
65
|
+
* forwards Challenge headers, performs Redirect, etc.
|
|
66
|
+
* - **Observe**: passes the request through to the origin regardless
|
|
67
|
+
* of Decision, but records the would-have-been action in metadata
|
|
68
|
+
* so the dashboard can render "Would have been: Block(OutOfScope)"
|
|
69
|
+
* instead of "Block(OutOfScope)". Dash-1 (#2492) acceptance
|
|
70
|
+
* criterion mandates this rendering distinction.
|
|
71
|
+
*/
|
|
72
|
+
const ENFORCEMENT_MODES = {
|
|
73
|
+
ENFORCE: "enforce",
|
|
74
|
+
OBSERVE: "observe"
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Condition operators for policy rules
|
|
78
|
+
*/
|
|
79
|
+
const CONDITION_OPERATORS = {
|
|
80
|
+
EQUALS: "equals",
|
|
81
|
+
NOT_EQUALS: "notEquals",
|
|
82
|
+
CONTAINS: "contains",
|
|
83
|
+
NOT_CONTAINS: "notContains",
|
|
84
|
+
STARTS_WITH: "startsWith",
|
|
85
|
+
ENDS_WITH: "endsWith",
|
|
86
|
+
GREATER_THAN: "greaterThan",
|
|
87
|
+
LESS_THAN: "lessThan",
|
|
88
|
+
GREATER_THAN_OR_EQUALS: "greaterThanOrEquals",
|
|
89
|
+
LESS_THAN_OR_EQUALS: "lessThanOrEquals",
|
|
90
|
+
MATCHES: "matches",
|
|
91
|
+
IN: "in",
|
|
92
|
+
NOT_IN: "notIn"
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Fields that can be matched in policy conditions
|
|
96
|
+
*/
|
|
97
|
+
const CONDITION_FIELDS = {
|
|
98
|
+
AGENT_TYPE: "agentType",
|
|
99
|
+
AGENT_NAME: "agentName",
|
|
100
|
+
AGENT_VENDOR: "agentVendor",
|
|
101
|
+
CLIENT_DID: "clientDid",
|
|
102
|
+
AGENT_DID: "agentDid",
|
|
103
|
+
CONFIDENCE: "confidence",
|
|
104
|
+
REPUTATION_SCORE: "reputationScore",
|
|
105
|
+
RISK_LEVEL: "riskLevel",
|
|
106
|
+
PATH: "path",
|
|
107
|
+
METHOD: "method",
|
|
108
|
+
ORIGIN: "origin",
|
|
109
|
+
USER_AGENT: "userAgent",
|
|
110
|
+
SIGNATURE_VERIFIED: "signatureVerified",
|
|
111
|
+
IS_AUTHENTICATED: "isAuthenticated",
|
|
112
|
+
HAS_VALID_DELEGATION: "hasValidDelegation"
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Default threshold configuration
|
|
116
|
+
*/
|
|
117
|
+
const DEFAULT_THRESHOLDS = {
|
|
118
|
+
confidenceThreshold: 80,
|
|
119
|
+
confidenceAction: ENFORCEMENT_ACTIONS.BLOCK,
|
|
120
|
+
minReputationScore: 0,
|
|
121
|
+
lowReputationAction: ENFORCEMENT_ACTIONS.CHALLENGE,
|
|
122
|
+
trustedReputationThreshold: 90,
|
|
123
|
+
trustSignedRequests: true
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Default policy configuration
|
|
127
|
+
*/
|
|
128
|
+
const DEFAULT_POLICY = {
|
|
129
|
+
version: "1.0.0",
|
|
130
|
+
enabled: true,
|
|
131
|
+
defaultAction: ENFORCEMENT_ACTIONS.PERMIT,
|
|
132
|
+
thresholds: DEFAULT_THRESHOLDS,
|
|
133
|
+
denyList: [],
|
|
134
|
+
allowList: [],
|
|
135
|
+
rules: [],
|
|
136
|
+
excludedPaths: []
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Default rule priority (lower = higher priority)
|
|
140
|
+
*/
|
|
141
|
+
const DEFAULT_RULE_PRIORITY = 100;
|
|
142
|
+
/**
|
|
143
|
+
* Cache TTL values (in seconds)
|
|
144
|
+
*/
|
|
145
|
+
const CACHE_TTL = {
|
|
146
|
+
POLICY: 300,
|
|
147
|
+
API_KEY: 900
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Policy version for schema migrations
|
|
151
|
+
*/
|
|
152
|
+
const CURRENT_POLICY_VERSION = "1.0.0";
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/policy/schemas.ts
|
|
156
|
+
/**
|
|
157
|
+
* Policy Zod Schemas
|
|
158
|
+
*
|
|
159
|
+
* Runtime validation schemas for policy configuration.
|
|
160
|
+
* Aligned with Rust types in agentshield-types/src/policy.rs
|
|
161
|
+
*/
|
|
162
|
+
const EnforcementActionSchema = require_schemas._enum([
|
|
163
|
+
ENFORCEMENT_ACTIONS.PERMIT,
|
|
164
|
+
ENFORCEMENT_ACTIONS.BLOCK,
|
|
165
|
+
ENFORCEMENT_ACTIONS.REDIRECT,
|
|
166
|
+
ENFORCEMENT_ACTIONS.CHALLENGE,
|
|
167
|
+
ENFORCEMENT_ACTIONS.INSTRUCT,
|
|
168
|
+
ENFORCEMENT_ACTIONS.ALLOW,
|
|
169
|
+
ENFORCEMENT_ACTIONS.LOG
|
|
170
|
+
]);
|
|
171
|
+
/**
|
|
172
|
+
* EnforcementMode — orthogonal to EnforcementAction. See
|
|
173
|
+
* `ENFORCEMENT_MODES` in constants.ts for the full rationale.
|
|
174
|
+
*/
|
|
175
|
+
const EnforcementModeSchema = require_schemas._enum([ENFORCEMENT_MODES.ENFORCE, ENFORCEMENT_MODES.OBSERVE]);
|
|
176
|
+
/**
|
|
177
|
+
* Block reasons — priority order (Rust declaration order): Revoked >
|
|
178
|
+
* InvalidSignature > Unauthenticated > Expired > OutOfScope >
|
|
179
|
+
* LowReputation > PolicyDenied > AgentAttribution > ParseError >
|
|
180
|
+
* Tier3UAMatch. The engine returns the most-actionable reason; this
|
|
181
|
+
* schema accepts any of them. See TDD Spec Layer 1 for the priority
|
|
182
|
+
* rules and `rust/crates/kya-os-engine/src/types.rs` for the wire SSOT.
|
|
183
|
+
*/
|
|
184
|
+
const BlockReasonSchema = require_schemas.discriminatedUnion("kind", [
|
|
185
|
+
require_schemas.object({ kind: require_schemas.literal("Revoked") }),
|
|
186
|
+
require_schemas.object({ kind: require_schemas.literal("InvalidSignature") }),
|
|
187
|
+
require_schemas.object({ kind: require_schemas.literal("Unauthenticated") }),
|
|
188
|
+
require_schemas.object({ kind: require_schemas.literal("Expired") }),
|
|
189
|
+
require_schemas.object({
|
|
190
|
+
kind: require_schemas.literal("OutOfScope"),
|
|
191
|
+
requested: require_schemas.string(),
|
|
192
|
+
granted: require_schemas.array(require_schemas.string())
|
|
193
|
+
}),
|
|
194
|
+
require_schemas.object({
|
|
195
|
+
kind: require_schemas.literal("LowReputation"),
|
|
196
|
+
score: require_schemas.number(),
|
|
197
|
+
threshold: require_schemas.number()
|
|
198
|
+
}),
|
|
199
|
+
require_schemas.object({
|
|
200
|
+
kind: require_schemas.literal("PolicyDenied"),
|
|
201
|
+
detail: require_schemas.string(),
|
|
202
|
+
policyId: require_schemas.string().optional()
|
|
203
|
+
}),
|
|
204
|
+
require_schemas.object({
|
|
205
|
+
kind: require_schemas.literal("AgentAttribution"),
|
|
206
|
+
vendor: require_schemas.string(),
|
|
207
|
+
tier: require_schemas.number().int(),
|
|
208
|
+
confidence: require_schemas.number().min(0).max(1)
|
|
209
|
+
}),
|
|
210
|
+
require_schemas.object({
|
|
211
|
+
kind: require_schemas.literal("ParseError"),
|
|
212
|
+
detail: require_schemas.string()
|
|
213
|
+
}),
|
|
214
|
+
require_schemas.object({
|
|
215
|
+
kind: require_schemas.literal("Tier3UAMatch"),
|
|
216
|
+
pattern_id: require_schemas.string(),
|
|
217
|
+
pattern_kind: require_schemas.string(),
|
|
218
|
+
confidence: require_schemas.number().int().min(0).max(100)
|
|
219
|
+
})
|
|
220
|
+
]);
|
|
221
|
+
/**
|
|
222
|
+
* The draft-kya-http-02 §1 assurance ladder, monotone floor → top. These are
|
|
223
|
+
* the exact wire strings the merged kya-http fixtures pin
|
|
224
|
+
* (`packages/checkpoint-shared/fixtures/kya-http`, e.g. `min_assurance`); the
|
|
225
|
+
* Rust engine emits them on the verdict and reads them as `context.assurance`.
|
|
226
|
+
* Canonical SSOT for the assurance tier / `min_assurance` enum.
|
|
227
|
+
*/
|
|
228
|
+
const AssuranceTierSchema = require_schemas._enum([
|
|
229
|
+
"anonymous",
|
|
230
|
+
"attested-bearer",
|
|
231
|
+
"key-bound",
|
|
232
|
+
"registered",
|
|
233
|
+
"delegated"
|
|
234
|
+
]);
|
|
235
|
+
/**
|
|
236
|
+
* ChallengeParams MUST be the KYA-OS L2+ handshake envelope shape, not
|
|
237
|
+
* a parallel Checkpoint definition. Reusing the spec donated to DIF
|
|
238
|
+
* gives every KYA-OS implementer free interop with Checkpoint's
|
|
239
|
+
* Challenge flow. See [[ADR-001]] amendment.
|
|
240
|
+
*/
|
|
241
|
+
const ChallengeParamsSchema = require_schemas.object({
|
|
242
|
+
nonce: require_schemas.string(),
|
|
243
|
+
audience: require_schemas.string(),
|
|
244
|
+
expiresAt: require_schemas.number(),
|
|
245
|
+
algorithmsAccepted: require_schemas.array(require_schemas.string()),
|
|
246
|
+
minAssurance: AssuranceTierSchema.optional(),
|
|
247
|
+
policyId: require_schemas.string().optional(),
|
|
248
|
+
challengeType: require_schemas.string().optional()
|
|
249
|
+
});
|
|
250
|
+
const RedirectTargetSchema = require_schemas.object({
|
|
251
|
+
url: require_schemas.string().url(),
|
|
252
|
+
reason: require_schemas.string(),
|
|
253
|
+
state: require_schemas.string().optional(),
|
|
254
|
+
policyId: require_schemas.string().optional()
|
|
255
|
+
});
|
|
256
|
+
const SuggestedActionSchema = require_schemas.discriminatedUnion("kind", [
|
|
257
|
+
require_schemas.object({
|
|
258
|
+
kind: require_schemas.literal("UseDifferentScope"),
|
|
259
|
+
scope: require_schemas.string()
|
|
260
|
+
}),
|
|
261
|
+
require_schemas.object({
|
|
262
|
+
kind: require_schemas.literal("UpdateRequestField"),
|
|
263
|
+
field: require_schemas.string(),
|
|
264
|
+
acceptedValues: require_schemas.array(require_schemas.string())
|
|
265
|
+
}),
|
|
266
|
+
require_schemas.object({
|
|
267
|
+
kind: require_schemas.literal("UpgradeProtocolVersion"),
|
|
268
|
+
version: require_schemas.string()
|
|
269
|
+
}),
|
|
270
|
+
require_schemas.object({
|
|
271
|
+
kind: require_schemas.literal("Other"),
|
|
272
|
+
code: require_schemas.string(),
|
|
273
|
+
detail: require_schemas.string()
|
|
274
|
+
})
|
|
275
|
+
]);
|
|
276
|
+
const InstructPayloadSchema = require_schemas.object({
|
|
277
|
+
problem: require_schemas.string(),
|
|
278
|
+
title: require_schemas.string(),
|
|
279
|
+
suggestedActions: require_schemas.array(SuggestedActionSchema),
|
|
280
|
+
policyId: require_schemas.string().optional()
|
|
281
|
+
});
|
|
282
|
+
/**
|
|
283
|
+
* Decision — the Detect → Verify → **Decide** axis. Five variants
|
|
284
|
+
* with per-variant payload via discriminated union. Mirrors the Rust
|
|
285
|
+
* `Decision` enum (D-design #2484); the dashboard renders one badge
|
|
286
|
+
* per variant (see Dash-1 #2492). The wire-side EnforcementAction
|
|
287
|
+
* string above is the legacy flat encoding; this is the canonical
|
|
288
|
+
* structured replacement.
|
|
289
|
+
*/
|
|
290
|
+
const DecisionSchema = require_schemas.discriminatedUnion("kind", [
|
|
291
|
+
require_schemas.object({
|
|
292
|
+
kind: require_schemas.literal("Permit"),
|
|
293
|
+
policyId: require_schemas.string().optional()
|
|
294
|
+
}),
|
|
295
|
+
require_schemas.object({
|
|
296
|
+
kind: require_schemas.literal("Block"),
|
|
297
|
+
reason: BlockReasonSchema
|
|
298
|
+
}),
|
|
299
|
+
require_schemas.object({
|
|
300
|
+
kind: require_schemas.literal("Challenge"),
|
|
301
|
+
params: ChallengeParamsSchema
|
|
302
|
+
}),
|
|
303
|
+
require_schemas.object({
|
|
304
|
+
kind: require_schemas.literal("Redirect"),
|
|
305
|
+
target: RedirectTargetSchema
|
|
306
|
+
}),
|
|
307
|
+
require_schemas.object({
|
|
308
|
+
kind: require_schemas.literal("Instruct"),
|
|
309
|
+
payload: InstructPayloadSchema
|
|
310
|
+
})
|
|
311
|
+
]);
|
|
312
|
+
const ThresholdConfigSchema = require_schemas.object({
|
|
313
|
+
/** Detection confidence threshold (0-100) */
|
|
314
|
+
confidenceThreshold: require_schemas.number().min(0).max(100).default(DEFAULT_THRESHOLDS.confidenceThreshold),
|
|
315
|
+
/** Action to take when confidence threshold is exceeded */
|
|
316
|
+
confidenceAction: EnforcementActionSchema.default(DEFAULT_THRESHOLDS.confidenceAction),
|
|
317
|
+
/** Minimum reputation score (0-100) required to allow access */
|
|
318
|
+
minReputationScore: require_schemas.number().min(0).max(100).default(DEFAULT_THRESHOLDS.minReputationScore),
|
|
319
|
+
/** Action to take when reputation is below threshold */
|
|
320
|
+
lowReputationAction: EnforcementActionSchema.default(DEFAULT_THRESHOLDS.lowReputationAction),
|
|
321
|
+
/** High reputation score threshold (0-100) - trusted agents bypass other checks */
|
|
322
|
+
trustedReputationThreshold: require_schemas.number().min(0).max(100).default(DEFAULT_THRESHOLDS.trustedReputationThreshold),
|
|
323
|
+
/** Whether cryptographically signed requests bypass thresholds */
|
|
324
|
+
trustSignedRequests: require_schemas.boolean().default(DEFAULT_THRESHOLDS.trustSignedRequests)
|
|
325
|
+
});
|
|
326
|
+
const DenyListEntrySchema = require_schemas.object({
|
|
327
|
+
/** KYA-OS client DID */
|
|
328
|
+
clientDid: require_schemas.string().optional(),
|
|
329
|
+
/** Agent DID from KYA-OS identity */
|
|
330
|
+
agentDid: require_schemas.string().optional(),
|
|
331
|
+
/** Human-readable client name (e.g., "ChatGPT") */
|
|
332
|
+
clientName: require_schemas.string().optional(),
|
|
333
|
+
/** Agent type to block (e.g., "ai_agent", "bot") */
|
|
334
|
+
agentType: require_schemas.string().optional(),
|
|
335
|
+
/** Reason for denial */
|
|
336
|
+
reason: require_schemas.string().optional(),
|
|
337
|
+
/** ISO 8601 timestamp when entry was added */
|
|
338
|
+
blockedAt: require_schemas.string().optional(),
|
|
339
|
+
/** Who added this entry */
|
|
340
|
+
addedBy: require_schemas.string().optional(),
|
|
341
|
+
/** Whether this entry is currently active */
|
|
342
|
+
active: require_schemas.boolean().default(true),
|
|
343
|
+
/** Optional expiration date for temporary blocks */
|
|
344
|
+
expiresAt: require_schemas.string().optional()
|
|
345
|
+
});
|
|
346
|
+
const AllowListEntrySchema = require_schemas.object({
|
|
347
|
+
/** KYA-OS client DID */
|
|
348
|
+
clientDid: require_schemas.string().optional(),
|
|
349
|
+
/** Agent DID from KYA-OS identity */
|
|
350
|
+
agentDid: require_schemas.string().optional(),
|
|
351
|
+
/** Human-readable client name */
|
|
352
|
+
clientName: require_schemas.string().optional(),
|
|
353
|
+
/** Agent type to allow */
|
|
354
|
+
agentType: require_schemas.string().optional(),
|
|
355
|
+
/** Reason for allowing */
|
|
356
|
+
reason: require_schemas.string().optional(),
|
|
357
|
+
/** ISO 8601 timestamp when entry was added */
|
|
358
|
+
addedAt: require_schemas.string().optional(),
|
|
359
|
+
/** Who added this entry */
|
|
360
|
+
addedBy: require_schemas.string().optional()
|
|
361
|
+
});
|
|
362
|
+
const ConditionOperatorSchema = require_schemas._enum([
|
|
363
|
+
CONDITION_OPERATORS.EQUALS,
|
|
364
|
+
CONDITION_OPERATORS.NOT_EQUALS,
|
|
365
|
+
CONDITION_OPERATORS.CONTAINS,
|
|
366
|
+
CONDITION_OPERATORS.NOT_CONTAINS,
|
|
367
|
+
CONDITION_OPERATORS.STARTS_WITH,
|
|
368
|
+
CONDITION_OPERATORS.ENDS_WITH,
|
|
369
|
+
CONDITION_OPERATORS.GREATER_THAN,
|
|
370
|
+
CONDITION_OPERATORS.LESS_THAN,
|
|
371
|
+
CONDITION_OPERATORS.GREATER_THAN_OR_EQUALS,
|
|
372
|
+
CONDITION_OPERATORS.LESS_THAN_OR_EQUALS,
|
|
373
|
+
CONDITION_OPERATORS.MATCHES,
|
|
374
|
+
CONDITION_OPERATORS.IN,
|
|
375
|
+
CONDITION_OPERATORS.NOT_IN
|
|
376
|
+
]);
|
|
377
|
+
const ConditionFieldSchema = require_schemas._enum([
|
|
378
|
+
CONDITION_FIELDS.AGENT_TYPE,
|
|
379
|
+
CONDITION_FIELDS.AGENT_NAME,
|
|
380
|
+
CONDITION_FIELDS.AGENT_VENDOR,
|
|
381
|
+
CONDITION_FIELDS.CLIENT_DID,
|
|
382
|
+
CONDITION_FIELDS.AGENT_DID,
|
|
383
|
+
CONDITION_FIELDS.CONFIDENCE,
|
|
384
|
+
CONDITION_FIELDS.REPUTATION_SCORE,
|
|
385
|
+
CONDITION_FIELDS.RISK_LEVEL,
|
|
386
|
+
CONDITION_FIELDS.PATH,
|
|
387
|
+
CONDITION_FIELDS.METHOD,
|
|
388
|
+
CONDITION_FIELDS.ORIGIN,
|
|
389
|
+
CONDITION_FIELDS.USER_AGENT,
|
|
390
|
+
CONDITION_FIELDS.SIGNATURE_VERIFIED,
|
|
391
|
+
CONDITION_FIELDS.IS_AUTHENTICATED,
|
|
392
|
+
CONDITION_FIELDS.HAS_VALID_DELEGATION
|
|
393
|
+
]);
|
|
394
|
+
const ConditionValueSchema = require_schemas.union([
|
|
395
|
+
require_schemas.string(),
|
|
396
|
+
require_schemas.number(),
|
|
397
|
+
require_schemas.boolean(),
|
|
398
|
+
require_schemas.array(require_schemas.string())
|
|
399
|
+
]);
|
|
400
|
+
const PolicyConditionSchema = require_schemas.object({
|
|
401
|
+
/** Field to match against */
|
|
402
|
+
field: ConditionFieldSchema,
|
|
403
|
+
/** Comparison operator */
|
|
404
|
+
operator: ConditionOperatorSchema,
|
|
405
|
+
/** Value to compare against */
|
|
406
|
+
value: ConditionValueSchema,
|
|
407
|
+
/** Whether this condition is case-insensitive */
|
|
408
|
+
caseInsensitive: require_schemas.boolean().optional()
|
|
409
|
+
});
|
|
410
|
+
const RuleMetadataSchema = require_schemas.object({
|
|
411
|
+
createdAt: require_schemas.string().optional(),
|
|
412
|
+
updatedAt: require_schemas.string().optional(),
|
|
413
|
+
createdBy: require_schemas.string().optional()
|
|
414
|
+
});
|
|
415
|
+
const PolicyRuleSchema = require_schemas.object({
|
|
416
|
+
/** Unique identifier for this rule */
|
|
417
|
+
id: require_schemas.string(),
|
|
418
|
+
/** Human-readable name */
|
|
419
|
+
name: require_schemas.string(),
|
|
420
|
+
/** Description of what this rule does */
|
|
421
|
+
description: require_schemas.string().optional(),
|
|
422
|
+
/** Priority (lower = higher priority, evaluated first) */
|
|
423
|
+
priority: require_schemas.number().int().default(100),
|
|
424
|
+
/** Conditions that must ALL match for this rule to apply (AND logic) */
|
|
425
|
+
conditions: require_schemas.array(PolicyConditionSchema),
|
|
426
|
+
/** Action to take when conditions match */
|
|
427
|
+
action: EnforcementActionSchema,
|
|
428
|
+
/** Redirect URL (required if action is 'redirect') */
|
|
429
|
+
redirectUrl: require_schemas.string().url().optional(),
|
|
430
|
+
/** Custom message to show/log */
|
|
431
|
+
message: require_schemas.string().optional(),
|
|
432
|
+
/** Whether this rule is currently active */
|
|
433
|
+
enabled: require_schemas.boolean().default(true),
|
|
434
|
+
/** Metadata for auditing */
|
|
435
|
+
metadata: RuleMetadataSchema.optional()
|
|
436
|
+
});
|
|
437
|
+
const PolicyMetadataSchema = require_schemas.object({
|
|
438
|
+
lastUpdated: require_schemas.string().optional(),
|
|
439
|
+
updatedBy: require_schemas.string().optional(),
|
|
440
|
+
policyId: require_schemas.string().optional()
|
|
441
|
+
});
|
|
442
|
+
const PolicyConfigSchema = require_schemas.object({
|
|
443
|
+
/** Schema version for migrations */
|
|
444
|
+
version: require_schemas.string().default(CURRENT_POLICY_VERSION),
|
|
445
|
+
/** Whether policy enforcement is enabled */
|
|
446
|
+
enabled: require_schemas.boolean().default(true),
|
|
447
|
+
/** Default action when no rules match. Updated to PERMIT (was ALLOW)
|
|
448
|
+
* per Vocab-1 (#2501); the wire still accepts both via the alias
|
|
449
|
+
* schema so existing stored policies continue to load. */
|
|
450
|
+
defaultAction: EnforcementActionSchema.default(ENFORCEMENT_ACTIONS.PERMIT),
|
|
451
|
+
/** Default redirect URL for redirect actions */
|
|
452
|
+
redirectUrl: require_schemas.string().url().optional(),
|
|
453
|
+
/** Threshold-based enforcement settings */
|
|
454
|
+
thresholds: ThresholdConfigSchema.prefault({}),
|
|
455
|
+
/** Deny list entries (checked after allow list, before rules) */
|
|
456
|
+
denyList: require_schemas.array(DenyListEntrySchema).default([]),
|
|
457
|
+
/** Allow list entries (exempt from all checks) */
|
|
458
|
+
allowList: require_schemas.array(AllowListEntrySchema).default([]),
|
|
459
|
+
/** Custom policy rules (evaluated by priority after threshold checks) */
|
|
460
|
+
rules: require_schemas.array(PolicyRuleSchema).default([]),
|
|
461
|
+
/** Paths to exclude from policy enforcement (glob patterns supported) */
|
|
462
|
+
excludedPaths: require_schemas.array(require_schemas.string()).default([]),
|
|
463
|
+
/** Paths to include (if set, only these paths are enforced) */
|
|
464
|
+
includedPaths: require_schemas.array(require_schemas.string()).optional(),
|
|
465
|
+
/** Metadata for the policy configuration */
|
|
466
|
+
metadata: PolicyMetadataSchema.optional(),
|
|
467
|
+
/**
|
|
468
|
+
* Composed policy source (Cedar today). `null`/absent → no composed policy
|
|
469
|
+
* (the runtime uses the structured fields). Empty/blank is treated as "no
|
|
470
|
+
* policy" by the engine path (an empty bundle compiles to deny-all), so the
|
|
471
|
+
* runtime MUST normalize blank → absent before handing it to the evaluator.
|
|
472
|
+
*/
|
|
473
|
+
policySourceText: require_schemas.string().nullish(),
|
|
474
|
+
/**
|
|
475
|
+
* Language of `policySourceText`. `cedar` today; kept as a free string (not an
|
|
476
|
+
* enum) so a future Rego/OPA bundle flows through the same contract without a
|
|
477
|
+
* schema-version bump. A runtime enforces only languages it actually embeds.
|
|
478
|
+
*/
|
|
479
|
+
policyLanguage: require_schemas.string().nullish(),
|
|
480
|
+
/**
|
|
481
|
+
* Hex sha256 of `policySourceText` as served by the SSOT — byte-identical to
|
|
482
|
+
* `policy_revisions.composed_blob_hash` (#3246 PR5). Runtimes ECHO it onto
|
|
483
|
+
* acted decisions (`enforcement.composedBlobHash`) and Delegation challenges
|
|
484
|
+
* (`challenge.composed_blob_hash`) as the point-in-time revision pin; they
|
|
485
|
+
* never hash locally. Absent/null → plane omits the pin (older dashboards).
|
|
486
|
+
*/
|
|
487
|
+
policySourceHash: require_schemas.string().nullish(),
|
|
488
|
+
/**
|
|
489
|
+
* Whether the engine should ACT on the composed policy (deployed-to-enforce).
|
|
490
|
+
* False → the composed policy is at most shadow-evaluated; the structured
|
|
491
|
+
* path / bespoke decision governs. Mirrors the gateway worker's act-gate
|
|
492
|
+
* (`engineEnforcementEnabled === true && enabled !== false`).
|
|
493
|
+
*/
|
|
494
|
+
engineEnforcementEnabled: require_schemas.boolean().optional().default(false),
|
|
495
|
+
/**
|
|
496
|
+
* Trusted Layer-2 delegation root DIDs for the project's org (P2 / DR-1),
|
|
497
|
+
* server-resolved by the policy API. A consuming middleware forwards these
|
|
498
|
+
* into the engine's `ContextSpec.trustedDelegationRoots` so L2 delegation
|
|
499
|
+
* chains are pinned to the org DID. Absent ⇒ omitted, and the engine rejects
|
|
500
|
+
* delegation. Optional (no default)
|
|
501
|
+
* so a policy without the field round-trips as `undefined`, matching the
|
|
502
|
+
* policy API's `PolicyResponse` shape and the orchestrator's omit-when-unset
|
|
503
|
+
* contract.
|
|
504
|
+
*/
|
|
505
|
+
trustedDelegationRoots: require_schemas.array(require_schemas.string()).optional(),
|
|
506
|
+
/**
|
|
507
|
+
* The org's one OAuth authorization server issuer (RFC 8414 `issuer`), as the
|
|
508
|
+
* platform's IssuerContext computes it (`https://<branded host or platform>/oauth/<slug>`).
|
|
509
|
+
* A middleware that serves protected resource metadata advertises exactly
|
|
510
|
+
* this in `authorization_servers` and never builds an issuer URL itself.
|
|
511
|
+
* Absent ⇒ the platform could not resolve the org; serve no metadata.
|
|
512
|
+
*/
|
|
513
|
+
authorizationServerIssuer: require_schemas.string().url().optional()
|
|
514
|
+
});
|
|
515
|
+
/**
|
|
516
|
+
* Safely parse a policy configuration (returns null on error)
|
|
517
|
+
*/
|
|
518
|
+
function safeParsePolicyConfig(data) {
|
|
519
|
+
const result = PolicyConfigSchema.safeParse(data);
|
|
520
|
+
return result.success ? result.data : null;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
//#endregion
|
|
524
|
+
Object.defineProperty(exports, 'AllowListEntrySchema', {
|
|
525
|
+
enumerable: true,
|
|
526
|
+
get: function () {
|
|
527
|
+
return AllowListEntrySchema;
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
Object.defineProperty(exports, 'AssuranceTierSchema', {
|
|
531
|
+
enumerable: true,
|
|
532
|
+
get: function () {
|
|
533
|
+
return AssuranceTierSchema;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
Object.defineProperty(exports, 'BlockReasonSchema', {
|
|
537
|
+
enumerable: true,
|
|
538
|
+
get: function () {
|
|
539
|
+
return BlockReasonSchema;
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
Object.defineProperty(exports, 'CACHE_TTL', {
|
|
543
|
+
enumerable: true,
|
|
544
|
+
get: function () {
|
|
545
|
+
return CACHE_TTL;
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
Object.defineProperty(exports, 'CONDITION_FIELDS', {
|
|
549
|
+
enumerable: true,
|
|
550
|
+
get: function () {
|
|
551
|
+
return CONDITION_FIELDS;
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
Object.defineProperty(exports, 'CONDITION_OPERATORS', {
|
|
555
|
+
enumerable: true,
|
|
556
|
+
get: function () {
|
|
557
|
+
return CONDITION_OPERATORS;
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
Object.defineProperty(exports, 'CURRENT_POLICY_VERSION', {
|
|
561
|
+
enumerable: true,
|
|
562
|
+
get: function () {
|
|
563
|
+
return CURRENT_POLICY_VERSION;
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
Object.defineProperty(exports, 'ChallengeParamsSchema', {
|
|
567
|
+
enumerable: true,
|
|
568
|
+
get: function () {
|
|
569
|
+
return ChallengeParamsSchema;
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
Object.defineProperty(exports, 'ConditionFieldSchema', {
|
|
573
|
+
enumerable: true,
|
|
574
|
+
get: function () {
|
|
575
|
+
return ConditionFieldSchema;
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
Object.defineProperty(exports, 'ConditionOperatorSchema', {
|
|
579
|
+
enumerable: true,
|
|
580
|
+
get: function () {
|
|
581
|
+
return ConditionOperatorSchema;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
Object.defineProperty(exports, 'ConditionValueSchema', {
|
|
585
|
+
enumerable: true,
|
|
586
|
+
get: function () {
|
|
587
|
+
return ConditionValueSchema;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
Object.defineProperty(exports, 'DEFAULT_POLICY', {
|
|
591
|
+
enumerable: true,
|
|
592
|
+
get: function () {
|
|
593
|
+
return DEFAULT_POLICY;
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
Object.defineProperty(exports, 'DEFAULT_RULE_PRIORITY', {
|
|
597
|
+
enumerable: true,
|
|
598
|
+
get: function () {
|
|
599
|
+
return DEFAULT_RULE_PRIORITY;
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
Object.defineProperty(exports, 'DEFAULT_THRESHOLDS', {
|
|
603
|
+
enumerable: true,
|
|
604
|
+
get: function () {
|
|
605
|
+
return DEFAULT_THRESHOLDS;
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
Object.defineProperty(exports, 'DecisionSchema', {
|
|
609
|
+
enumerable: true,
|
|
610
|
+
get: function () {
|
|
611
|
+
return DecisionSchema;
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
Object.defineProperty(exports, 'DenyListEntrySchema', {
|
|
615
|
+
enumerable: true,
|
|
616
|
+
get: function () {
|
|
617
|
+
return DenyListEntrySchema;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
Object.defineProperty(exports, 'ENFORCEMENT_ACTIONS', {
|
|
621
|
+
enumerable: true,
|
|
622
|
+
get: function () {
|
|
623
|
+
return ENFORCEMENT_ACTIONS;
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
Object.defineProperty(exports, 'ENFORCEMENT_MODES', {
|
|
627
|
+
enumerable: true,
|
|
628
|
+
get: function () {
|
|
629
|
+
return ENFORCEMENT_MODES;
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
Object.defineProperty(exports, 'EnforcementActionSchema', {
|
|
633
|
+
enumerable: true,
|
|
634
|
+
get: function () {
|
|
635
|
+
return EnforcementActionSchema;
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
Object.defineProperty(exports, 'EnforcementModeSchema', {
|
|
639
|
+
enumerable: true,
|
|
640
|
+
get: function () {
|
|
641
|
+
return EnforcementModeSchema;
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
Object.defineProperty(exports, 'InstructPayloadSchema', {
|
|
645
|
+
enumerable: true,
|
|
646
|
+
get: function () {
|
|
647
|
+
return InstructPayloadSchema;
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
Object.defineProperty(exports, 'PolicyConditionSchema', {
|
|
651
|
+
enumerable: true,
|
|
652
|
+
get: function () {
|
|
653
|
+
return PolicyConditionSchema;
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
Object.defineProperty(exports, 'PolicyConfigSchema', {
|
|
657
|
+
enumerable: true,
|
|
658
|
+
get: function () {
|
|
659
|
+
return PolicyConfigSchema;
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
Object.defineProperty(exports, 'PolicyMetadataSchema', {
|
|
663
|
+
enumerable: true,
|
|
664
|
+
get: function () {
|
|
665
|
+
return PolicyMetadataSchema;
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
Object.defineProperty(exports, 'PolicyRuleSchema', {
|
|
669
|
+
enumerable: true,
|
|
670
|
+
get: function () {
|
|
671
|
+
return PolicyRuleSchema;
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
Object.defineProperty(exports, 'RedirectTargetSchema', {
|
|
675
|
+
enumerable: true,
|
|
676
|
+
get: function () {
|
|
677
|
+
return RedirectTargetSchema;
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
Object.defineProperty(exports, 'RuleMetadataSchema', {
|
|
681
|
+
enumerable: true,
|
|
682
|
+
get: function () {
|
|
683
|
+
return RuleMetadataSchema;
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
Object.defineProperty(exports, 'SuggestedActionSchema', {
|
|
687
|
+
enumerable: true,
|
|
688
|
+
get: function () {
|
|
689
|
+
return SuggestedActionSchema;
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
Object.defineProperty(exports, 'ThresholdConfigSchema', {
|
|
693
|
+
enumerable: true,
|
|
694
|
+
get: function () {
|
|
695
|
+
return ThresholdConfigSchema;
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
Object.defineProperty(exports, 'safeParsePolicyConfig', {
|
|
699
|
+
enumerable: true,
|
|
700
|
+
get: function () {
|
|
701
|
+
return safeParsePolicyConfig;
|
|
702
|
+
}
|
|
703
|
+
});
|