mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 01:27:31 +00:00
patch encoding type for kms
This commit is contained in:
@@ -77,7 +77,7 @@ export const kmsServiceFactory = ({ kmsDAL, kmsRootConfigDAL, keyStore }: TKmsSe
|
|||||||
// This will switch to a seal process and HMS flow in future
|
// This will switch to a seal process and HMS flow in future
|
||||||
const encryptionKey = appCfg.ENCRYPTION_KEY || appCfg.ROOT_ENCRYPTION_KEY;
|
const encryptionKey = appCfg.ENCRYPTION_KEY || appCfg.ROOT_ENCRYPTION_KEY;
|
||||||
// if root key its base64 encoded
|
// if root key its base64 encoded
|
||||||
const isBase64 = Boolean(appCfg.ROOT_ENCRYPTION_KEY);
|
const isBase64 = !appCfg.ENCRYPTION_KEY;
|
||||||
if (!encryptionKey) throw new Error("Root encryption key not found for KMS service.");
|
if (!encryptionKey) throw new Error("Root encryption key not found for KMS service.");
|
||||||
const encryptionKeyBuffer = Buffer.from(encryptionKey, isBase64 ? "base64" : "utf8");
|
const encryptionKeyBuffer = Buffer.from(encryptionKey, isBase64 ? "base64" : "utf8");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user