mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 21:40:31 +00:00
feat(audit-log-stream): cribl support
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
CriblProviderListItemSchema,
|
||||
SanitizedCriblProviderSchema
|
||||
} from "@app/ee/services/audit-log-stream/cribl/cribl-provider-schemas";
|
||||
import {
|
||||
CustomProviderListItemSchema,
|
||||
SanitizedCustomProviderSchema
|
||||
@@ -19,13 +23,15 @@ import { AuthMode } from "@app/services/auth/auth-type";
|
||||
const SanitizedAuditLogStreamSchema = z.union([
|
||||
SanitizedCustomProviderSchema,
|
||||
SanitizedDatadogProviderSchema,
|
||||
SanitizedSplunkProviderSchema
|
||||
SanitizedSplunkProviderSchema,
|
||||
SanitizedCriblProviderSchema
|
||||
]);
|
||||
|
||||
const ProviderOptionsSchema = z.discriminatedUnion("provider", [
|
||||
CustomProviderListItemSchema,
|
||||
DatadogProviderListItemSchema,
|
||||
SplunkProviderListItemSchema
|
||||
SplunkProviderListItemSchema,
|
||||
CriblProviderListItemSchema
|
||||
]);
|
||||
|
||||
export const registerAuditLogStreamRouter = async (server: FastifyZodProvider) => {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { LogProvider } from "@app/ee/services/audit-log-stream/audit-log-stream-enums";
|
||||
import {
|
||||
CreateCriblProviderLogStreamSchema,
|
||||
SanitizedCriblProviderSchema,
|
||||
UpdateCriblProviderLogStreamSchema
|
||||
} from "@app/ee/services/audit-log-stream/cribl/cribl-provider-schemas";
|
||||
import {
|
||||
CreateCustomProviderLogStreamSchema,
|
||||
SanitizedCustomProviderSchema,
|
||||
@@ -47,5 +52,14 @@ export const AUDIT_LOG_STREAM_REGISTER_ROUTER_MAP: Record<LogProvider, (server:
|
||||
createSchema: CreateSplunkProviderLogStreamSchema,
|
||||
updateSchema: UpdateSplunkProviderLogStreamSchema
|
||||
});
|
||||
},
|
||||
[LogProvider.Cribl]: async (server: FastifyZodProvider) => {
|
||||
registerAuditLogStreamEndpoints({
|
||||
server,
|
||||
provider: LogProvider.Cribl,
|
||||
sanitizedResponseSchema: SanitizedCriblProviderSchema,
|
||||
createSchema: CreateCriblProviderLogStreamSchema,
|
||||
updateSchema: UpdateCriblProviderLogStreamSchema
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user