Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
misc: add support for number field values
Sheen Capadngan8713643bc1e2
diff --git a/backend/src/services/identity-jwt-auth/identity-jwt-auth-fns.ts b/backend/src/services/identity-jwt-auth/identity-jwt-auth-fns.tsindex 40fc87787b..57aa933d68 100644--- a/backend/src/services/identity-jwt-auth/identity-jwt-auth-fns.ts+++ b/backend/src/services/identity-jwt-auth/identity-jwt-auth-fns.ts@@ -1,9 +1,13 @@import picomatch from "picomatch";-export const doesFieldValueMatchJwtPolicy = (fieldValue: string | boolean, policyValue: string) => {+export const doesFieldValueMatchJwtPolicy = (fieldValue: string | boolean | number, policyValue: string) => {if (typeof fieldValue === "boolean") {return fieldValue === (policyValue === "true");}+ if (typeof fieldValue === "number") {+ return fieldValue === parseInt(policyValue, 10);+ }+return policyValue === fieldValue || picomatch.isMatch(fieldValue, policyValue);};diff --git a/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.ts b/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.tsindex 35c40643c3..5f8fc5ff6c 100644--- a/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.ts+++ b/backend/src/services/identity-jwt-auth/identity-jwt-auth-service.ts@@ -75,7 +75,7 @@ export const identityJwtAuthServiceFactory = ({});}- let tokenData: Record<string, string | boolean> = {};+ let tokenData: Record<string, string | boolean | number> = {};if (identityJwtAuth.configurationType === JwtConfigurationType.JWKS) {const decryptedJwksCaCert = orgDataKeyDecryptor({