@continuous-excellence/ze-great-dashboard-aws 0.31.35 → 0.31.36
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/lambda.mjs +63 -58
- package/package.json +1 -1
package/dist/lambda.mjs
CHANGED
|
@@ -26418,7 +26418,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
26418
26418
|
Region: { type: "builtInParams", name: "region" },
|
|
26419
26419
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
26420
26420
|
};
|
|
26421
|
-
var version2 = "3.
|
|
26421
|
+
var version2 = "3.1153.0";
|
|
26422
26422
|
var packageInfo = {
|
|
26423
26423
|
version: version2
|
|
26424
26424
|
};
|
|
@@ -28209,7 +28209,7 @@ var require_dist_cjs17 = __commonJS({
|
|
|
28209
28209
|
Region: { type: "builtInParams", name: "region" },
|
|
28210
28210
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
28211
28211
|
};
|
|
28212
|
-
var version2 = "3.
|
|
28212
|
+
var version2 = "3.1153.0";
|
|
28213
28213
|
var packageInfo = {
|
|
28214
28214
|
version: version2
|
|
28215
28215
|
};
|
|
@@ -73489,7 +73489,7 @@ function safeOrigin(value) {
|
|
|
73489
73489
|
var encoder2 = new TextEncoder();
|
|
73490
73490
|
var decoder = new TextDecoder();
|
|
73491
73491
|
var strictDecoder = new TextDecoder("utf-8", { fatal: true });
|
|
73492
|
-
var
|
|
73492
|
+
var UINT32_RANGE = 2 ** 32;
|
|
73493
73493
|
function concat(...buffers) {
|
|
73494
73494
|
const size = buffers.reduce((acc, { length }) => acc + length, 0), buf2 = new Uint8Array(size);
|
|
73495
73495
|
let i5 = 0;
|
|
@@ -73640,23 +73640,23 @@ function isDisjoint(...headers) {
|
|
|
73640
73640
|
function decodeBase64url(value, label, ErrorClass) {
|
|
73641
73641
|
try {
|
|
73642
73642
|
return decode3(value);
|
|
73643
|
-
} catch {
|
|
73644
|
-
throw new ErrorClass(`Failed to base64url decode the ${label}
|
|
73643
|
+
} catch (cause) {
|
|
73644
|
+
throw new ErrorClass(`Failed to base64url decode the ${label}`, { cause });
|
|
73645
73645
|
}
|
|
73646
73646
|
}
|
|
73647
|
-
function
|
|
73647
|
+
function encodeAsciiMember(value, label, ErrorClass) {
|
|
73648
73648
|
try {
|
|
73649
73649
|
return encode3(value);
|
|
73650
|
-
} catch {
|
|
73651
|
-
throw new ErrorClass(`The ${label} is not a valid base64url string
|
|
73650
|
+
} catch (cause) {
|
|
73651
|
+
throw new ErrorClass(`The ${label} is not a valid base64url string`, { cause });
|
|
73652
73652
|
}
|
|
73653
73653
|
}
|
|
73654
|
-
function parseJoseHeader(
|
|
73654
|
+
function parseJoseHeader(encodedProtectedHeader, ErrorClass, message2) {
|
|
73655
73655
|
let parsed;
|
|
73656
73656
|
try {
|
|
73657
|
-
parsed = JSON.parse(strictDecoder.decode(decode3(
|
|
73658
|
-
} catch {
|
|
73659
|
-
throw new ErrorClass(message2);
|
|
73657
|
+
parsed = JSON.parse(strictDecoder.decode(decode3(encodedProtectedHeader)));
|
|
73658
|
+
} catch (cause) {
|
|
73659
|
+
throw new ErrorClass(message2, { cause });
|
|
73660
73660
|
}
|
|
73661
73661
|
if (!isObject2(parsed))
|
|
73662
73662
|
throw new ErrorClass(message2);
|
|
@@ -73714,15 +73714,15 @@ var jwkMatchesOp = (entry, key, usage) => {
|
|
|
73714
73714
|
}
|
|
73715
73715
|
};
|
|
73716
73716
|
async function prepareKey(entry, key, usage) {
|
|
73717
|
-
const { alg, secret } = entry,
|
|
73717
|
+
const { alg, secret } = entry, requiresPrivateKey = usage === "decrypt" || usage === "sign";
|
|
73718
73718
|
if (secret && key instanceof Uint8Array)
|
|
73719
73719
|
return key;
|
|
73720
73720
|
let normalized, keyObject;
|
|
73721
73721
|
if (isObject2(key)) {
|
|
73722
73722
|
if (normalized = normalizeJwk(key), typeof normalized.kty != "string")
|
|
73723
73723
|
throw invalidKeyType(alg, key, secret);
|
|
73724
|
-
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (
|
|
73725
|
-
throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${
|
|
73724
|
+
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (requiresPrivateKey ? normalized.kty === "AKP" && typeof normalized.priv == "string" || typeof normalized.d == "string" : normalized.d === void 0 && normalized.priv === void 0)))
|
|
73725
|
+
throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${requiresPrivateKey ? "private" : "public"} JWK`);
|
|
73726
73726
|
if (jwkMatchesOp(entry, normalized, usage), normalized.kty === "oct")
|
|
73727
73727
|
return decode3(normalized.k);
|
|
73728
73728
|
if (!Object.isFrozen(key)) {
|
|
@@ -73732,7 +73732,7 @@ async function prepareKey(entry, key, usage) {
|
|
|
73732
73732
|
} else {
|
|
73733
73733
|
if (!isKeyLike(key))
|
|
73734
73734
|
throw invalidKeyType(alg, key, secret);
|
|
73735
|
-
const expectedType = secret ? "secret" :
|
|
73735
|
+
const expectedType = secret ? "secret" : requiresPrivateKey ? "private" : "public";
|
|
73736
73736
|
if (key.type !== expectedType && (secret || ["secret", "public", "private"].includes(key.type)))
|
|
73737
73737
|
throw new TypeError(`${tag(key)} instances must be of type "${expectedType}" for the ${alg} algorithm`);
|
|
73738
73738
|
if (isCryptoKey(key))
|
|
@@ -73870,8 +73870,8 @@ function eddsa() {
|
|
|
73870
73870
|
usages: sig
|
|
73871
73871
|
};
|
|
73872
73872
|
}
|
|
73873
|
-
function mldsa(
|
|
73874
|
-
const subtle2 = { name: `ML-DSA-${
|
|
73873
|
+
function mldsa(parameterSet) {
|
|
73874
|
+
const subtle2 = { name: `ML-DSA-${parameterSet}` };
|
|
73875
73875
|
return {
|
|
73876
73876
|
kty: ["AKP"],
|
|
73877
73877
|
subtle: subtle2,
|
|
@@ -73909,21 +73909,23 @@ function jwsAlgorithm(alg) {
|
|
|
73909
73909
|
function prepareVerify(options) {
|
|
73910
73910
|
return [options && validateAlgorithms("algorithms", options.algorithms), options?.crit];
|
|
73911
73911
|
}
|
|
73912
|
-
function parseProtectedHeader(
|
|
73913
|
-
return
|
|
73912
|
+
function parseProtectedHeader(encodedProtectedHeader) {
|
|
73913
|
+
return encodedProtectedHeader === void 0 ? {} : parseJoseHeader(encodedProtectedHeader, JWSInvalid, "JWS Protected Header is invalid");
|
|
73914
73914
|
}
|
|
73915
73915
|
function encodeCompactUnencodedPayload(payload2) {
|
|
73916
73916
|
try {
|
|
73917
73917
|
return encode3(payload2);
|
|
73918
|
-
} catch {
|
|
73919
|
-
throw new JWSInvalid("JWS Compact Serialization payload must use only ASCII characters"
|
|
73918
|
+
} catch (cause) {
|
|
73919
|
+
throw new JWSInvalid("JWS Compact Serialization payload must use only ASCII characters", {
|
|
73920
|
+
cause
|
|
73921
|
+
});
|
|
73920
73922
|
}
|
|
73921
73923
|
}
|
|
73922
73924
|
async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedProtected) {
|
|
73923
|
-
const { protected:
|
|
73924
|
-
if (!isDisjoint(
|
|
73925
|
+
const { protected: encodedProtectedHeader, header, payload: inputPayload } = jws, protectedHeader = parsedProtected ?? parseProtectedHeader(encodedProtectedHeader);
|
|
73926
|
+
if (!isDisjoint(protectedHeader, header))
|
|
73925
73927
|
throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
73926
|
-
const joseHeader = { ...
|
|
73928
|
+
const joseHeader = { ...protectedHeader, ...header }, b64 = validateB64(protectedHeader, validateCrit(JWSInvalid, JWS_RECOGNIZED, shared[1], protectedHeader, joseHeader)), { alg } = joseHeader;
|
|
73927
73929
|
if (typeof alg != "string" || !alg)
|
|
73928
73930
|
throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
73929
73931
|
if (shared[0] && !shared[0].has(alg))
|
|
@@ -73935,18 +73937,19 @@ async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedP
|
|
|
73935
73937
|
throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");
|
|
73936
73938
|
const signingPayload = b64 || typeof inputPayload != "string" ? inputPayload : encodeUnencodedPayload(inputPayload);
|
|
73937
73939
|
let resolvedKey = false;
|
|
73938
|
-
typeof key == "function" && (key = await key(
|
|
73939
|
-
const entry = jwsAlgorithm(alg),
|
|
73940
|
+
typeof key == "function" && (key = await key(protectedHeader, jws), resolvedKey = true);
|
|
73941
|
+
const entry = jwsAlgorithm(alg), signingInput = concat(encodedProtectedHeader !== void 0 ? encode3(encodedProtectedHeader) : new Uint8Array(), encode3("."), typeof signingPayload == "string" ? shared[2] ??= encodeAsciiMember(signingPayload, "payload", JWSInvalid) : signingPayload), signature = decodeBase64url(jws.signature, "signature", JWSInvalid), verificationKey = await prepareKey(entry, key, "verify"), cryptoKey = await rawKey(verificationKey, entry.subtle, "verify");
|
|
73940
73942
|
entry.minRsaBits && checkModulusLength(entry.alg, cryptoKey);
|
|
73941
73943
|
let verified = false;
|
|
73942
73944
|
try {
|
|
73943
|
-
verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature,
|
|
73944
|
-
} catch {
|
|
73945
|
+
verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature, signingInput);
|
|
73946
|
+
} catch (cause) {
|
|
73947
|
+
throw new JWSSignatureVerificationFailed(void 0, { cause });
|
|
73945
73948
|
}
|
|
73946
73949
|
if (!verified)
|
|
73947
73950
|
throw new JWSSignatureVerificationFailed();
|
|
73948
73951
|
const result = { payload: typeof signingPayload == "string" ? decodeBase64url(signingPayload, "payload", JWSInvalid) : signingPayload };
|
|
73949
|
-
return
|
|
73952
|
+
return encodedProtectedHeader !== void 0 && (result.protectedHeader = protectedHeader), header !== void 0 && (result.unprotectedHeader = header), resolvedKey ? [{ ...result, key: verificationKey }, b64] : [result, b64];
|
|
73950
73953
|
}
|
|
73951
73954
|
async function verifyCompact(jws, shared, key) {
|
|
73952
73955
|
if (jws instanceof Uint8Array && (jws = decoder.decode(jws)), typeof jws != "string")
|
|
@@ -73976,8 +73979,8 @@ function secs(str) {
|
|
|
73976
73979
|
typeof str != "string" && invalidDuration();
|
|
73977
73980
|
const matched = REGEX.exec(str);
|
|
73978
73981
|
(!matched || matched[4] && matched[1]) && invalidDuration();
|
|
73979
|
-
const value = parseFloat(matched[2]),
|
|
73980
|
-
return Number.isFinite(
|
|
73982
|
+
const value = parseFloat(matched[2]), durationSeconds = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
|
|
73983
|
+
return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -durationSeconds : durationSeconds;
|
|
73981
73984
|
}
|
|
73982
73985
|
function validateInput(label, input2) {
|
|
73983
73986
|
if (!Number.isFinite(input2))
|
|
@@ -73989,34 +73992,35 @@ var normalizeTyp = (value) => {
|
|
|
73989
73992
|
return value.includes("/") ? normalized : `application/${normalized}`;
|
|
73990
73993
|
};
|
|
73991
73994
|
var checkAudiencePresence = (audPayload, audOption) => typeof audPayload == "string" ? audOption.includes(audPayload) : Array.isArray(audPayload) ? audOption.some((aud) => audPayload.includes(aud)) : false;
|
|
73992
|
-
function validateNumericDate(
|
|
73993
|
-
const value =
|
|
73995
|
+
function validateNumericDate(claimsSet, claim2, required2 = false) {
|
|
73996
|
+
const value = claimsSet[claim2];
|
|
73994
73997
|
if (!(value === void 0 && !required2)) {
|
|
73995
73998
|
if (typeof value != "number")
|
|
73996
|
-
throw new JWTClaimValidationFailed(`"${claim2}" claim must be a number`,
|
|
73999
|
+
throw new JWTClaimValidationFailed(`"${claim2}" claim must be a number`, claimsSet, claim2, "invalid");
|
|
73997
74000
|
return value;
|
|
73998
74001
|
}
|
|
73999
74002
|
}
|
|
74000
|
-
function unexpectedClaim(
|
|
74001
|
-
throw new JWTClaimValidationFailed(`unexpected "${claim2}" claim value`,
|
|
74003
|
+
function unexpectedClaim(claimsSet, claim2) {
|
|
74004
|
+
throw new JWTClaimValidationFailed(`unexpected "${claim2}" claim value`, claimsSet, claim2, checkFailed);
|
|
74002
74005
|
}
|
|
74003
|
-
function validateClaimsSet(protectedHeader,
|
|
74004
|
-
let
|
|
74006
|
+
function validateClaimsSet(protectedHeader, claimsSetBytes, options = {}) {
|
|
74007
|
+
let claimsSet;
|
|
74005
74008
|
try {
|
|
74006
|
-
|
|
74007
|
-
} catch {
|
|
74009
|
+
claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));
|
|
74010
|
+
} catch (cause) {
|
|
74011
|
+
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object", { cause });
|
|
74008
74012
|
}
|
|
74009
|
-
if (!isObject2(
|
|
74013
|
+
if (!isObject2(claimsSet))
|
|
74010
74014
|
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
|
|
74011
74015
|
const { typ } = options;
|
|
74012
74016
|
if (typ !== void 0 && (typeof protectedHeader.typ != "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ)))
|
|
74013
|
-
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value',
|
|
74017
|
+
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', claimsSet, "typ", checkFailed);
|
|
74014
74018
|
const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options, presenceCheck = [...requiredClaims];
|
|
74015
74019
|
maxTokenAge !== void 0 && presenceCheck.push("iat"), audience !== void 0 && presenceCheck.push("aud"), subject !== void 0 && presenceCheck.push("sub"), issuer !== void 0 && presenceCheck.push("iss");
|
|
74016
74020
|
for (const claim2 of new Set(presenceCheck.reverse()))
|
|
74017
|
-
if (!Object.hasOwn(
|
|
74018
|
-
throw new JWTClaimValidationFailed(`missing required "${claim2}" claim`,
|
|
74019
|
-
issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(
|
|
74021
|
+
if (!Object.hasOwn(claimsSet, claim2))
|
|
74022
|
+
throw new JWTClaimValidationFailed(`missing required "${claim2}" claim`, claimsSet, claim2, "missing");
|
|
74023
|
+
issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(claimsSet.iss) && unexpectedClaim(claimsSet, "iss"), subject !== void 0 && claimsSet.sub !== subject && unexpectedClaim(claimsSet, "sub"), audience !== void 0 && !checkAudiencePresence(claimsSet.aud, typeof audience == "string" ? [audience] : audience) && unexpectedClaim(claimsSet, "aud");
|
|
74020
74024
|
const { clockTolerance } = options;
|
|
74021
74025
|
let tolerance = 0;
|
|
74022
74026
|
if (typeof clockTolerance == "string")
|
|
@@ -74027,20 +74031,20 @@ function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
|
|
|
74027
74031
|
tolerance = clockTolerance;
|
|
74028
74032
|
}
|
|
74029
74033
|
validateInput("clockTolerance option", tolerance);
|
|
74030
|
-
const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(
|
|
74034
|
+
const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(claimsSet, "iat", maxTokenAge !== void 0), nbf = validateNumericDate(claimsSet, "nbf");
|
|
74031
74035
|
if (nbf !== void 0 && nbf > now + tolerance)
|
|
74032
|
-
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed',
|
|
74033
|
-
const exp = validateNumericDate(
|
|
74036
|
+
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', claimsSet, "nbf", checkFailed);
|
|
74037
|
+
const exp = validateNumericDate(claimsSet, "exp");
|
|
74034
74038
|
if (exp !== void 0 && exp <= now - tolerance)
|
|
74035
|
-
throw new JWTExpired('"exp" claim timestamp check failed',
|
|
74039
|
+
throw new JWTExpired('"exp" claim timestamp check failed', claimsSet, "exp", checkFailed);
|
|
74036
74040
|
if (maxTokenAge !== void 0) {
|
|
74037
74041
|
const age = now - iat, max = validateInput("maxTokenAge option", typeof maxTokenAge == "number" ? maxTokenAge : secs(maxTokenAge));
|
|
74038
74042
|
if (age - tolerance > max)
|
|
74039
|
-
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)',
|
|
74043
|
+
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', claimsSet, "iat", checkFailed);
|
|
74040
74044
|
if (age < -tolerance)
|
|
74041
|
-
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',
|
|
74045
|
+
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', claimsSet, "iat", checkFailed);
|
|
74042
74046
|
}
|
|
74043
|
-
return
|
|
74047
|
+
return claimsSet;
|
|
74044
74048
|
}
|
|
74045
74049
|
|
|
74046
74050
|
// node_modules/jose/dist/webapi/jwt/verify.js
|
|
@@ -74075,7 +74079,8 @@ function createLocalJWKSet(jwks) {
|
|
|
74075
74079
|
let snapshot;
|
|
74076
74080
|
try {
|
|
74077
74081
|
snapshot = structuredClone(jwks);
|
|
74078
|
-
} catch {
|
|
74082
|
+
} catch (cause) {
|
|
74083
|
+
throw new JWKSInvalid("JSON Web Key Set malformed", { cause });
|
|
74079
74084
|
}
|
|
74080
74085
|
if (!isJwkSet(snapshot))
|
|
74081
74086
|
throw new JWKSInvalid("JSON Web Key Set malformed");
|
|
@@ -74111,7 +74116,7 @@ function isCloudflareWorkers() {
|
|
|
74111
74116
|
return typeof WebSocketPair < "u" || typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers" || typeof EdgeRuntime < "u" && EdgeRuntime === "vercel";
|
|
74112
74117
|
}
|
|
74113
74118
|
var USER_AGENT2;
|
|
74114
|
-
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT2 = "jose/v6.2.
|
|
74119
|
+
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT2 = "jose/v6.2.13");
|
|
74115
74120
|
var customFetch = /* @__PURE__ */ Symbol();
|
|
74116
74121
|
async function fetchJwks(url2, headers, signal, fetchImpl = fetch) {
|
|
74117
74122
|
const response = await fetchImpl(url2, {
|
|
@@ -74120,14 +74125,14 @@ async function fetchJwks(url2, headers, signal, fetchImpl = fetch) {
|
|
|
74120
74125
|
redirect: "manual",
|
|
74121
74126
|
headers
|
|
74122
74127
|
}).catch((err) => {
|
|
74123
|
-
throw err.name === "TimeoutError" ? new JWKSTimeout() : err;
|
|
74128
|
+
throw err.name === "TimeoutError" ? new JWKSTimeout(void 0, { cause: err }) : err;
|
|
74124
74129
|
});
|
|
74125
74130
|
if (response.status !== 200)
|
|
74126
74131
|
throw new JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response");
|
|
74127
74132
|
try {
|
|
74128
74133
|
return await response.json();
|
|
74129
|
-
} catch {
|
|
74130
|
-
throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON");
|
|
74134
|
+
} catch (cause) {
|
|
74135
|
+
throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON", { cause });
|
|
74131
74136
|
}
|
|
74132
74137
|
}
|
|
74133
74138
|
var jwksCache = /* @__PURE__ */ Symbol();
|
package/package.json
CHANGED