@nextera.one/axis-server-sdk 2.2.6 → 2.2.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.
@@ -27,6 +27,7 @@ var CCE_ERROR = {
27
27
  CAPSULE_NOT_YET_VALID: "CCE_CAPSULE_NOT_YET_VALID",
28
28
  CAPSULE_REVOKED: "CCE_CAPSULE_REVOKED",
29
29
  CAPSULE_CONSUMED: "CCE_CAPSULE_CONSUMED",
30
+ CAPSULE_NOT_VERIFIED: "CCE_CAPSULE_NOT_VERIFIED",
30
31
  // Binding errors
31
32
  AUDIENCE_MISMATCH: "CCE_AUDIENCE_MISMATCH",
32
33
  INTENT_MISMATCH: "CCE_INTENT_MISMATCH",
@@ -731,8 +732,12 @@ var CceEnvelopeValidationSensor = class {
731
732
  this.order = 5;
732
733
  this.phase = "PRE_DECODE";
733
734
  }
734
- supports(input) {
735
- return input.metadata?.cce === true || input.metadata?.contentType === "application/axis-cce";
735
+ async supports(input) {
736
+ return input.metadata?.cce === true || input.metadata?.contentType === "application/axis-cce" ? { action: "ALLOW" } : {
737
+ action: "DENY",
738
+ code: "SENSOR_NOT_APPLICABLE",
739
+ reason: "Not a CCE envelope"
740
+ };
736
741
  }
737
742
  async run(input) {
738
743
  const envelope = input.metadata?.cceEnvelope;
@@ -819,8 +824,12 @@ var CceClientSignatureSensor = class {
819
824
  this.order = 45;
820
825
  this.phase = "POST_DECODE";
821
826
  }
822
- supports(input) {
823
- return input.metadata?.cceEnvelopeValid === true;
827
+ async supports(input) {
828
+ return input.metadata?.cceEnvelopeValid === true ? { action: "ALLOW" } : {
829
+ action: "DENY",
830
+ code: "SENSOR_NOT_APPLICABLE",
831
+ reason: "CCE envelope not validated"
832
+ };
824
833
  }
825
834
  async run(input) {
826
835
  const envelope = input.metadata?.cceEnvelope;
@@ -896,8 +905,12 @@ var CceCapsuleVerificationSensor = class {
896
905
  this.order = 50;
897
906
  this.phase = "POST_DECODE";
898
907
  }
899
- supports(input) {
900
- return input.metadata?.cceEnvelopeValid === true;
908
+ async supports(input) {
909
+ return input.metadata?.cceEnvelopeValid === true ? { action: "ALLOW" } : {
910
+ action: "DENY",
911
+ code: CCE_ERROR.CAPSULE_NOT_VERIFIED,
912
+ reason: "CCE capsule not verified"
913
+ };
901
914
  }
902
915
  async run(input) {
903
916
  const capsule = input.metadata?.cceEnvelope?.capsule;
@@ -1010,8 +1023,12 @@ var CceTpsWindowSensor = class {
1010
1023
  this.order = 92;
1011
1024
  this.phase = "POST_DECODE";
1012
1025
  }
1013
- supports(input) {
1014
- return input.metadata?.cceCapsuleVerified === true;
1026
+ async supports(input) {
1027
+ return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1028
+ action: "DENY",
1029
+ code: "SENSOR_NOT_APPLICABLE",
1030
+ reason: "CCE capsule not verified"
1031
+ };
1015
1032
  }
1016
1033
  async run(input) {
1017
1034
  const capsule = input.metadata?.cceCapsule;
@@ -1063,8 +1080,12 @@ var CceAudienceIntentBindingSensor = class {
1063
1080
  this.order = 95;
1064
1081
  this.phase = "POST_DECODE";
1065
1082
  }
1066
- supports(input) {
1067
- return input.metadata?.cceCapsuleVerified === true;
1083
+ async supports(input) {
1084
+ return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1085
+ action: "DENY",
1086
+ code: CCE_ERROR.CAPSULE_NOT_VERIFIED,
1087
+ reason: "CCE capsule not verified"
1088
+ };
1068
1089
  }
1069
1090
  async run(input) {
1070
1091
  const capsule = input.metadata?.cceCapsule;
@@ -1160,8 +1181,12 @@ var CceReplayProtectionSensor = class {
1160
1181
  this.phase = "POST_DECODE";
1161
1182
  this.nonceTtlMs = options?.nonceTtlMs ?? 5 * 60 * 1e3;
1162
1183
  }
1163
- supports(input) {
1164
- return input.metadata?.cceCapsuleVerified === true;
1184
+ async supports(input) {
1185
+ return input.metadata?.cceCapsuleVerified === true ? { action: "ALLOW" } : {
1186
+ action: "DENY",
1187
+ code: "SENSOR_NOT_APPLICABLE",
1188
+ reason: "CCE capsule not verified"
1189
+ };
1165
1190
  }
1166
1191
  async run(input) {
1167
1192
  const capsule = input.metadata?.cceCapsule;
@@ -1240,8 +1265,12 @@ var CcePayloadDecryptionSensor = class {
1240
1265
  this.order = 145;
1241
1266
  this.phase = "POST_DECODE";
1242
1267
  }
1243
- supports(input) {
1244
- return input.metadata?.cceEnvelopeValid === true && input.metadata?.cceClientSigVerified === true && input.metadata?.cceCapsuleVerified === true && input.metadata?.cceReplayClean === true;
1268
+ async supports(input) {
1269
+ return input.metadata?.cceEnvelopeValid === true && input.metadata?.cceClientSigVerified === true && input.metadata?.cceCapsuleVerified === true && input.metadata?.cceReplayClean === true ? { action: "ALLOW" } : {
1270
+ action: "DENY",
1271
+ code: "SENSOR_NOT_APPLICABLE",
1272
+ reason: "CCE preconditions not met"
1273
+ };
1245
1274
  }
1246
1275
  async run(input) {
1247
1276
  const envelope = input.metadata?.cceEnvelope;