Skip to content

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

4.0 KB
Raw Blame
import { z } from "zod";

import { Auth0ClientSecretRotationSchema } from "@app/ee/services/secret-rotation-v2/auth0-client-secret";
import { AwsIamUserSecretRotationSchema } from "@app/ee/services/secret-rotation-v2/aws-iam-user-secret";
import { AzureClientSecretRotationSchema } from "@app/ee/services/secret-rotation-v2/azure-client-secret";
import { DatabricksServicePrincipalSecretRotationSchema } from "@app/ee/services/secret-rotation-v2/databricks-service-principal-secret";
import { DatadogApiKeyRotationSchema } from "@app/ee/services/secret-rotation-v2/datadog-api-key";
import { DatadogApplicationKeySecretRotationSchema } from "@app/ee/services/secret-rotation-v2/datadog-application-key-secret";
import { LdapPasswordRotationSchema } from "@app/ee/services/secret-rotation-v2/ldap-password";
import { LiteLLMApiKeyRotationSchema } from "@app/ee/services/secret-rotation-v2/litellm-api-key";
import { MongoDBCredentialsRotationSchema } from "@app/ee/services/secret-rotation-v2/mongodb-credentials";
import { MsSqlCredentialsRotationSchema } from "@app/ee/services/secret-rotation-v2/mssql-credentials";
import { MySqlCredentialsRotationSchema } from "@app/ee/services/secret-rotation-v2/mysql-credentials";
import { OktaClientSecretRotationSchema } from "@app/ee/services/secret-rotation-v2/okta-client-secret";
import { OpenRouterApiKeyRotationSchema } from "@app/ee/services/secret-rotation-v2/open-router-api-key";
import { OpenAIServiceAccountRotationSchema } from "@app/ee/services/secret-rotation-v2/openai-service-account";
import { OracleDBCredentialsRotationSchema } from "@app/ee/services/secret-rotation-v2/oracledb-credentials";
import { PostgresCredentialsRotationSchema } from "@app/ee/services/secret-rotation-v2/postgres-credentials";
import { RedisCredentialsRotationSchema } from "@app/ee/services/secret-rotation-v2/redis-credentials";
import { SalesforceOauthCredentialsRotationSchema } from "@app/ee/services/secret-rotation-v2/salesforce-oauth-credentials";
import { UnixLinuxLocalAccountRotationSchema } from "@app/ee/services/secret-rotation-v2/unix-linux-local-account-rotation";
import { WindowsLocalAccountRotationSchema } from "@app/ee/services/secret-rotation-v2/windows-local-account-rotation";

import { CloudflareApiTokenRotationSchema } from "./cloudflare-api-token";
import { CloudflareR2AccessKeyRotationSchema } from "./cloudflare-r2-access-key";
import { ConvexAccessKeyRotationSchema } from "./convex-access-key";
import { DbtServiceTokenRotationSchema } from "./dbt-service-token";
import { FireworksApiKeyRotationSchema } from "./fireworks-api-key";
import { GcpServiceAccountKeyRotationSchema } from "./gcp-service-account-key";
import { HpIloRotationSchema } from "./hp-ilo-rotation";
import { SnowflakeUserKeyPairRotationSchema } from "./snowflake-user-key-pair";
import { StripeApiKeyRotationSchema } from "./stripe-api-key";
import { SupabaseApiKeyRotationSchema } from "./supabase-api-key";

export const SecretRotationV2Schema = z.discriminatedUnion("type", [
  PostgresCredentialsRotationSchema,
  MsSqlCredentialsRotationSchema,
  MySqlCredentialsRotationSchema,
  OracleDBCredentialsRotationSchema,
  Auth0ClientSecretRotationSchema,
  AzureClientSecretRotationSchema,
  LdapPasswordRotationSchema,
  AwsIamUserSecretRotationSchema,
  OktaClientSecretRotationSchema,
  RedisCredentialsRotationSchema,
  MongoDBCredentialsRotationSchema,
  DatabricksServicePrincipalSecretRotationSchema,
  UnixLinuxLocalAccountRotationSchema,
  DbtServiceTokenRotationSchema,
  WindowsLocalAccountRotationSchema,
  OpenRouterApiKeyRotationSchema,
  LiteLLMApiKeyRotationSchema,
  OpenAIServiceAccountRotationSchema,
  HpIloRotationSchema,
  SupabaseApiKeyRotationSchema,
  SalesforceOauthCredentialsRotationSchema,
  DatadogApplicationKeySecretRotationSchema,
  DatadogApiKeyRotationSchema,
  ConvexAccessKeyRotationSchema,
  FireworksApiKeyRotationSchema,
  SnowflakeUserKeyPairRotationSchema,
  CloudflareApiTokenRotationSchema,
  CloudflareR2AccessKeyRotationSchema,
  StripeApiKeyRotationSchema,
  GcpServiceAccountKeyRotationSchema
]);