diff --git a/docs/documentation/platform/pki/acme-ca.mdx b/docs/documentation/platform/pki/acme-ca.mdx index 60c6b4dcd..8b1fa10db 100644 --- a/docs/documentation/platform/pki/acme-ca.mdx +++ b/docs/documentation/platform/pki/acme-ca.mdx @@ -143,7 +143,7 @@ In the following steps, we explore how to set up ACME Certificate Authority inte - **Type**: Select "ACME" as the External CA type. - **Name**: Enter a name for the ACME CA (e.g., "lets-encrypt-production"). - **DNS App Connection**: Select from available DNS app connections or configure a new one. This connection provides Infisical with the credentials needed to create and remove DNS records for ACME validation. - - **Zone ID**: Enter your Route53 hosted zone ID (e.g., Z04044I124N1GOOMCOYX1) or select your Cloudflare Zone for the domain(s) you'll be requesting certificates for. + - **Zone ID**: Enter the Zone ID for the domain(s) you'll be requesting certificates for. - **Directory URL**: Enter the ACME v2 directory URL for your chosen CA provider (e.g., `https://acme-v02.api.letsencrypt.org/directory` for Let's Encrypt). - **Account Email**: Email address to associate with your ACME account. This email will receive important notifications about your certificates. - **Enable Direct Issuance**: Toggle on to allow direct certificate issuance without requiring subscribers. diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx index d318b357d..faba9ef37 100644 --- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx +++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx @@ -1,5 +1,6 @@ import { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; +import { SingleValue } from "react-select"; import { zodResolver } from "@hookform/resolvers/zod"; import { z } from "zod"; @@ -16,10 +17,15 @@ import { Switch } from "@app/components/v2"; import { useWorkspace } from "@app/context"; +import { APP_CONNECTION_MAP } from "@app/helpers/appConnections"; import { TAvailableAppConnection, useListAvailableAppConnections } from "@app/hooks/api/appConnections"; +import { + TCloudflareZone, + useCloudflareConnectionListZones +} from "@app/hooks/api/appConnections/cloudflare"; import { AppConnection } from "@app/hooks/api/appConnections/enums"; import { AcmeDnsProvider, @@ -29,18 +35,12 @@ import { useGetCa, useUpdateCa } from "@app/hooks/api/ca"; -import { UsePopUpState } from "@app/hooks/usePopUp"; -import { slugSchema } from "@app/lib/schemas"; import { ACME_DNS_PROVIDER_APP_CONNECTION_MAP, ACME_DNS_PROVIDER_NAME_MAP } from "@app/hooks/api/ca/constants"; -import { APP_CONNECTION_MAP } from "@app/helpers/appConnections"; -import { - TCloudflareZone, - useCloudflareConnectionListZones -} from "@app/hooks/api/appConnections/cloudflare"; -import { SingleValue } from "react-select"; +import { UsePopUpState } from "@app/hooks/usePopUp"; +import { slugSchema } from "@app/lib/schemas"; const schema = z .object({ @@ -120,12 +120,12 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => { const { data: availableRoute53Connections, isPending: isRoute53Pending } = useListAvailableAppConnections(AppConnection.AWS, { - enabled: dnsProvider === AcmeDnsProvider.ROUTE53 + enabled: caType === CaType.ACME }); const { data: availableCloudflareConnections, isPending: isCloudflarePending } = useListAvailableAppConnections(AppConnection.Cloudflare, { - enabled: dnsProvider === AcmeDnsProvider.Cloudflare + enabled: caType === CaType.ACME }); const availableConnections: TAvailableAppConnection[] = [ @@ -135,11 +135,11 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => { const isPending = isRoute53Pending || isCloudflarePending; - const connection = watch("configuration.dnsAppConnection"); + const dnsAppConnection = watch("configuration.dnsAppConnection"); const { data: cloudflareZones = [], isPending: isZonesPending } = - useCloudflareConnectionListZones(connection.id, { - enabled: dnsProvider === AcmeDnsProvider.Cloudflare && !!connection.id + useCloudflareConnectionListZones(dnsAppConnection.id, { + enabled: dnsProvider === AcmeDnsProvider.Cloudflare && !!dnsAppConnection.id }); useEffect(() => { @@ -328,7 +328,7 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => { control={control} name="configuration.dnsAppConnection" /> - {dnsProvider === AcmeDnsProvider.ROUTE53 ? ( + {dnsProvider === AcmeDnsProvider.ROUTE53 && ( { )} /> - ) : dnsProvider === AcmeDnsProvider.Cloudflare ? ( + )} + {dnsProvider === AcmeDnsProvider.Cloudflare && ( { label="Zone" > zone.id === value)} onChange={(option) => { onChange((option as SingleValue)?.id ?? null); @@ -369,8 +370,6 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => { )} /> - ) : ( - <> )} {

Secret Detection

-

Define secret values to ignore when scanning designated parameter folders. Add values here to prevent false positives or allow approved sensitive data. These ignored values will not trigger policy violation alerts.

+

+ Define secret values to ignore when scanning designated parameter folders. Add values here + to prevent false positives or allow approved sensitive data. These ignored values will not + trigger policy violation alerts. +