@nextera.one/axis-server-sdk 2.3.5 → 2.3.7

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.
@@ -114,7 +114,7 @@ interface AxisSensor {
114
114
  readonly name: string;
115
115
  readonly order?: number;
116
116
  phase?: SensorPhaseMetadata | "PRE_DECODE" | "POST_DECODE";
117
- supports?(input: SensorInput): Promise<SensorDecision>;
117
+ supports?(input: SensorInput): boolean;
118
118
  run(input: SensorInput): Promise<SensorDecision>;
119
119
  }
120
120
  interface AxisSensorInit extends AxisSensor {
@@ -114,7 +114,7 @@ interface AxisSensor {
114
114
  readonly name: string;
115
115
  readonly order?: number;
116
116
  phase?: SensorPhaseMetadata | "PRE_DECODE" | "POST_DECODE";
117
- supports?(input: SensorInput): Promise<SensorDecision>;
117
+ supports?(input: SensorInput): boolean;
118
118
  run(input: SensorInput): Promise<SensorDecision>;
119
119
  }
120
120
  interface AxisSensorInit extends AxisSensor {
@@ -1,6 +1,6 @@
1
- import { C as CceCapsuleClaims, a as CceExecutionContext, b as CceRequestEnvelope } from '../cce-pipeline-CBt56guN.mjs';
2
- export { c as CCE_AES_KEY_BYTES, d as CCE_DERIVATION, e as CCE_ERROR, f as CCE_IV_BYTES, g as CCE_NONCE_BYTES, h as CCE_PROTOCOL_VERSION, i as CCE_TAG_BYTES, j as CceAlgorithm, k as CceAlgorithmDescriptor, l as CceAxisSigner, m as CceClientKeyEncryptor, n as CceConstraints, o as CceEncryptedKey, p as CceEncryptedPayload, q as CceError, r as CceErrorCode, s as CceHandler, t as CceHandlerContext, u as CceHandlerResult, v as CceKdfAlgorithm, w as CceKemAlgorithm, x as CcePipelineConfig, y as CcePipelineResult, z as CcePolicyContext, A as CcePolicyDecision, B as CcePolicyEvaluator, D as CceResponseEnvelope, E as CceResponseOptions, F as CceResponseStatus, G as CceSignature, H as CceVerificationState, I as CceWitnessRecord, J as CceWitnessStore, K as InMemoryCceWitnessStore, L as buildCceErrorResponse, M as buildCceResponse, N as buildWitnessRecord, O as executeCcePipeline, P as extractVerificationState } from '../cce-pipeline-CBt56guN.mjs';
3
- import { A as AxisSensor, S as SensorInput, a as SensorDecision } from '../axis-sensor-DMW4rfRg.mjs';
1
+ import { C as CceCapsuleClaims, a as CceExecutionContext, b as CceRequestEnvelope } from '../cce-pipeline-By7ps8_F.mjs';
2
+ export { c as CCE_AES_KEY_BYTES, d as CCE_DERIVATION, e as CCE_ERROR, f as CCE_IV_BYTES, g as CCE_NONCE_BYTES, h as CCE_PROTOCOL_VERSION, i as CCE_TAG_BYTES, j as CceAlgorithm, k as CceAlgorithmDescriptor, l as CceAxisSigner, m as CceClientKeyEncryptor, n as CceConstraints, o as CceEncryptedKey, p as CceEncryptedPayload, q as CceError, r as CceErrorCode, s as CceHandler, t as CceHandlerContext, u as CceHandlerResult, v as CceKdfAlgorithm, w as CceKemAlgorithm, x as CcePipelineConfig, y as CcePipelineResult, z as CcePolicyContext, A as CcePolicyDecision, B as CcePolicyEvaluator, D as CceResponseEnvelope, E as CceResponseOptions, F as CceResponseStatus, G as CceSignature, H as CceVerificationState, I as CceWitnessRecord, J as CceWitnessStore, K as InMemoryCceWitnessStore, L as buildCceErrorResponse, M as buildCceResponse, N as buildWitnessRecord, O as executeCcePipeline, P as extractVerificationState } from '../cce-pipeline-By7ps8_F.mjs';
3
+ import { A as AxisSensor, S as SensorInput, a as SensorDecision } from '../axis-sensor-BLUemDiZ.mjs';
4
4
 
5
5
  interface CceDerivationInput {
6
6
  axisLocalSecret: string;
@@ -40,7 +40,7 @@ declare class CcePayloadDecryptionSensor implements AxisSensor {
40
40
  readonly order = 145;
41
41
  readonly phase: "POST_DECODE";
42
42
  constructor(keyProvider: CceAxisKeyProvider, aesProvider: CceAesGcmProvider, maxPayloadBytes?: number, payloadValidator?: CcePayloadValidator | undefined);
43
- supports(input: SensorInput): Promise<SensorDecision>;
43
+ supports(input: SensorInput): boolean;
44
44
  run(input: SensorInput): Promise<SensorDecision>;
45
45
  }
46
46
 
@@ -62,7 +62,7 @@ declare class CceEnvelopeValidationSensor implements AxisSensor {
62
62
  readonly name = "cce.envelope.validation";
63
63
  readonly order = 5;
64
64
  readonly phase: "PRE_DECODE";
65
- supports(input: SensorInput): Promise<SensorDecision>;
65
+ supports(input: SensorInput): boolean;
66
66
  run(input: SensorInput): Promise<SensorDecision>;
67
67
  }
68
68
 
@@ -82,7 +82,7 @@ declare class CceClientSignatureSensor implements AxisSensor {
82
82
  readonly order = 45;
83
83
  readonly phase: "POST_DECODE";
84
84
  constructor(keyResolver: CceClientKeyResolver, signatureVerifier: CceSignatureVerifier);
85
- supports(input: SensorInput): Promise<SensorDecision>;
85
+ supports(input: SensorInput): boolean;
86
86
  run(input: SensorInput): Promise<SensorDecision>;
87
87
  }
88
88
 
@@ -105,7 +105,7 @@ declare class CceCapsuleVerificationSensor implements AxisSensor {
105
105
  readonly order = 50;
106
106
  readonly phase: "POST_DECODE";
107
107
  constructor(issuerKeyResolver: CceIssuerKeyResolver, capsuleVerifier: CceCapsuleSignatureVerifier);
108
- supports(input: SensorInput): Promise<SensorDecision>;
108
+ supports(input: SensorInput): boolean;
109
109
  run(input: SensorInput): Promise<SensorDecision>;
110
110
  }
111
111
 
@@ -115,7 +115,7 @@ declare class CceTpsWindowSensor implements AxisSensor {
115
115
  readonly order = 92;
116
116
  readonly phase: "POST_DECODE";
117
117
  constructor(skewMs?: number);
118
- supports(input: SensorInput): Promise<SensorDecision>;
118
+ supports(input: SensorInput): boolean;
119
119
  run(input: SensorInput): Promise<SensorDecision>;
120
120
  }
121
121
 
@@ -125,7 +125,7 @@ declare class CceAudienceIntentBindingSensor implements AxisSensor {
125
125
  readonly order = 95;
126
126
  readonly phase: "POST_DECODE";
127
127
  constructor(axisAudience: string);
128
- supports(input: SensorInput): Promise<SensorDecision>;
128
+ supports(input: SensorInput): boolean;
129
129
  run(input: SensorInput): Promise<SensorDecision>;
130
130
  }
131
131
 
@@ -155,7 +155,7 @@ declare class CceReplayProtectionSensor implements AxisSensor {
155
155
  constructor(replayStore: CceReplayStore, options?: {
156
156
  nonceTtlMs?: number;
157
157
  });
158
- supports(input: SensorInput): Promise<SensorDecision>;
158
+ supports(input: SensorInput): boolean;
159
159
  run(input: SensorInput): Promise<SensorDecision>;
160
160
  }
161
161
 
@@ -1,6 +1,6 @@
1
- import { C as CceCapsuleClaims, a as CceExecutionContext, b as CceRequestEnvelope } from '../cce-pipeline-BJ-F1isr.js';
2
- export { c as CCE_AES_KEY_BYTES, d as CCE_DERIVATION, e as CCE_ERROR, f as CCE_IV_BYTES, g as CCE_NONCE_BYTES, h as CCE_PROTOCOL_VERSION, i as CCE_TAG_BYTES, j as CceAlgorithm, k as CceAlgorithmDescriptor, l as CceAxisSigner, m as CceClientKeyEncryptor, n as CceConstraints, o as CceEncryptedKey, p as CceEncryptedPayload, q as CceError, r as CceErrorCode, s as CceHandler, t as CceHandlerContext, u as CceHandlerResult, v as CceKdfAlgorithm, w as CceKemAlgorithm, x as CcePipelineConfig, y as CcePipelineResult, z as CcePolicyContext, A as CcePolicyDecision, B as CcePolicyEvaluator, D as CceResponseEnvelope, E as CceResponseOptions, F as CceResponseStatus, G as CceSignature, H as CceVerificationState, I as CceWitnessRecord, J as CceWitnessStore, K as InMemoryCceWitnessStore, L as buildCceErrorResponse, M as buildCceResponse, N as buildWitnessRecord, O as executeCcePipeline, P as extractVerificationState } from '../cce-pipeline-BJ-F1isr.js';
3
- import { A as AxisSensor, S as SensorInput, a as SensorDecision } from '../axis-sensor-DMW4rfRg.js';
1
+ import { C as CceCapsuleClaims, a as CceExecutionContext, b as CceRequestEnvelope } from '../cce-pipeline-CVeMpuKr.js';
2
+ export { c as CCE_AES_KEY_BYTES, d as CCE_DERIVATION, e as CCE_ERROR, f as CCE_IV_BYTES, g as CCE_NONCE_BYTES, h as CCE_PROTOCOL_VERSION, i as CCE_TAG_BYTES, j as CceAlgorithm, k as CceAlgorithmDescriptor, l as CceAxisSigner, m as CceClientKeyEncryptor, n as CceConstraints, o as CceEncryptedKey, p as CceEncryptedPayload, q as CceError, r as CceErrorCode, s as CceHandler, t as CceHandlerContext, u as CceHandlerResult, v as CceKdfAlgorithm, w as CceKemAlgorithm, x as CcePipelineConfig, y as CcePipelineResult, z as CcePolicyContext, A as CcePolicyDecision, B as CcePolicyEvaluator, D as CceResponseEnvelope, E as CceResponseOptions, F as CceResponseStatus, G as CceSignature, H as CceVerificationState, I as CceWitnessRecord, J as CceWitnessStore, K as InMemoryCceWitnessStore, L as buildCceErrorResponse, M as buildCceResponse, N as buildWitnessRecord, O as executeCcePipeline, P as extractVerificationState } from '../cce-pipeline-CVeMpuKr.js';
3
+ import { A as AxisSensor, S as SensorInput, a as SensorDecision } from '../axis-sensor-BLUemDiZ.js';
4
4
 
5
5
  interface CceDerivationInput {
6
6
  axisLocalSecret: string;
@@ -40,7 +40,7 @@ declare class CcePayloadDecryptionSensor implements AxisSensor {
40
40
  readonly order = 145;
41
41
  readonly phase: "POST_DECODE";
42
42
  constructor(keyProvider: CceAxisKeyProvider, aesProvider: CceAesGcmProvider, maxPayloadBytes?: number, payloadValidator?: CcePayloadValidator | undefined);
43
- supports(input: SensorInput): Promise<SensorDecision>;
43
+ supports(input: SensorInput): boolean;
44
44
  run(input: SensorInput): Promise<SensorDecision>;
45
45
  }
46
46
 
@@ -62,7 +62,7 @@ declare class CceEnvelopeValidationSensor implements AxisSensor {
62
62
  readonly name = "cce.envelope.validation";
63
63
  readonly order = 5;
64
64
  readonly phase: "PRE_DECODE";
65
- supports(input: SensorInput): Promise<SensorDecision>;
65
+ supports(input: SensorInput): boolean;
66
66
  run(input: SensorInput): Promise<SensorDecision>;
67
67
  }
68
68
 
@@ -82,7 +82,7 @@ declare class CceClientSignatureSensor implements AxisSensor {
82
82
  readonly order = 45;
83
83
  readonly phase: "POST_DECODE";
84
84
  constructor(keyResolver: CceClientKeyResolver, signatureVerifier: CceSignatureVerifier);
85
- supports(input: SensorInput): Promise<SensorDecision>;
85
+ supports(input: SensorInput): boolean;
86
86
  run(input: SensorInput): Promise<SensorDecision>;
87
87
  }
88
88
 
@@ -105,7 +105,7 @@ declare class CceCapsuleVerificationSensor implements AxisSensor {
105
105
  readonly order = 50;
106
106
  readonly phase: "POST_DECODE";
107
107
  constructor(issuerKeyResolver: CceIssuerKeyResolver, capsuleVerifier: CceCapsuleSignatureVerifier);
108
- supports(input: SensorInput): Promise<SensorDecision>;
108
+ supports(input: SensorInput): boolean;
109
109
  run(input: SensorInput): Promise<SensorDecision>;
110
110
  }
111
111
 
@@ -115,7 +115,7 @@ declare class CceTpsWindowSensor implements AxisSensor {
115
115
  readonly order = 92;
116
116
  readonly phase: "POST_DECODE";
117
117
  constructor(skewMs?: number);
118
- supports(input: SensorInput): Promise<SensorDecision>;
118
+ supports(input: SensorInput): boolean;
119
119
  run(input: SensorInput): Promise<SensorDecision>;
120
120
  }
121
121
 
@@ -125,7 +125,7 @@ declare class CceAudienceIntentBindingSensor implements AxisSensor {
125
125
  readonly order = 95;
126
126
  readonly phase: "POST_DECODE";
127
127
  constructor(axisAudience: string);
128
- supports(input: SensorInput): Promise<SensorDecision>;
128
+ supports(input: SensorInput): boolean;
129
129
  run(input: SensorInput): Promise<SensorDecision>;
130
130
  }
131
131
 
@@ -155,7 +155,7 @@ declare class CceReplayProtectionSensor implements AxisSensor {
155
155
  constructor(replayStore: CceReplayStore, options?: {
156
156
  nonceTtlMs?: number;
157
157
  });
158
- supports(input: SensorInput): Promise<SensorDecision>;
158
+ supports(input: SensorInput): boolean;
159
159
  run(input: SensorInput): Promise<SensorDecision>;
160
160
  }
161
161
 
package/dist/cce/index.js CHANGED
@@ -791,13 +791,13 @@ var CceEnvelopeValidationSensor = class {
791
791
  this.order = 5;
792
792
  this.phase = "PRE_DECODE";
793
793
  }
794
- async supports(input) {
795
- return input.metadata?.cce === true || input.metadata?.contentType === "application/axis-cce" ? { action: "ALLOW" } : {
796
- action: "DENY",
797
- code: "SENSOR_NOT_APPLICABLE",
798
- reason: "Not a CCE envelope"
799
- };
794
+ // supports() is a synchronous applicability gate.
795
+ // Return false to skip this sensor without producing a denial.
796
+ supports(input) {
797
+ return input.metadata?.cce === true || input.metadata?.contentType === "application/axis-cce";
800
798
  }
799
+ // run() executes only after supports() passes.
800
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
801
801
  async run(input) {
802
802
  const envelope = input.metadata?.cceEnvelope;
803
803
  if (!envelope) {
@@ -883,13 +883,13 @@ var CceClientSignatureSensor = class {
883
883
  this.order = 45;
884
884
  this.phase = "POST_DECODE";
885
885
  }
886
- async supports(input) {
887
- return input.metadata?.cceEnvelopeValid === true ? { action: "ALLOW" } : {
888
- action: "DENY",
889
- code: "SENSOR_NOT_APPLICABLE",
890
- reason: "CCE envelope not validated"
891
- };
886
+ // supports() is a synchronous applicability gate.
887
+ // Return false to skip this sensor without producing a denial.
888
+ supports(input) {
889
+ return input.metadata?.cceEnvelopeValid === true;
892
890
  }
891
+ // run() executes only after supports() passes.
892
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
893
893
  async run(input) {
894
894
  const envelope = input.metadata?.cceEnvelope;
895
895
  if (!envelope) {
@@ -964,13 +964,13 @@ var CceCapsuleVerificationSensor = class {
964
964
  this.order = 50;
965
965
  this.phase = "POST_DECODE";
966
966
  }
967
- async supports(input) {
968
- return input.metadata?.cceEnvelopeValid === true ? { action: "ALLOW" } : {
969
- action: "DENY",
970
- code: CCE_ERROR.CAPSULE_NOT_VERIFIED,
971
- reason: "CCE capsule not verified"
972
- };
967
+ // supports() is a synchronous applicability gate.
968
+ // Return false to skip this sensor without producing a denial.
969
+ supports(input) {
970
+ return input.metadata?.cceEnvelopeValid === true;
973
971
  }
972
+ // run() executes only after supports() passes.
973
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
974
974
  async run(input) {
975
975
  const capsule = input.metadata?.cceEnvelope?.capsule;
976
976
  if (!capsule) {
@@ -1082,13 +1082,13 @@ var CceTpsWindowSensor = class {
1082
1082
  this.order = 92;
1083
1083
  this.phase = "POST_DECODE";
1084
1084
  }
1085
- async supports(input) {
1086
- return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1087
- action: "DENY",
1088
- code: "SENSOR_NOT_APPLICABLE",
1089
- reason: "CCE capsule not verified"
1090
- };
1085
+ // supports() is a synchronous applicability gate.
1086
+ // Return false to skip this sensor without producing a denial.
1087
+ supports(input) {
1088
+ return input.metadata?.cceCapsuleVerified === true;
1091
1089
  }
1090
+ // run() executes only after supports() passes.
1091
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1092
1092
  async run(input) {
1093
1093
  const capsule = input.metadata?.cceCapsule;
1094
1094
  if (!capsule) {
@@ -1139,13 +1139,13 @@ var CceAudienceIntentBindingSensor = class {
1139
1139
  this.order = 95;
1140
1140
  this.phase = "POST_DECODE";
1141
1141
  }
1142
- async supports(input) {
1143
- return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1144
- action: "DENY",
1145
- code: CCE_ERROR.CAPSULE_NOT_VERIFIED,
1146
- reason: "CCE capsule not verified"
1147
- };
1142
+ // supports() is a synchronous applicability gate.
1143
+ // Return false to skip this sensor without producing a denial.
1144
+ supports(input) {
1145
+ return input.metadata?.cceCapsuleVerified === true;
1148
1146
  }
1147
+ // run() executes only after supports() passes.
1148
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1149
1149
  async run(input) {
1150
1150
  const capsule = input.metadata?.cceCapsule;
1151
1151
  const envelope = input.metadata?.cceEnvelope;
@@ -1240,13 +1240,13 @@ var CceReplayProtectionSensor = class {
1240
1240
  this.phase = "POST_DECODE";
1241
1241
  this.nonceTtlMs = options?.nonceTtlMs ?? 5 * 60 * 1e3;
1242
1242
  }
1243
- async supports(input) {
1244
- return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1245
- action: "DENY",
1246
- code: "SENSOR_NOT_APPLICABLE",
1247
- reason: "CCE capsule not verified"
1248
- };
1243
+ // supports() is a synchronous applicability gate.
1244
+ // Return false to skip this sensor without producing a denial.
1245
+ supports(input) {
1246
+ return input.metadata?.cceCapsuleVerified === true;
1249
1247
  }
1248
+ // run() executes only after supports() passes.
1249
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1250
1250
  async run(input) {
1251
1251
  const capsule = input.metadata?.cceCapsule;
1252
1252
  const envelope = input.metadata?.cceEnvelope;
@@ -1324,13 +1324,13 @@ var CcePayloadDecryptionSensor = class {
1324
1324
  this.order = 145;
1325
1325
  this.phase = "POST_DECODE";
1326
1326
  }
1327
- async supports(input) {
1328
- return input.metadata?.cceEnvelopeValid === true && input.metadata?.cceClientSigVerified === true && input.metadata?.cceCapsuleVerified === true && input.metadata?.cceReplayClean === true ? { action: "ALLOW" } : {
1329
- action: "DENY",
1330
- code: "SENSOR_NOT_APPLICABLE",
1331
- reason: "CCE preconditions not met"
1332
- };
1327
+ // supports() is a synchronous applicability gate.
1328
+ // Return false to skip this sensor without producing a denial.
1329
+ supports(input) {
1330
+ return input.metadata?.cceEnvelopeValid === true && input.metadata?.cceClientSigVerified === true && input.metadata?.cceCapsuleVerified === true && input.metadata?.cceReplayClean === true;
1333
1331
  }
1332
+ // run() executes only after supports() passes.
1333
+ // Return the actual ALLOW/DENY/FLAG/THROTTLE decision here.
1334
1334
  async run(input) {
1335
1335
  const envelope = input.metadata?.cceEnvelope;
1336
1336
  if (!envelope) {