@nextera.one/axis-server-sdk 2.2.6 → 2.2.8
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/dist/{axis-sensor-GBEI3Fab.d.mts → axis-sensor-DMW4rfRg.d.mts} +9 -9
- package/dist/{axis-sensor-GBEI3Fab.d.ts → axis-sensor-DMW4rfRg.d.ts} +9 -9
- package/dist/cce/index.d.mts +10 -10
- package/dist/cce/index.d.ts +10 -10
- package/dist/cce/index.js +43 -14
- package/dist/cce/index.js.map +1 -1
- package/dist/cce/index.mjs +43 -14
- package/dist/cce/index.mjs.map +1 -1
- package/dist/{cce-pipeline-B-zUBHo3.d.mts → cce-pipeline-BJ-F1isr.d.ts} +2 -1
- package/dist/{cce-pipeline-DbGBSsCG.d.ts → cce-pipeline-CBt56guN.d.mts} +2 -1
- package/dist/{index-ldPtIocV.d.mts → index-CZ3RXsBC.d.mts} +42 -32
- package/dist/{index-CwXlBXJf.d.ts → index-DEh3s2yx.d.ts} +42 -32
- package/dist/{index-l3Hhirqb.d.ts → index-DMjzq8YO.d.ts} +1 -1
- package/dist/{index-_S4fmVUJ.d.mts → index-DiuKGnQw.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +174 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +174 -46
- package/dist/index.mjs.map +1 -1
- package/dist/needle/index.d.mts +2 -2
- package/dist/needle/index.d.ts +2 -2
- package/dist/needle/index.js.map +1 -1
- package/dist/needle/index.mjs.map +1 -1
- package/dist/sensors/index.d.mts +3 -3
- package/dist/sensors/index.d.ts +3 -3
- package/dist/sensors/index.js +174 -46
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +174 -46
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/sensors/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { m as AccessProfileResolverSensor, Y as BodyBudgetSensor, $ as CapabilityEnforcementSensor, a4 as ChunkHashSensor, a7 as EntropySensor, a9 as ExecutionTimeoutSensor, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ah as IntentAllowlistSensor, ak as IntentRegistrySensor, am as LawEvaluationSensor, as as ProofPresenceSensor, at as ProtocolStrictSensor, av as ReceiptPolicySensor, aB as RiskGateSensor, aC as RiskGateSensorOptions, aE as RiskSignalCollector, aG as SchemaValidationSensor, aI as StreamScopeSensor, aJ as TLVParseSensor, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor } from '../index-
|
|
2
|
-
import '../axis-sensor-
|
|
3
|
-
import '../cce-pipeline-
|
|
1
|
+
export { m as AccessProfileResolverSensor, Y as BodyBudgetSensor, $ as CapabilityEnforcementSensor, a4 as ChunkHashSensor, a7 as EntropySensor, a9 as ExecutionTimeoutSensor, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ah as IntentAllowlistSensor, ak as IntentRegistrySensor, am as LawEvaluationSensor, as as ProofPresenceSensor, at as ProtocolStrictSensor, av as ReceiptPolicySensor, aB as RiskGateSensor, aC as RiskGateSensorOptions, aE as RiskSignalCollector, aG as SchemaValidationSensor, aI as StreamScopeSensor, aJ as TLVParseSensor, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor } from '../index-CZ3RXsBC.mjs';
|
|
2
|
+
import '../axis-sensor-DMW4rfRg.mjs';
|
|
3
|
+
import '../cce-pipeline-CBt56guN.mjs';
|
|
4
4
|
import '@nextera.one/axis-protocol';
|
|
5
5
|
import 'zod';
|
package/dist/sensors/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { m as AccessProfileResolverSensor, Y as BodyBudgetSensor, $ as CapabilityEnforcementSensor, a4 as ChunkHashSensor, a7 as EntropySensor, a9 as ExecutionTimeoutSensor, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ah as IntentAllowlistSensor, ak as IntentRegistrySensor, am as LawEvaluationSensor, as as ProofPresenceSensor, at as ProtocolStrictSensor, av as ReceiptPolicySensor, aB as RiskGateSensor, aC as RiskGateSensorOptions, aE as RiskSignalCollector, aG as SchemaValidationSensor, aI as StreamScopeSensor, aJ as TLVParseSensor, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor } from '../index-
|
|
2
|
-
import '../axis-sensor-
|
|
3
|
-
import '../cce-pipeline-
|
|
1
|
+
export { m as AccessProfileResolverSensor, Y as BodyBudgetSensor, $ as CapabilityEnforcementSensor, a4 as ChunkHashSensor, a7 as EntropySensor, a9 as ExecutionTimeoutSensor, ab as FrameBudgetSensor, ac as FrameHeaderSanitySensor, ad as HeaderTLVLimitSensor, ah as IntentAllowlistSensor, ak as IntentRegistrySensor, am as LawEvaluationSensor, as as ProofPresenceSensor, at as ProtocolStrictSensor, av as ReceiptPolicySensor, aB as RiskGateSensor, aC as RiskGateSensorOptions, aE as RiskSignalCollector, aG as SchemaValidationSensor, aI as StreamScopeSensor, aJ as TLVParseSensor, aM as TickAuthCapsuleRef, aN as TickAuthSensor, aO as TickAuthSensorOptions, aP as TickAuthVerifier, a_ as TpsSensor, a$ as TpsSensorOptions, b0 as VarintHardeningSensor } from '../index-DEh3s2yx.js';
|
|
2
|
+
import '../axis-sensor-DMW4rfRg.js';
|
|
3
|
+
import '../cce-pipeline-BJ-F1isr.js';
|
|
4
4
|
import '@nextera.one/axis-protocol';
|
|
5
5
|
import 'zod';
|
package/dist/sensors/index.js
CHANGED
|
@@ -98,8 +98,9 @@ var require_access_profile_resolver_sensor = __commonJS({
|
|
|
98
98
|
this.name = "AccessProfileResolverSensor";
|
|
99
99
|
this.order = sensor_bands_1.BAND.IDENTITY + 10;
|
|
100
100
|
}
|
|
101
|
-
supports() {
|
|
102
|
-
|
|
101
|
+
async supports(input) {
|
|
102
|
+
void input;
|
|
103
|
+
return { action: "ALLOW" };
|
|
103
104
|
}
|
|
104
105
|
async run(input) {
|
|
105
106
|
const hasCapsule = !!input.metadata?.capsuleId;
|
|
@@ -249,8 +250,12 @@ var require_body_budget_sensor = __commonJS({
|
|
|
249
250
|
this.name = "BodyBudgetSensor";
|
|
250
251
|
this.order = sensor_bands_1.BAND.CONTENT + 10;
|
|
251
252
|
}
|
|
252
|
-
supports(input) {
|
|
253
|
-
return !!input.peek && input.peek.length >= 8
|
|
253
|
+
async supports(input) {
|
|
254
|
+
return !!input.peek && input.peek.length >= 8 ? { action: "ALLOW" } : {
|
|
255
|
+
action: "DENY",
|
|
256
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
257
|
+
reason: "Insufficient peek data to read headers"
|
|
258
|
+
};
|
|
254
259
|
}
|
|
255
260
|
async run(input) {
|
|
256
261
|
const { peek } = input;
|
|
@@ -1571,6 +1576,7 @@ var init_cce_types = __esm({
|
|
|
1571
1576
|
CAPSULE_NOT_YET_VALID: "CCE_CAPSULE_NOT_YET_VALID",
|
|
1572
1577
|
CAPSULE_REVOKED: "CCE_CAPSULE_REVOKED",
|
|
1573
1578
|
CAPSULE_CONSUMED: "CCE_CAPSULE_CONSUMED",
|
|
1579
|
+
CAPSULE_NOT_VERIFIED: "CCE_CAPSULE_NOT_VERIFIED",
|
|
1574
1580
|
// Binding errors
|
|
1575
1581
|
AUDIENCE_MISMATCH: "CCE_AUDIENCE_MISMATCH",
|
|
1576
1582
|
INTENT_MISMATCH: "CCE_INTENT_MISMATCH",
|
|
@@ -8550,9 +8556,37 @@ var init_axis_sensor_chain_service = __esm({
|
|
|
8550
8556
|
);
|
|
8551
8557
|
}
|
|
8552
8558
|
async evaluateSensors(sensors, input, baseDecision) {
|
|
8553
|
-
const relevantSensors =
|
|
8554
|
-
|
|
8555
|
-
|
|
8559
|
+
const relevantSensors = [];
|
|
8560
|
+
for (const sensor of sensors) {
|
|
8561
|
+
if (!sensor.supports) {
|
|
8562
|
+
relevantSensors.push(sensor);
|
|
8563
|
+
continue;
|
|
8564
|
+
}
|
|
8565
|
+
try {
|
|
8566
|
+
const supportsDecision = normalizeSensorDecision(
|
|
8567
|
+
await sensor.supports(input)
|
|
8568
|
+
);
|
|
8569
|
+
if (supportsDecision.allow) {
|
|
8570
|
+
relevantSensors.push(sensor);
|
|
8571
|
+
}
|
|
8572
|
+
} catch (error) {
|
|
8573
|
+
console.error(
|
|
8574
|
+
`[AXIS][SENSOR] ${sensor.name} supports() failed:`,
|
|
8575
|
+
error
|
|
8576
|
+
);
|
|
8577
|
+
const obs = input.metadata?.observation;
|
|
8578
|
+
if (obs) {
|
|
8579
|
+
recordSensor(obs, sensor.name, false, 100, 0, [
|
|
8580
|
+
`sensor_support_error:${sensor.name}`
|
|
8581
|
+
]);
|
|
8582
|
+
}
|
|
8583
|
+
return {
|
|
8584
|
+
allow: false,
|
|
8585
|
+
riskScore: 100,
|
|
8586
|
+
reasons: [`sensor_support_error:${sensor.name}`]
|
|
8587
|
+
};
|
|
8588
|
+
}
|
|
8589
|
+
}
|
|
8556
8590
|
const normalizedBase = baseDecision ? normalizeSensorDecision(baseDecision) : void 0;
|
|
8557
8591
|
let riskScore = normalizedBase?.riskScore ?? 0;
|
|
8558
8592
|
const reasons = normalizedBase?.reasons ? [...normalizedBase.reasons] : [];
|
|
@@ -10897,8 +10931,9 @@ var require_capability_enforcement_sensor = __commonJS({
|
|
|
10897
10931
|
this.name = "CapabilityEnforcementSensor";
|
|
10898
10932
|
this.order = sensor_bands_1.BAND.POLICY + 10;
|
|
10899
10933
|
}
|
|
10900
|
-
supports(input) {
|
|
10901
|
-
|
|
10934
|
+
async supports(input) {
|
|
10935
|
+
void input;
|
|
10936
|
+
return { action: "ALLOW" };
|
|
10902
10937
|
}
|
|
10903
10938
|
async run(input) {
|
|
10904
10939
|
const { intent, packet } = input;
|
|
@@ -10964,8 +10999,12 @@ var require_chunk_hash_sensor = __commonJS({
|
|
|
10964
10999
|
this.name = "ChunkHashSensor";
|
|
10965
11000
|
this.order = sensor_bands_1.BAND.CONTENT + 50;
|
|
10966
11001
|
}
|
|
10967
|
-
supports(input) {
|
|
10968
|
-
return input.intent === "file.chunk"
|
|
11002
|
+
async supports(input) {
|
|
11003
|
+
return input.intent === "file.chunk" ? { action: "ALLOW" } : {
|
|
11004
|
+
action: "DENY",
|
|
11005
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
11006
|
+
reason: "Only file.chunk intent is supported"
|
|
11007
|
+
};
|
|
10969
11008
|
}
|
|
10970
11009
|
async run(input) {
|
|
10971
11010
|
const headerTLVs = input.headerTLVs;
|
|
@@ -11008,15 +11047,52 @@ var require_chunk_hash_sensor = __commonJS({
|
|
|
11008
11047
|
var require_entropy_sensor = __commonJS({
|
|
11009
11048
|
"src/sensors/entropy.sensor.ts"(exports2) {
|
|
11010
11049
|
"use strict";
|
|
11050
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
11051
|
+
if (k2 === void 0) k2 = k;
|
|
11052
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11053
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11054
|
+
desc = { enumerable: true, get: function() {
|
|
11055
|
+
return m[k];
|
|
11056
|
+
} };
|
|
11057
|
+
}
|
|
11058
|
+
Object.defineProperty(o, k2, desc);
|
|
11059
|
+
}) : (function(o, m, k, k2) {
|
|
11060
|
+
if (k2 === void 0) k2 = k;
|
|
11061
|
+
o[k2] = m[k];
|
|
11062
|
+
}));
|
|
11063
|
+
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
11064
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11065
|
+
}) : function(o, v) {
|
|
11066
|
+
o["default"] = v;
|
|
11067
|
+
});
|
|
11011
11068
|
var __decorate = exports2 && exports2.__decorate || function(decorators, target, key, desc) {
|
|
11012
11069
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11013
11070
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11014
11071
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11015
11072
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11016
11073
|
};
|
|
11074
|
+
var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
|
|
11075
|
+
var ownKeys = function(o) {
|
|
11076
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
11077
|
+
var ar = [];
|
|
11078
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
11079
|
+
return ar;
|
|
11080
|
+
};
|
|
11081
|
+
return ownKeys(o);
|
|
11082
|
+
};
|
|
11083
|
+
return function(mod) {
|
|
11084
|
+
if (mod && mod.__esModule) return mod;
|
|
11085
|
+
var result = {};
|
|
11086
|
+
if (mod != null) {
|
|
11087
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
11088
|
+
}
|
|
11089
|
+
__setModuleDefault(result, mod);
|
|
11090
|
+
return result;
|
|
11091
|
+
};
|
|
11092
|
+
})();
|
|
11017
11093
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11018
11094
|
exports2.EntropySensor = void 0;
|
|
11019
|
-
var crypto4 = require("crypto");
|
|
11095
|
+
var crypto4 = __importStar(require("crypto"));
|
|
11020
11096
|
var sensor_decorator_1 = (init_sensor_decorator(), __toCommonJS(sensor_decorator_exports));
|
|
11021
11097
|
var sensor_bands_1 = (init_sensor_bands(), __toCommonJS(sensor_bands_exports));
|
|
11022
11098
|
var constants_1 = (init_constants(), __toCommonJS(constants_exports));
|
|
@@ -11155,8 +11231,8 @@ var require_execution_timeout_sensor = __commonJS({
|
|
|
11155
11231
|
this.name = "ExecutionTimeoutSensor";
|
|
11156
11232
|
this.order = sensor_bands_1.BAND.BUSINESS + 10;
|
|
11157
11233
|
}
|
|
11158
|
-
supports(
|
|
11159
|
-
return
|
|
11234
|
+
async supports() {
|
|
11235
|
+
return Promise.resolve({ action: "ALLOW" });
|
|
11160
11236
|
}
|
|
11161
11237
|
async run(input) {
|
|
11162
11238
|
const { intent, context } = input;
|
|
@@ -11209,8 +11285,12 @@ var require_frame_budget_sensor = __commonJS({
|
|
|
11209
11285
|
this.name = "FrameBudgetSensor";
|
|
11210
11286
|
this.order = sensor_bands_1.BAND.WIRE + 20;
|
|
11211
11287
|
}
|
|
11212
|
-
supports(input) {
|
|
11213
|
-
return typeof input.contentLength === "number"
|
|
11288
|
+
async supports(input) {
|
|
11289
|
+
return typeof input.contentLength === "number" ? { action: "ALLOW" } : {
|
|
11290
|
+
action: "DENY",
|
|
11291
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
11292
|
+
reason: "Content-Length not available"
|
|
11293
|
+
};
|
|
11214
11294
|
}
|
|
11215
11295
|
async run(input) {
|
|
11216
11296
|
const maxBytes = Number(process.env["AXIS_MAX_FRAME_SIZE"]) || 50 * 1024 * 1024;
|
|
@@ -11255,8 +11335,12 @@ var require_frame_header_sanity_sensor = __commonJS({
|
|
|
11255
11335
|
this.name = "FrameHeaderSanitySensor";
|
|
11256
11336
|
this.order = sensor_bands_1.BAND.WIRE + 30;
|
|
11257
11337
|
}
|
|
11258
|
-
supports(input) {
|
|
11259
|
-
return !!input.peek && input.peek.length >= 7
|
|
11338
|
+
async supports(input) {
|
|
11339
|
+
return !!input.peek && input.peek.length >= 7 ? { action: "ALLOW" } : {
|
|
11340
|
+
action: "DENY",
|
|
11341
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
11342
|
+
reason: "Insufficient peek data for header sanity checks"
|
|
11343
|
+
};
|
|
11260
11344
|
}
|
|
11261
11345
|
async run(input) {
|
|
11262
11346
|
const peek = input.peek;
|
|
@@ -11322,8 +11406,12 @@ var require_header_tlv_limit_sensor = __commonJS({
|
|
|
11322
11406
|
this.order = sensor_bands_1.BAND.CONTENT + 0;
|
|
11323
11407
|
this.MAX_TLVS = 64;
|
|
11324
11408
|
}
|
|
11325
|
-
supports(input) {
|
|
11326
|
-
return !!input.headerTLVs || !!input.packet
|
|
11409
|
+
async supports(input) {
|
|
11410
|
+
return !!input.headerTLVs || !!input.packet ? { action: "ALLOW" } : {
|
|
11411
|
+
action: "DENY",
|
|
11412
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
11413
|
+
reason: "Header TLV context is not available"
|
|
11414
|
+
};
|
|
11327
11415
|
}
|
|
11328
11416
|
async run(input) {
|
|
11329
11417
|
if (input.headerTLVs && input.headerTLVs.size > this.MAX_TLVS) {
|
|
@@ -11379,8 +11467,12 @@ var require_intent_allowlist_sensor = __commonJS({
|
|
|
11379
11467
|
this.name = "IntentAllowlistSensor";
|
|
11380
11468
|
this.order = sensor_bands_1.BAND.IDENTITY + 20;
|
|
11381
11469
|
}
|
|
11382
|
-
supports(input) {
|
|
11383
|
-
return !!input.intent
|
|
11470
|
+
async supports(input) {
|
|
11471
|
+
return !!input.intent ? { action: "ALLOW" } : {
|
|
11472
|
+
action: "DENY",
|
|
11473
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
11474
|
+
reason: "Intent is not available"
|
|
11475
|
+
};
|
|
11384
11476
|
}
|
|
11385
11477
|
async run(input) {
|
|
11386
11478
|
const profile = input.metadata?.profile || "PUBLIC";
|
|
@@ -11430,8 +11522,8 @@ var require_intent_registry_sensor = __commonJS({
|
|
|
11430
11522
|
this.name = "IntentRegistrySensor";
|
|
11431
11523
|
this.order = sensor_bands_1.BAND.IDENTITY + 25;
|
|
11432
11524
|
}
|
|
11433
|
-
supports(
|
|
11434
|
-
return
|
|
11525
|
+
async supports() {
|
|
11526
|
+
return Promise.resolve({ action: "ALLOW" });
|
|
11435
11527
|
}
|
|
11436
11528
|
async run(input) {
|
|
11437
11529
|
const intent = input.intent;
|
|
@@ -11480,8 +11572,12 @@ var require_law_evaluation_sensor = __commonJS({
|
|
|
11480
11572
|
this.name = "LawEvaluationSensor";
|
|
11481
11573
|
this.order = sensor_bands_1.BAND.POLICY + 5;
|
|
11482
11574
|
}
|
|
11483
|
-
supports(input) {
|
|
11484
|
-
return !!this.options.evaluator && !!input.intent
|
|
11575
|
+
async supports(input) {
|
|
11576
|
+
return !!this.options.evaluator && !!input.intent ? { action: "ALLOW" } : {
|
|
11577
|
+
action: "DENY",
|
|
11578
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
11579
|
+
reason: "Law evaluator or intent missing"
|
|
11580
|
+
};
|
|
11485
11581
|
}
|
|
11486
11582
|
async run(input) {
|
|
11487
11583
|
const evaluator = this.options.evaluator;
|
|
@@ -11547,7 +11643,9 @@ var require_law_evaluation_sensor = __commonJS({
|
|
|
11547
11643
|
return {
|
|
11548
11644
|
action: "FLAG",
|
|
11549
11645
|
scoreDelta: 25,
|
|
11550
|
-
reasons: reasons.length > 0 ? reasons : [
|
|
11646
|
+
reasons: reasons.length > 0 ? reasons : [
|
|
11647
|
+
"Execution is conditionally permitted pending additional requirements"
|
|
11648
|
+
],
|
|
11551
11649
|
meta: result
|
|
11552
11650
|
};
|
|
11553
11651
|
}
|
|
@@ -11673,10 +11771,15 @@ var init_axis_schemas = __esm({
|
|
|
11673
11771
|
ScanBurstDecisionZ = SensorDecisionWithMetadataZ;
|
|
11674
11772
|
ProofKindZ = z2.enum([
|
|
11675
11773
|
"NONE",
|
|
11676
|
-
"
|
|
11774
|
+
"ANONYMOUS",
|
|
11677
11775
|
"PASSPORT",
|
|
11776
|
+
"CAPSULE",
|
|
11777
|
+
"JWT",
|
|
11778
|
+
"CONTRACT",
|
|
11779
|
+
"WITNESS",
|
|
11678
11780
|
"MTLS",
|
|
11679
|
-
"
|
|
11781
|
+
"DEVICE",
|
|
11782
|
+
"AUTHORIZED"
|
|
11680
11783
|
]);
|
|
11681
11784
|
AccessProfileZ = z2.enum(["PUBLIC", "PARTNER", "INTERNAL", "NODE"]);
|
|
11682
11785
|
ProofPresenceInputZ = z2.object({
|
|
@@ -11798,7 +11901,10 @@ var init_axis_schemas = __esm({
|
|
|
11798
11901
|
ip: z2.string().min(1)
|
|
11799
11902
|
});
|
|
11800
11903
|
ProtocolStrictInputZ = z2.object({
|
|
11801
|
-
rawBytes: z2.union([
|
|
11904
|
+
rawBytes: z2.union([
|
|
11905
|
+
z2.custom((v) => Buffer.isBuffer(v)),
|
|
11906
|
+
z2.instanceof(Uint8Array)
|
|
11907
|
+
]).optional(),
|
|
11802
11908
|
ip: z2.string().min(1),
|
|
11803
11909
|
path: z2.string().min(1),
|
|
11804
11910
|
contentLength: z2.number().int().nonnegative(),
|
|
@@ -11938,8 +12044,11 @@ var require_proof_presence_sensor = __commonJS({
|
|
|
11938
12044
|
this.name = "ProofPresenceSensor";
|
|
11939
12045
|
this.order = sensor_bands_1.BAND.IDENTITY + 30;
|
|
11940
12046
|
}
|
|
11941
|
-
supports(input) {
|
|
11942
|
-
|
|
12047
|
+
async supports(input) {
|
|
12048
|
+
if (!!input.profile && !!input.visibility) {
|
|
12049
|
+
return { action: "ALLOW" };
|
|
12050
|
+
}
|
|
12051
|
+
return { action: "DENY", code: "MISSING_REQUIRED_FIELDS" };
|
|
11943
12052
|
}
|
|
11944
12053
|
async run(input) {
|
|
11945
12054
|
const validatedInput = axis_schemas_1.ProofPresenceInputZ.safeParse(input);
|
|
@@ -12233,8 +12342,8 @@ var require_receipt_policy_sensor = __commonJS({
|
|
|
12233
12342
|
this.name = "ReceiptPolicySensor";
|
|
12234
12343
|
this.order = sensor_bands_1.BAND.BUSINESS + 20;
|
|
12235
12344
|
}
|
|
12236
|
-
supports() {
|
|
12237
|
-
return
|
|
12345
|
+
async supports() {
|
|
12346
|
+
return { action: "ALLOW" };
|
|
12238
12347
|
}
|
|
12239
12348
|
async run() {
|
|
12240
12349
|
return { action: "ALLOW" };
|
|
@@ -12394,8 +12503,11 @@ var require_schema_validation_sensor = __commonJS({
|
|
|
12394
12503
|
this.name = "SchemaValidationSensor";
|
|
12395
12504
|
this.order = sensor_bands_1.BAND.CONTENT + 35;
|
|
12396
12505
|
}
|
|
12397
|
-
supports(input) {
|
|
12398
|
-
|
|
12506
|
+
async supports(input) {
|
|
12507
|
+
if (input.metadata?.schema) {
|
|
12508
|
+
return { action: "ALLOW" };
|
|
12509
|
+
}
|
|
12510
|
+
return { action: "DENY", code: "SCHEMA_NOT_CONFIGURED" };
|
|
12399
12511
|
}
|
|
12400
12512
|
async run(input) {
|
|
12401
12513
|
const schema = input.metadata?.schema;
|
|
@@ -12520,8 +12632,8 @@ var require_stream_scope_sensor = __commonJS({
|
|
|
12520
12632
|
this.name = "StreamScopeSensor";
|
|
12521
12633
|
this.order = sensor_bands_1.BAND.BUSINESS + 0;
|
|
12522
12634
|
}
|
|
12523
|
-
supports() {
|
|
12524
|
-
return
|
|
12635
|
+
async supports() {
|
|
12636
|
+
return { action: "ALLOW" };
|
|
12525
12637
|
}
|
|
12526
12638
|
async run() {
|
|
12527
12639
|
return { action: "ALLOW" };
|
|
@@ -12559,8 +12671,12 @@ var require_tickauth_sensor = __commonJS({
|
|
|
12559
12671
|
this.matchIntent = options.matchIntent ?? true;
|
|
12560
12672
|
this.acceptTypes = options.acceptTypes?.length ? new Set(options.acceptTypes) : null;
|
|
12561
12673
|
}
|
|
12562
|
-
supports(input) {
|
|
12563
|
-
return !!(input.metadata?.capsule || input.metadata?.tickauthCapsule || input.metadata?.cceEnvelope?.capsule)
|
|
12674
|
+
async supports(input) {
|
|
12675
|
+
return !!(input.metadata?.capsule || input.metadata?.tickauthCapsule || input.metadata?.cceEnvelope?.capsule) ? { action: "ALLOW" } : {
|
|
12676
|
+
action: "DENY",
|
|
12677
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
12678
|
+
reason: "TickAuth capsule not found"
|
|
12679
|
+
};
|
|
12564
12680
|
}
|
|
12565
12681
|
async run(input) {
|
|
12566
12682
|
const capsule = input.metadata?.capsule ?? input.metadata?.tickauthCapsule ?? input.metadata?.cceEnvelope?.capsule;
|
|
@@ -12666,8 +12782,12 @@ var require_tlv_parse_sensor = __commonJS({
|
|
|
12666
12782
|
this.name = "TLVParseSensor";
|
|
12667
12783
|
this.order = sensor_bands_1.BAND.CONTENT + 20;
|
|
12668
12784
|
}
|
|
12669
|
-
supports(input) {
|
|
12670
|
-
return !!input.packet
|
|
12785
|
+
async supports(input) {
|
|
12786
|
+
return !!input.packet ? { action: "ALLOW" } : {
|
|
12787
|
+
action: "DENY",
|
|
12788
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
12789
|
+
reason: "Packet is not available"
|
|
12790
|
+
};
|
|
12671
12791
|
}
|
|
12672
12792
|
async run(input) {
|
|
12673
12793
|
const packet = input.packet;
|
|
@@ -12799,9 +12919,13 @@ var require_tps_sensor = __commonJS({
|
|
|
12799
12919
|
this.maxDriftMs = options.maxDriftMs ?? 3e4;
|
|
12800
12920
|
this.resolver = options.resolver ?? parseINotation;
|
|
12801
12921
|
}
|
|
12802
|
-
supports(input) {
|
|
12922
|
+
async supports(input) {
|
|
12803
12923
|
const tps = input.metadata?.tps_coordinate ?? input.metadata?.tps ?? input.packet?.tps;
|
|
12804
|
-
return typeof tps === "string" && tps.length > 0
|
|
12924
|
+
return typeof tps === "string" && tps.length > 0 ? { action: "ALLOW" } : {
|
|
12925
|
+
action: "DENY",
|
|
12926
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
12927
|
+
reason: "TPS coordinate not available"
|
|
12928
|
+
};
|
|
12805
12929
|
}
|
|
12806
12930
|
async run(input) {
|
|
12807
12931
|
const tps = input.metadata?.tps_coordinate ?? input.metadata?.tps ?? input.packet?.tps;
|
|
@@ -12867,8 +12991,12 @@ var require_varint_hardening_sensor = __commonJS({
|
|
|
12867
12991
|
this.order = sensor_bands_1.BAND.WIRE + 35;
|
|
12868
12992
|
this.MAX_VARINT_BYTES = 5;
|
|
12869
12993
|
}
|
|
12870
|
-
supports(input) {
|
|
12871
|
-
return !!input.peek && input.peek.length >= 7
|
|
12994
|
+
async supports(input) {
|
|
12995
|
+
return !!input.peek && input.peek.length >= 7 ? { action: "ALLOW" } : {
|
|
12996
|
+
action: "DENY",
|
|
12997
|
+
code: "SENSOR_NOT_APPLICABLE",
|
|
12998
|
+
reason: "Insufficient peek data for varint hardening"
|
|
12999
|
+
};
|
|
12872
13000
|
}
|
|
12873
13001
|
async run(input) {
|
|
12874
13002
|
const peek = input.peek;
|