Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: resolved migration failing due to json

=1e4164e1c24b
diff --git a/backend/src/db/migrations/20241129180030_identity-k8-auth-to-kms.ts b/backend/src/db/migrations/20241129180030_identity-k8-auth-to-kms.ts
index 2bbe8022bd..b1b3a7ec10 100644
--- a/backend/src/db/migrations/20241129180030_identity-k8-auth-to-kms.ts
+++ b/backend/src/db/migrations/20241129180030_identity-k8-auth-to-kms.ts
@@ -137,7 +137,12 @@ const reencryptIdentityK8sAuth = async (knex: Knex) => {
plainText: Buffer.from(decryptedCertificate)
}).cipherTextBlob;
- return { ...el, encryptedKubernetesCaCertificate, encryptedKubernetesTokenReviewerJwt };
+ return {
+ ...el,
+ accessTokenTrustedIps: JSON.stringify(el.accessTokenTrustedIps),
+ encryptedKubernetesCaCertificate,
+ encryptedKubernetesTokenReviewerJwt
+ };
}
)
);
diff --git a/backend/src/db/migrations/20241129180053_identity-oidc-auth-to-kms.ts b/backend/src/db/migrations/20241129180053_identity-oidc-auth-to-kms.ts
index 4aed557d50..e4947b2963 100644
--- a/backend/src/db/migrations/20241129180053_identity-oidc-auth-to-kms.ts
+++ b/backend/src/db/migrations/20241129180053_identity-oidc-auth-to-kms.ts
@@ -96,7 +96,11 @@ const reencryptIdentityOidcAuth = async (knex: Knex) => {
plainText: Buffer.from(decryptedCertificate)
}).cipherTextBlob;
- return { ...el, encryptedCaCertificate };
+ return {
+ ...el,
+ accessTokenTrustedIps: JSON.stringify(el.accessTokenTrustedIps),
+ encryptedCaCertificate
+ };
}
)
);
diff --git a/backend/src/server/routes/v1/identity-oidc-auth-router.ts b/backend/src/server/routes/v1/identity-oidc-auth-router.ts
index 799784e45b..7ce0b05b75 100644
--- a/backend/src/server/routes/v1/identity-oidc-auth-router.ts
+++ b/backend/src/server/routes/v1/identity-oidc-auth-router.ts
@@ -12,7 +12,7 @@ import {
validateOidcBoundClaimsField
} from "@app/services/identity-oidc-auth/identity-oidc-auth-validators";
-const IdentityOidcAuthResponseSchema = IdentityOidcAuthsSchema.omit({
+const IdentityOidcAuthResponseSchema = IdentityOidcAuthsSchema.pick({
id: true,
accessTokenTTL: true,
accessTokenMaxTTL: true,