Skip to content

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

fix severity logs in a couple of places

Thiago Araujo da Silvaab90cdfae96b
diff --git a/backend/src/ee/services/audit-log-stream-outbox/audit-log-stream-outbox-service.ts b/backend/src/ee/services/audit-log-stream-outbox/audit-log-stream-outbox-service.ts
index 6d63a03d54..955e13892d 100644
--- a/backend/src/ee/services/audit-log-stream-outbox/audit-log-stream-outbox-service.ts
+++ b/backend/src/ee/services/audit-log-stream-outbox/audit-log-stream-outbox-service.ts
@@ -276,7 +276,7 @@ export const auditLogStreamOutboxServiceFactory = ({
const error = result.reason as Error;
const errorMessage = error?.message ?? "Unknown error";
const errorType = error?.name ?? "UnknownError";
- logger.error(
+ logger.warn(
{ errorType },
`audit-log-stream-outbox: batch delivery failed [streamId=${streamId}] [orgId=${orgId}] [provider=${provider}] [chunkSize=${chunk.length}]: ${errorMessage}`
);
diff --git a/backend/src/ee/services/resource-auth-method/aws-auth-fns.ts b/backend/src/ee/services/resource-auth-method/aws-auth-fns.ts
index 9be584e2e5..432925eced 100644
--- a/backend/src/ee/services/resource-auth-method/aws-auth-fns.ts
+++ b/backend/src/ee/services/resource-auth-method/aws-auth-fns.ts
@@ -151,7 +151,7 @@ export const validateAllowlists = ({
});
if (!isArnAllowed) {
- logger.error(
+ logger.warn(
`Resource AWS Auth Login: AWS principal ARN not allowed [principal-arn=${formattedArn}] [raw-arn=${Arn}] [resourceId=${String(errorContext.resourceId)}]`
);
throw new UnauthorizedError({
diff --git a/backend/src/services/identity-aws-auth/identity-aws-auth-service.ts b/backend/src/services/identity-aws-auth/identity-aws-auth-service.ts
index e22529eba2..f0977b4427 100644
--- a/backend/src/services/identity-aws-auth/identity-aws-auth-service.ts
+++ b/backend/src/services/identity-aws-auth/identity-aws-auth-service.ts
@@ -211,7 +211,7 @@ export const identityAwsAuthServiceFactory = ({
});
if (!isArnAllowed) {
- logger.error(
+ logger.warn(
`AWS Auth Login: AWS principal ARN not allowed [principal-arn=${formattedArn}] [raw-arn=${Arn}] [identity-id=${identity.id}]`
);
diff --git a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
index a5c06d255a..bc0689bcf8 100644
--- a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
+++ b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
@@ -429,7 +429,9 @@ export const identityKubernetesAuthServiceFactory = ({
const serviceAccountJwtFingerprint = getJwtFingerprintForLog(serviceAccountJwt);
if (err instanceof AxiosError) {
- logger.error(
+ const status = err.response?.status;
+ const level = status === 401 || status === 403 ? "warn" : "error";
+ logger[level](
{
host,
port,
@@ -449,7 +451,7 @@ export const identityKubernetesAuthServiceFactory = ({
);
}
- logger.error(
+ logger[isKnownError(err) ? "warn" : "error"](
{ error: err as Error, host, port, tokenReviewerJwtFingerprint, serviceAccountJwtFingerprint },
`tokenReviewCallbackRaw: Kubernetes token review request error (non-request error) [identityId=${identityKubernetesAuth.identityId}]`
);