mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
Merge
This commit is contained in:
@@ -509,7 +509,7 @@ export const getSecretsHelper = async ({
|
||||
throw UnauthorizedRequestError({ message: "Folder Permission Denied" });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!folderId) {
|
||||
folderId = await getFolderIdFromServiceToken(workspaceId, environment, secretPath);
|
||||
}
|
||||
@@ -583,7 +583,10 @@ export const getSecretsHelper = async ({
|
||||
}
|
||||
}
|
||||
|
||||
if (postHogClient) {
|
||||
const numberOfSignupSecrets = (secrets.filter((secret) => secret?.metadata?.source === "signup")).length;
|
||||
const atLeastOneNonSignUpSecret = (secrets.length - numberOfSignupSecrets > 0)
|
||||
|
||||
if (postHogClient && atLeastOneNonSignUpSecret) {
|
||||
const shouldCapture = authData.userAgent !== K8_USER_AGENT_NAME || shouldRecordK8Event;
|
||||
const approximateForNoneCapturedEvents = secrets.length * 10
|
||||
|
||||
|
||||
@@ -691,15 +691,17 @@ const syncSecretsAWSParameterStore = async ({
|
||||
const parameterList = (await ssm.getParametersByPath(params).promise()).Parameters;
|
||||
|
||||
let awsParameterStoreSecretsObj: {
|
||||
[key: string]: any; // TODO: fix type
|
||||
[key: string]: any;
|
||||
} = {};
|
||||
|
||||
if (parameterList) {
|
||||
awsParameterStoreSecretsObj = parameterList.reduce(
|
||||
(obj: any, secret: any) => ({
|
||||
...obj,
|
||||
[secret.Name.split("/").pop()]: secret
|
||||
}),
|
||||
(obj: any, secret: any) => {
|
||||
return ({
|
||||
...obj,
|
||||
[secret.Name.substring(integration.path.length)]: secret
|
||||
});
|
||||
},
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user