mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #2289 from akhilmhdh/feat/replication-test
feat: added log point for aws tag and check for delete secret in bridge
This commit is contained in:
@@ -645,6 +645,10 @@ const syncSecretsAWSParameterStore = async ({
|
|||||||
})
|
})
|
||||||
.promise();
|
.promise();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
logger.error(
|
||||||
|
err,
|
||||||
|
`getIntegrationSecrets: create secret in AWS SSM for failed [projectId=${projectId}] [environment=${integration.environment.slug}] [secretPath=${integration.secretPath}] [key=${key}]`
|
||||||
|
);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
if ((err as any).code === "AccessDeniedException") {
|
if ((err as any).code === "AccessDeniedException") {
|
||||||
logger.error(
|
logger.error(
|
||||||
@@ -691,6 +695,10 @@ const syncSecretsAWSParameterStore = async ({
|
|||||||
})
|
})
|
||||||
.promise();
|
.promise();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
logger.error(
|
||||||
|
err,
|
||||||
|
`getIntegrationSecrets: update secret in AWS SSM for failed [projectId=${projectId}] [environment=${integration.environment.slug}] [secretPath=${integration.secretPath}] [key=${key}]`
|
||||||
|
);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
if ((err as any).code === "AccessDeniedException") {
|
if ((err as any).code === "AccessDeniedException") {
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|||||||
@@ -378,6 +378,18 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
throw new BadRequestError({ message: "Must be user to delete personal secret" });
|
throw new BadRequestError({ message: "Must be user to delete personal secret" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const secretToDelete = await secretDAL.findOne({
|
||||||
|
key: inputSecret.secretName,
|
||||||
|
folderId,
|
||||||
|
...(inputSecret.type === SecretType.Shared
|
||||||
|
? {}
|
||||||
|
: {
|
||||||
|
type: SecretType.Personal,
|
||||||
|
userId: actorId
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (!secretToDelete) throw new NotFoundError({ message: "Secret not found" });
|
||||||
|
|
||||||
const deletedSecret = await secretDAL.transaction(async (tx) =>
|
const deletedSecret = await secretDAL.transaction(async (tx) =>
|
||||||
fnSecretBulkDelete({
|
fnSecretBulkDelete({
|
||||||
projectId,
|
projectId,
|
||||||
|
|||||||
@@ -728,7 +728,10 @@ export const secretQueueFactory = ({
|
|||||||
isSynced: response?.isSynced ?? true
|
isSynced: response?.isSynced ?? true
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.info("Secret integration sync error: %o", err);
|
logger.error(
|
||||||
|
err,
|
||||||
|
`Secret integration sync error [projectId=${job.data.projectId}] [environment=${job.data.environment}] [secretPath=${job.data.secretPath}]`
|
||||||
|
);
|
||||||
|
|
||||||
const message =
|
const message =
|
||||||
(err instanceof AxiosError ? JSON.stringify(err?.response?.data) : (err as Error)?.message) ||
|
(err instanceof AxiosError ? JSON.stringify(err?.response?.data) : (err as Error)?.message) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user