mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 15:31:19 +00:00
feat(audit-log-stream): azure support
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
AzureProviderListItemSchema,
|
||||
SanitizedAzureProviderSchema
|
||||
} from "@app/ee/services/audit-log-stream/azure/azure-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,
|
||||
SanitizedAzureProviderSchema
|
||||
]);
|
||||
|
||||
const ProviderOptionsSchema = z.discriminatedUnion("provider", [
|
||||
CustomProviderListItemSchema,
|
||||
DatadogProviderListItemSchema,
|
||||
SplunkProviderListItemSchema
|
||||
SplunkProviderListItemSchema,
|
||||
AzureProviderListItemSchema
|
||||
]);
|
||||
|
||||
export const registerAuditLogStreamRouter = async (server: FastifyZodProvider) => {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { LogProvider } from "@app/ee/services/audit-log-stream/audit-log-stream-enums";
|
||||
import {
|
||||
CreateAzureProviderLogStreamSchema,
|
||||
SanitizedAzureProviderSchema,
|
||||
UpdateAzureProviderLogStreamSchema
|
||||
} from "@app/ee/services/audit-log-stream/azure/azure-provider-schemas";
|
||||
import {
|
||||
CreateCustomProviderLogStreamSchema,
|
||||
SanitizedCustomProviderSchema,
|
||||
@@ -21,6 +26,15 @@ export * from "./audit-log-stream-router";
|
||||
|
||||
export const AUDIT_LOG_STREAM_REGISTER_ROUTER_MAP: Record<LogProvider, (server: FastifyZodProvider) => Promise<void>> =
|
||||
{
|
||||
[LogProvider.Azure]: async (server: FastifyZodProvider) => {
|
||||
registerAuditLogStreamEndpoints({
|
||||
server,
|
||||
provider: LogProvider.Azure,
|
||||
sanitizedResponseSchema: SanitizedAzureProviderSchema,
|
||||
createSchema: CreateAzureProviderLogStreamSchema,
|
||||
updateSchema: UpdateAzureProviderLogStreamSchema
|
||||
});
|
||||
},
|
||||
[LogProvider.Custom]: async (server: FastifyZodProvider) => {
|
||||
registerAuditLogStreamEndpoints({
|
||||
server,
|
||||
|
||||
Reference in New Issue
Block a user