Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat(pki): google cloud dns acme provider
bernie-gf90591659202
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.tsindex a698fe1802..5a630a401b 100644--- a/backend/src/lib/api-docs/constants.ts+++ b/backend/src/lib/api-docs/constants.ts@@ -2734,7 +2734,7 @@ export const CertificateAuthorities = {directoryUrl: `The directory URL for the ACME Certificate Authority.`,accountEmail: `The email address for the ACME Certificate Authority.`,provider: `The DNS provider for the ACME Certificate Authority.`,- hostedZoneId: `The hosted zone ID for the ACME Certificate Authority.`,+ hostedZoneId: `The hosted zone ID for the ACME Certificate Authority. For Google Cloud DNS, use the managed zone resource name in the format projects/{projectId}/managedZones/{zoneName}.`,eabKid: `The External Account Binding (EAB) Key ID for the ACME Certificate Authority. Required if the ACME provider uses EAB.`,eabHmacKey: `The External Account Binding (EAB) HMAC key for the ACME Certificate Authority. Required if the ACME provider uses EAB.`,dnsResolver: `An optional custom DNS resolver IP address to use for verifying DNS propagation during ACME challenges. Must be a valid IP address (e.g. 8.8.8.8). When not set, the system default DNS resolver is used.`diff --git a/backend/src/server/routes/v1/app-connection-routers/gcp-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/gcp-connection-router.tsindex 0d66a6e511..7419745381 100644--- a/backend/src/server/routes/v1/app-connection-routers/gcp-connection-router.ts+++ b/backend/src/server/routes/v1/app-connection-routers/gcp-connection-router.ts@@ -186,4 +186,68 @@ export const registerGcpConnectionRouter = async (server: FastifyZodProvider) =>return certificateMaps;}});++ server.route({+ method: "GET",+ url: `/:connectionId/cloud-dns-projects`,+ config: {+ rateLimit: readLimit+ },+ schema: {+ operationId: "listGcpCloudDnsProjects",+ params: z.object({+ connectionId: z.string().uuid()+ }),+ response: {+ 200: z.object({ id: z.string(), name: z.string() }).array()+ }+ },+ onRequest: verifyAuth([AuthMode.JWT]),+ handler: async (req) => {+ const { connectionId } = req.params;++ const projects = await server.services.appConnection.gcp.listCloudDnsProjects(connectionId, req.permission);++ return projects;+ }+ });++ server.route({+ method: "GET",+ url: `/:connectionId/cloud-dns-zones`,+ config: {+ rateLimit: readLimit+ },+ schema: {+ operationId: "listGcpCloudDnsZones",+ params: z.object({+ connectionId: z.string().uuid()+ }),+ querystring: z.object({+ gcpProjectId: z+ .string()+ .trim()+ .min(6)+ .max(30)+ .refine((value) => GCP_PROJECT_ID_PATTERN.test(value), { message: "Invalid GCP project ID" })+ }),+ response: {+ 200: z.object({ id: z.string(), name: z.string(), dnsName: z.string() }).array()+ }+ },+ onRequest: verifyAuth([AuthMode.JWT]),+ handler: async (req) => {+ const {+ params: { connectionId },+ query: { gcpProjectId }+ } = req;++ const zones = await server.services.appConnection.gcp.listCloudDnsZones(+ { connectionId, gcpProjectId },+ req.permission+ );++ return zones;+ }+ });};diff --git a/backend/src/services/app-connection/gcp/gcp-connection-constants.ts b/backend/src/services/app-connection/gcp/gcp-connection-constants.tsindex 92d80f25b3..82fd38b2fd 100644--- a/backend/src/services/app-connection/gcp/gcp-connection-constants.ts+++ b/backend/src/services/app-connection/gcp/gcp-connection-constants.ts@@ -2,4 +2,8 @@ import RE2 from "re2";export const GCP_PROJECT_ID_PATTERN = new RE2("^[a-z][a-z0-9-]{4,28}[a-z0-9]$");+export const GCP_CLOUD_DNS_ZONE_RESOURCE_PATTERN = new RE2(+ "^projects/[a-z][a-z0-9-]{4,28}[a-z0-9]/managedZones/[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"+);+export const GCP_GLOBAL_LOCATION = "global";diff --git a/backend/src/services/app-connection/gcp/gcp-connection-fns.ts b/backend/src/services/app-connection/gcp/gcp-connection-fns.tsindex 6d8bc3b79f..450d4a573a 100644--- a/backend/src/services/app-connection/gcp/gcp-connection-fns.ts+++ b/backend/src/services/app-connection/gcp/gcp-connection-fns.ts@@ -16,7 +16,9 @@ import { GCP_GLOBAL_LOCATION } from "./gcp-connection-constants";import { GcpConnectionMethod } from "./gcp-connection-enums";import {GCPApp,+ GCPCloudDnsManagedZone,GCPGetCertificateMapsRes,+ GCPGetCloudDnsManagedZonesRes,GCPGetProjectLocationsRes,GCPGetProjectsRes,GCPGetServiceRes,@@ -327,6 +329,7 @@ const toGcpDiscoveryError = (error: unknown, context: { api: string; gcpProjectI};const GCP_MAX_PAGES = 10;+const TRAILING_DOT_REGEX = new RE2("\\.$");const GCP_PAGE_SIZE = 100;const GCP_SERVICE_CHECK_CONCURRENCY = 10;@@ -336,7 +339,8 @@ const fetchGcpPages = async <TResponse extends { nextPageToken?: string }, TItempick,api,gcpProjectId,- resourceLabel+ resourceLabel,+ pageSizeParam = "pageSize"}: {url: string;accessToken: string;@@ -344,6 +348,7 @@ const fetchGcpPages = async <TResponse extends { nextPageToken?: string }, TItemapi: string;gcpProjectId?: string;resourceLabel: string;+ pageSizeParam?: string;}) => {const items: TItem[] = [];let pageToken: string | undefined;@@ -357,7 +362,7 @@ const fetchGcpPages = async <TResponse extends { nextPageToken?: string }, TItem// eslint-disable-next-line no-await-in-loop({ data } = await request.get<TResponse>(url, {params: new URLSearchParams({- pageSize: String(GCP_PAGE_SIZE),+ [pageSizeParam]: String(GCP_PAGE_SIZE),...(currentPageToken ? { pageToken: currentPageToken } : {})}),headers: {@@ -406,7 +411,7 @@ const isGcpServiceEnabled = async (accessToken: string, projectId: string, servi}};-export const getGcpCertificateManagerProjects = async (appConnection: TGcpConnection) => {+const getGcpProjectsWithServiceEnabled = async (appConnection: TGcpConnection, serviceName: string) => {const accessToken = await getGcpConnectionAuthToken(appConnection);const apps = await fetchGcpPages<GCPGetProjectsRes, GCPApp>({@@ -422,11 +427,7 @@ export const getGcpCertificateManagerProjects = async (appConnection: TGcpConnecfor (let i = 0; i < apps.length; i += GCP_SERVICE_CHECK_CONCURRENCY) {const batch = apps.slice(i, i + GCP_SERVICE_CHECK_CONCURRENCY);// eslint-disable-next-line no-await-in-loop- const enabled = await Promise.all(- batch.map((app) =>- isGcpServiceEnabled(accessToken, app.projectId, IntegrationUrls.GCP_CERTIFICATE_MANAGER_SERVICE_NAME)- )- );+ const enabled = await Promise.all(batch.map((app) => isGcpServiceEnabled(accessToken, app.projectId, serviceName)));batch.forEach((app, index) => {if (enabled[index]) projects.push({ id: app.projectId, name: app.name });@@ -436,6 +437,35 @@ export const getGcpCertificateManagerProjects = async (appConnection: TGcpConnecreturn projects.sort((a, b) => a.name.localeCompare(b.name));};+export const getGcpCertificateManagerProjects = async (appConnection: TGcpConnection) =>+ getGcpProjectsWithServiceEnabled(appConnection, IntegrationUrls.GCP_CERTIFICATE_MANAGER_SERVICE_NAME);++export const getGcpCloudDnsProjects = async (appConnection: TGcpConnection) =>+ getGcpProjectsWithServiceEnabled(appConnection, IntegrationUrls.GCP_CLOUD_DNS_SERVICE_NAME);++export const getGcpCloudDnsZones = async (projectId: string, appConnection: TGcpConnection) => {+ const accessToken = await getGcpConnectionAuthToken(appConnection);++ const zones = await fetchGcpPages<GCPGetCloudDnsManagedZonesRes, GCPCloudDnsManagedZone>({+ url: `${IntegrationUrls.GCP_CLOUD_DNS_URL}/dns/v1/projects/${projectId}/managedZones`,+ accessToken,+ pick: (data) => data.managedZones,+ api: "Cloud DNS",+ gcpProjectId: projectId,+ resourceLabel: "GCP Cloud DNS managed zones",+ pageSizeParam: "maxResults"+ });++ return zones+ .filter((zone) => zone.visibility !== "private")+ .map((zone) => ({+ id: `projects/${projectId}/managedZones/${zone.name}`,+ name: zone.name,+ dnsName: zone.dnsName.replace(TRAILING_DOT_REGEX, "")+ }))+ .sort((a, b) => a.dnsName.localeCompare(b.dnsName));+};+export const getGcpCertificateManagerLocations = async (projectId: string, appConnection: TGcpConnection) => {const accessToken = await getGcpConnectionAuthToken(appConnection);diff --git a/backend/src/services/app-connection/gcp/gcp-connection-service.ts b/backend/src/services/app-connection/gcp/gcp-connection-service.tsindex e56c28e525..fde662f8c3 100644--- a/backend/src/services/app-connection/gcp/gcp-connection-service.ts+++ b/backend/src/services/app-connection/gcp/gcp-connection-service.ts@@ -6,6 +6,8 @@ import {getGcpCertificateManagerLocations,getGcpCertificateManagerProjects,getGcpCertificateMaps,+ getGcpCloudDnsProjects,+ getGcpCloudDnsZones,getGcpSecretManagerProjectLocations,getGcpSecretManagerProjects} from "./gcp-connection-fns";@@ -89,7 +91,34 @@ export const gcpConnectionService = (getAppConnection: TGetAppConnectionFunc) =>}};+ const listCloudDnsProjects = async (connectionId: string, actor: OrgServiceActor) => {+ const appConnection = await getAppConnection(AppConnection.GCP, connectionId, actor);++ try {+ return await getGcpCloudDnsProjects(appConnection);+ } catch (error) {+ logger.error(error, "Error listing GCP Cloud DNS projects");+ throw error;+ }+ };++ const listCloudDnsZones = async (+ { connectionId, gcpProjectId }: TGcpCertificateManagerProjectScopedDTO,+ actor: OrgServiceActor+ ) => {+ const appConnection = await getAppConnection(AppConnection.GCP, connectionId, actor);++ try {+ return await getGcpCloudDnsZones(gcpProjectId, appConnection);+ } catch (error) {+ logger.error(error, "Error listing GCP Cloud DNS zones");+ throw error;+ }+ };+return {+ listCloudDnsProjects,+ listCloudDnsZones,listSecretManagerProjects,listSecretManagerProjectLocations,listCertificateManagerProjects,diff --git a/backend/src/services/app-connection/gcp/gcp-connection-types.ts b/backend/src/services/app-connection/gcp/gcp-connection-types.tsindex 966db3d97c..c001829f80 100644--- a/backend/src/services/app-connection/gcp/gcp-connection-types.ts+++ b/backend/src/services/app-connection/gcp/gcp-connection-types.ts@@ -74,3 +74,14 @@ export type TGcpCertificateManagerProjectScopedDTO = {connectionId: string;gcpProjectId: string;};++export type GCPCloudDnsManagedZone = {+ name: string;+ dnsName: string;+ visibility?: "public" | "private";+};++export type GCPGetCloudDnsManagedZonesRes = {+ managedZones?: GCPCloudDnsManagedZone[];+ nextPageToken?: string;+};diff --git a/backend/src/services/certificate-authority/acme/acme-certificate-authority-enums.ts b/backend/src/services/certificate-authority/acme/acme-certificate-authority-enums.tsindex e592df2a98..86bc5c2215 100644--- a/backend/src/services/certificate-authority/acme/acme-certificate-authority-enums.ts+++ b/backend/src/services/certificate-authority/acme/acme-certificate-authority-enums.ts@@ -3,5 +3,6 @@ export enum AcmeDnsProvider {Cloudflare = "cloudflare",DNSMadeEasy = "dns-made-easy",AzureDNS = "azure-dns",- PowerDns = "powerdns"+ PowerDns = "powerdns",+ GcpCloudDns = "gcp-cloud-dns"}diff --git a/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.ts b/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.tsindex 5869973a8e..0ed1ae619d 100644--- a/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.ts+++ b/backend/src/services/certificate-authority/acme/acme-certificate-authority-fns.ts@@ -26,6 +26,7 @@ import { TAwsConnection } from "@app/services/app-connection/aws/aws-connection-import { TAzureDnsConnection } from "@app/services/app-connection/azure-dns/azure-dns-connection-types";import { TCloudflareConnection } from "@app/services/app-connection/cloudflare/cloudflare-connection-types";import { TDNSMadeEasyConnection } from "@app/services/app-connection/dns-made-easy/dns-made-easy-connection-types";+import { TGcpConnection } from "@app/services/app-connection/gcp/gcp-connection-types";import { TPowerDnsConnection } from "@app/services/app-connection/powerdns/powerdns-connection-types";import { TCertificateBodyDALFactory } from "@app/services/certificate/certificate-body-dal";import { TCertificateDALFactory } from "@app/services/certificate/certificate-dal";@@ -66,6 +67,11 @@ import {import { azureDnsDeleteTxtRecord, azureDnsInsertTxtRecord } from "./dns-providers/azure-dns";import { cloudflareDeleteTxtRecord, cloudflareInsertTxtRecord } from "./dns-providers/cloudflare";import { dnsMadeEasyDeleteTxtRecord, dnsMadeEasyInsertTxtRecord } from "./dns-providers/dns-made-easy";+import {+ gcpCloudDnsDeleteTxtRecord,+ gcpCloudDnsInsertTxtRecord,+ validateGcpCloudDnsZone+} from "./dns-providers/gcp-cloud-dns";import { powerDnsDeleteTxtRecord, powerDnsInsertTxtRecord, TPowerDnsProviderDeps } from "./dns-providers/powerdns";const UNCHANGED_CREDENTIAL_SENTINEL = "__INFISICAL_UNCHANGED__";@@ -511,6 +517,15 @@ export const executeAcmeOrder = async ();break;}+ case AcmeDnsProvider.GcpCloudDns: {+ await gcpCloudDnsInsertTxtRecord(+ connection as TGcpConnection,+ acmeCa.configuration.dnsProviderConfig.hostedZoneId,+ recordName,+ recordValue+ );+ break;+ }default: {throw new Error(`Unsupported DNS provider: ${acmeCa.configuration.dnsProviderConfig.provider as string}`);}@@ -581,6 +596,15 @@ export const executeAcmeOrder = async ();break;}+ case AcmeDnsProvider.GcpCloudDns: {+ await gcpCloudDnsDeleteTxtRecord(+ connection as TGcpConnection,+ acmeCa.configuration.dnsProviderConfig.hostedZoneId,+ recordName,+ recordValue+ );+ break;+ }default: {throw new Error(`Unsupported DNS provider: ${acmeCa.configuration.dnsProviderConfig.provider as string}`);}@@ -757,6 +781,16 @@ export const AcmeCertificateAuthorityFns = ({});}+ if (dnsProviderConfig.provider === AcmeDnsProvider.GcpCloudDns && appConnection.app !== AppConnection.GCP) {+ throw new BadRequestError({+ message: `App connection with ID '${dnsAppConnectionId}' is not a GCP connection`+ });+ }++ if (dnsProviderConfig.provider === AcmeDnsProvider.GcpCloudDns) {+ validateGcpCloudDnsZone(dnsProviderConfig.hostedZoneId);+ }+if (dnsResolver) {validateDnsResolver(dnsResolver);}@@ -877,6 +911,16 @@ export const AcmeCertificateAuthorityFns = ({});}+ if (dnsProviderConfig.provider === AcmeDnsProvider.GcpCloudDns && appConnection.app !== AppConnection.GCP) {+ throw new BadRequestError({+ message: `App connection with ID '${dnsAppConnectionId}' is not a GCP connection`+ });+ }++ if (dnsProviderConfig.provider === AcmeDnsProvider.GcpCloudDns) {+ validateGcpCloudDnsZone(dnsProviderConfig.hostedZoneId);+ }+if (dnsResolver) {validateDnsResolver(dnsResolver);}diff --git a/backend/src/services/certificate-authority/acme/dns-providers/gcp-cloud-dns.test.ts b/backend/src/services/certificate-authority/acme/dns-providers/gcp-cloud-dns.test.tsnew file mode 100644index 0000000000..d9a4ba51e6--- /dev/null+++ b/backend/src/services/certificate-authority/acme/dns-providers/gcp-cloud-dns.test.ts@@ -0,0 +1,172 @@+import { AxiosError, AxiosHeaders } from "axios";+import { beforeEach, describe, expect, it, vi } from "vitest";++import { TGcpConnection } from "@app/services/app-connection/gcp/gcp-connection-types";++const { getMock, postMock } = vi.hoisted(() => ({+ getMock: vi.fn<(url: string, config?: unknown) => Promise<unknown>>(),+ postMock: vi.fn<(url: string, body?: unknown, config?: unknown) => Promise<unknown>>()+}));++vi.mock("@app/lib/config/request", () => ({+ request: { get: getMock, post: postMock }+}));+vi.mock("@app/services/app-connection/gcp/gcp-connection-fns", () => ({+ getGcpConnectionAuthToken: vi.fn().mockResolvedValue("gcp-token")+}));+vi.mock("@app/lib/delay", () => ({ delay: vi.fn().mockResolvedValue(undefined) }));+vi.mock("@app/lib/logger", () => ({+ logger: { error: vi.fn(), info: vi.fn(), warn: vi.fn(), debug: vi.fn() }+}));++// eslint-disable-next-line import/first+import { gcpCloudDnsDeleteTxtRecord, gcpCloudDnsInsertTxtRecord, validateGcpCloudDnsZone } from "./gcp-cloud-dns";++const connection = {} as TGcpConnection;+const ZONE = "projects/my-project/managedZones/example-zone";+const ZONE_URL = `https://dns.googleapis.com/dns/v1/${ZONE}`;+const RECORD = "_acme-challenge.example.com";+const FQDN = `${RECORD}.`;++const axiosError = (status: number) =>+ new AxiosError("request failed", String(status), undefined, undefined, {+ status,+ statusText: "",+ headers: {},+ config: { headers: new AxiosHeaders() },+ data: { error: { message: `status ${status}` } }+ });++const existingRecordSet = (rrdatas: string[]) => ({ data: { name: FQDN, type: "TXT", ttl: 60, rrdatas } });++describe("validateGcpCloudDnsZone", () => {+ it("accepts a managed zone resource name", () => {+ expect(() => validateGcpCloudDnsZone(ZONE)).not.toThrow();+ });++ it.each(["example-zone", "projects/my-project/managedZones/", "projects/My_Project/managedZones/zone", `${ZONE}/x`])(+ "rejects %s",+ (value) => {+ expect(() => validateGcpCloudDnsZone(value)).toThrow(/Invalid Google Cloud DNS zone/);+ }+ );+});++describe("gcpCloudDnsInsertTxtRecord", () => {+ beforeEach(() => {+ getMock.mockReset();+ postMock.mockReset().mockResolvedValue({ data: {} });+ });++ it("creates the record set when none exists", async () => {+ getMock.mockRejectedValueOnce(axiosError(404));++ await gcpCloudDnsInsertTxtRecord(connection, ZONE, RECORD, '"token-a"');++ expect(getMock).toHaveBeenCalledWith(`${ZONE_URL}/rrsets/${encodeURIComponent(FQDN)}/TXT`, expect.anything());+ expect(postMock).toHaveBeenCalledWith(+ `${ZONE_URL}/changes`,+ { additions: [{ name: FQDN, type: "TXT", ttl: 60, rrdatas: ['"token-a"'] }] },+ expect.anything()+ );+ });++ it("appends to an existing record set so concurrent challenges on one name both survive", async () => {+ getMock.mockResolvedValueOnce(existingRecordSet(['"token-a"']));++ await gcpCloudDnsInsertTxtRecord(connection, ZONE, RECORD, '"token-b"');++ expect(postMock).toHaveBeenCalledWith(+ `${ZONE_URL}/changes`,+ {+ deletions: [{ name: FQDN, type: "TXT", ttl: 60, rrdatas: ['"token-a"'] }],+ additions: [{ name: FQDN, type: "TXT", ttl: 60, rrdatas: ['"token-a"', '"token-b"'] }]+ },+ expect.anything()+ );+ });++ it("does nothing when the value is already present", async () => {+ getMock.mockResolvedValueOnce(existingRecordSet(["token-a"]));++ await gcpCloudDnsInsertTxtRecord(connection, ZONE, RECORD, '"token-a"');++ expect(postMock).not.toHaveBeenCalled();+ });++ it("re-reads and retries when the record set changed underneath it", async () => {+ getMock.mockRejectedValueOnce(axiosError(404)).mockResolvedValueOnce(existingRecordSet(['"token-a"']));+ postMock.mockRejectedValueOnce(axiosError(409)).mockResolvedValueOnce({ data: {} });++ await gcpCloudDnsInsertTxtRecord(connection, ZONE, RECORD, '"token-b"');++ expect(postMock).toHaveBeenCalledTimes(2);+ expect(postMock).toHaveBeenLastCalledWith(+ `${ZONE_URL}/changes`,+ expect.objectContaining({+ additions: [expect.objectContaining({ rrdatas: ['"token-a"', '"token-b"'] })]+ }),+ expect.anything()+ );+ });++ it("tells the user which role to grant when the service account lacks access", async () => {+ getMock.mockRejectedValueOnce(axiosError(403));++ await expect(gcpCloudDnsInsertTxtRecord(connection, ZONE, RECORD, '"token-a"')).rejects.toThrow(+ "Grant it the DNS Administrator role (roles/dns.admin) on GCP project 'my-project'"+ );+ expect(postMock).not.toHaveBeenCalled();+ });++ it("surfaces the provider message on other failures", async () => {+ getMock.mockRejectedValueOnce(axiosError(400));++ await expect(gcpCloudDnsInsertTxtRecord(connection, ZONE, RECORD, '"token-a"')).rejects.toThrow(+ "Google Cloud DNS request failed: status 400"+ );+ });+});++describe("gcpCloudDnsDeleteTxtRecord", () => {+ beforeEach(() => {+ getMock.mockReset();+ postMock.mockReset().mockResolvedValue({ data: {} });+ });++ it("removes only its own value when other values remain", async () => {+ getMock.mockResolvedValueOnce(existingRecordSet(['"token-a"', '"token-b"']));++ await gcpCloudDnsDeleteTxtRecord(connection, ZONE, RECORD, '"token-a"');++ expect(postMock).toHaveBeenCalledWith(+ `${ZONE_URL}/changes`,+ {+ deletions: [{ name: FQDN, type: "TXT", ttl: 60, rrdatas: ['"token-a"', '"token-b"'] }],+ additions: [{ name: FQDN, type: "TXT", ttl: 60, rrdatas: ['"token-b"'] }]+ },+ expect.anything()+ );+ });++ it("deletes the record set when its last value is removed", async () => {+ getMock.mockResolvedValueOnce(existingRecordSet(['"token-a"']));++ await gcpCloudDnsDeleteTxtRecord(connection, ZONE, RECORD, '"token-a"');++ expect(postMock).toHaveBeenCalledWith(+ `${ZONE_URL}/changes`,+ { deletions: [{ name: FQDN, type: "TXT", ttl: 60, rrdatas: ['"token-a"'] }] },+ expect.anything()+ );+ });++ it("is a no-op when the record set or value is already gone", async () => {+ getMock.mockRejectedValueOnce(axiosError(404)).mockResolvedValueOnce(existingRecordSet(['"token-b"']));++ await gcpCloudDnsDeleteTxtRecord(connection, ZONE, RECORD, '"token-a"');+ await gcpCloudDnsDeleteTxtRecord(connection, ZONE, RECORD, '"token-a"');++ expect(postMock).not.toHaveBeenCalled();+ });+});diff --git a/backend/src/services/certificate-authority/acme/dns-providers/gcp-cloud-dns.ts b/backend/src/services/certificate-authority/acme/dns-providers/gcp-cloud-dns.tsnew file mode 100644index 0000000000..3059779355--- /dev/null+++ b/backend/src/services/certificate-authority/acme/dns-providers/gcp-cloud-dns.ts@@ -0,0 +1,157 @@+import { isAxiosError } from "axios";+import RE2 from "re2";++import { request } from "@app/lib/config/request";+import { delay } from "@app/lib/delay";+import { BadRequestError } from "@app/lib/errors";+import { logger } from "@app/lib/logger";+import { GCP_CLOUD_DNS_ZONE_RESOURCE_PATTERN } from "@app/services/app-connection/gcp/gcp-connection-constants";+import { getGcpConnectionAuthToken } from "@app/services/app-connection/gcp/gcp-connection-fns";+import { TGcpConnection } from "@app/services/app-connection/gcp/gcp-connection-types";+import { IntegrationUrls } from "@app/services/integration-auth/integration-list";++type TGcpResourceRecordSet = {+ name: string;+ type: string;+ ttl: number;+ rrdatas: string[];+};++const TXT_RECORD_TTL_SECONDS = 60;+const MAX_CHANGE_ATTEMPTS = 5;+const CHANGE_RETRY_DELAY_MS = 1000;+const QUOTES_REGEX = new RE2('"', "g");++export const validateGcpCloudDnsZone = (hostedZoneId: string) => {+ if (!GCP_CLOUD_DNS_ZONE_RESOURCE_PATTERN.test(hostedZoneId)) {+ throw new BadRequestError({+ message: `Invalid Google Cloud DNS zone '${hostedZoneId}'. Expected format: projects/{projectId}/managedZones/{zoneName}`+ });+ }+};++const getZoneUrl = (hostedZoneId: string) => {+ validateGcpCloudDnsZone(hostedZoneId);+ return `${IntegrationUrls.GCP_CLOUD_DNS_URL}/dns/v1/${hostedZoneId}`;+};++const toFqdn = (recordName: string) => (recordName.endsWith(".") ? recordName : `${recordName}.`);++const normalizeTxtValue = (value: string) => value.replace(QUOTES_REGEX, "");++const toGcpDnsError = (error: unknown, hostedZoneId: string) => {+ if (isAxiosError(error)) {+ if (error.response?.status === 403) {+ const [, gcpProjectId, , zoneName] = hostedZoneId.split("/");+ return new Error(+ `The GCP connection's service account can't manage records in Google Cloud DNS zone '${zoneName}'. Grant it the DNS Administrator role (roles/dns.admin) on GCP project '${gcpProjectId}' and try again.`+ );+ }+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access+ const message = (error.response?.data?.error?.message || error.message || "Unknown error") as string;+ return new Error(`Google Cloud DNS request failed: ${message}`);+ }+ return error;+};++// 409 = record set was created concurrently, 412 = record set changed since it was read+const isConflictError = (error: unknown) =>+ isAxiosError(error) && (error.response?.status === 409 || error.response?.status === 412);++const getTxtRecordSet = async (zoneUrl: string, accessToken: string, fqdn: string) => {+ try {+ const { data } = await request.get<TGcpResourceRecordSet>(`${zoneUrl}/rrsets/${encodeURIComponent(fqdn)}/TXT`, {+ headers: { Authorization: `Bearer ${accessToken}`, Accept: "application/json" }+ });+ return data;+ } catch (error) {+ if (isAxiosError(error) && error.response?.status === 404) return null;+ throw error;+ }+};++const submitChange = async (+ zoneUrl: string,+ accessToken: string,+ change: { additions?: TGcpResourceRecordSet[]; deletions?: TGcpResourceRecordSet[] }+) => {+ await request.post(`${zoneUrl}/changes`, change, {+ headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json", Accept: "application/json" }+ });+};++const applyTxtRecordChange = async (+ connection: TGcpConnection,+ hostedZoneId: string,+ recordName: string,+ buildChange: (+ fqdn: string,+ existing: TGcpResourceRecordSet | null+ ) => { additions?: TGcpResourceRecordSet[]; deletions?: TGcpResourceRecordSet[] } | null+) => {+ const zoneUrl = getZoneUrl(hostedZoneId);+ const fqdn = toFqdn(recordName);+ const accessToken = await getGcpConnectionAuthToken(connection);++ for (let attempt = 1; attempt <= MAX_CHANGE_ATTEMPTS; attempt += 1) {+ try {+ // eslint-disable-next-line no-await-in-loop+ const existing = await getTxtRecordSet(zoneUrl, accessToken, fqdn);+ const change = buildChange(fqdn, existing);+ if (!change) return;++ // eslint-disable-next-line no-await-in-loop+ await submitChange(zoneUrl, accessToken, change);+ return;+ } catch (error) {+ if (!isConflictError(error) || attempt === MAX_CHANGE_ATTEMPTS) {+ throw toGcpDnsError(error, hostedZoneId);+ }+ // eslint-disable-next-line no-await-in-loop+ await delay(CHANGE_RETRY_DELAY_MS);+ }+ }+};++export const gcpCloudDnsInsertTxtRecord = async (+ connection: TGcpConnection,+ hostedZoneId: string,+ recordName: string,+ value: string+) => {+ await applyTxtRecordChange(connection, hostedZoneId, recordName, (fqdn, existing) => {+ if (!existing) {+ return { additions: [{ name: fqdn, type: "TXT", ttl: TXT_RECORD_TTL_SECONDS, rrdatas: [value] }] };+ }++ if (existing.rrdatas.some((rrdata) => normalizeTxtValue(rrdata) === normalizeTxtValue(value))) {+ return null;+ }++ return {+ deletions: [existing],+ additions: [{ ...existing, ttl: TXT_RECORD_TTL_SECONDS, rrdatas: [...existing.rrdatas, value] }]+ };+ });+};++export const gcpCloudDnsDeleteTxtRecord = async (+ connection: TGcpConnection,+ hostedZoneId: string,+ recordName: string,+ value: string+) => {+ await applyTxtRecordChange(connection, hostedZoneId, recordName, (fqdn, existing) => {+ const remaining = existing?.rrdatas.filter((rrdata) => normalizeTxtValue(rrdata) !== normalizeTxtValue(value));++ if (!existing || !remaining || remaining.length === existing.rrdatas.length) {+ logger.warn({ hostedZoneId, recordName: fqdn }, "TXT record not found for deletion");+ return null;+ }++ return {+ deletions: [existing],+ ...(remaining.length ? { additions: [{ ...existing, rrdatas: remaining }] } : {})+ };+ });+};diff --git a/backend/src/services/integration-auth/integration-list.ts b/backend/src/services/integration-auth/integration-list.tsindex 07c337c6ec..0f2c7a1e30 100644--- a/backend/src/services/integration-auth/integration-list.ts+++ b/backend/src/services/integration-auth/integration-list.ts@@ -114,6 +114,8 @@ export enum IntegrationUrls {GCP_SECRET_MANAGER_URL = `https://${GCP_SECRET_MANAGER_SERVICE_NAME}`,GCP_CERTIFICATE_MANAGER_SERVICE_NAME = "certificatemanager.googleapis.com",GCP_CERTIFICATE_MANAGER_URL = `https://${GCP_CERTIFICATE_MANAGER_SERVICE_NAME}`,+ GCP_CLOUD_DNS_SERVICE_NAME = "dns.googleapis.com",+ GCP_CLOUD_DNS_URL = `https://${GCP_CLOUD_DNS_SERVICE_NAME}`,GCP_SERVICE_USAGE_URL = "https://serviceusage.googleapis.com",GCP_CLOUD_PLATFORM_SCOPE = "https://www.googleapis.com/auth/cloud-platform",diff --git a/docs/documentation/platform/pki/ca/acme-ca.mdx b/docs/documentation/platform/pki/ca/acme-ca.mdxindex 226d7fcf35..ac1ca91b96 100644--- a/docs/documentation/platform/pki/ca/acme-ca.mdx+++ b/docs/documentation/platform/pki/ca/acme-ca.mdx@@ -17,7 +17,7 @@ their **ACME Directory URL** such as:- ZeroSSL: `https://acme.zerossl.com/v2/DV90`.- SSL.com: `https://acme.ssl.com/sslcom-dv-rsa`.-When Infisical requests a certificate from an ACME-compatible CA, it creates a TXT record at `_acme-challenge.{your-domain}` in your configured DNS provider (e.g. Route53, Cloudflare, Azure DNS, DNS Made Easy, PowerDNS, etc.); this TXT record contains the challenge token issued by the ACME-compatible CA to validate domain control for the requested certificate.+When Infisical requests a certificate from an ACME-compatible CA, it creates a TXT record at `_acme-challenge.{your-domain}` in your configured DNS provider (e.g. Route53, Cloudflare, Azure DNS, Google Cloud DNS, DNS Made Easy, PowerDNS, etc.); this TXT record contains the challenge token issued by the ACME-compatible CA to validate domain control for the requested certificate.The ACME provider checks for the existence of this TXT record to verify domain control before issuing the certificate back to Infisical.After validation completes successfully, Infisical automatically removes the TXT record from your DNS provider.@@ -139,6 +139,23 @@ In the following steps, we explore how to connect Infisical to an ACME-compatiblFor detailed instructions on setting up a PowerDNS connection, see the [PowerDNS Connection](/integrations/app-connections/powerdns) documentation.</Tab>+ <Tab title="Google Cloud DNS">+ 1. In **Certificate Manager**, go to **Settings → App Connections** and create a new GCP connection. The service account's ID must end with the first two sections of your Infisical organization ID, as described in [Configure service account for Infisical](/integrations/app-connections/gcp#configure-service-account-for-infisical).++ 2. On the Google Cloud project that holds your public managed zone, grant the connection's service account the **DNS Administrator** (`roles/dns.admin`) and **Service Usage Viewer** (`roles/serviceusage.serviceUsageViewer`) roles, and enable the APIs Infisical calls:++ ```bash+ gcloud services enable \+ dns.googleapis.com \+ cloudresourcemanager.googleapis.com \+ serviceusage.googleapis.com \+ --project=PROJECT_ID+ ```++ Infisical lists only projects with the Cloud DNS API enabled, and only public managed zones, because the ACME CA can't resolve records in a private zone.++ For detailed instructions on setting up a GCP connection, see the [GCP Connection](/integrations/app-connections/gcp) documentation.+ </Tab></Tabs></Step><Step title="Register an ACME-compatible CA">@@ -150,7 +167,7 @@ In the following steps, we explore how to connect Infisical to an ACME-compatibl- Name: A slug-friendly name for the ACME-compatible CA such as `lets-encrypt-production`.- DNS App Connection: The App Connection from Step 1 used for Infisical to connect to your DNS provider and create/remove DNS records as part of the DNS-01 challenge in ACME.- - Zone / Zone ID: Enter the Zone / Zone ID for the domain(s) you'll be requesting certificates for.+ - Zone / Zone ID: Enter the Zone / Zone ID for the domain(s) you'll be requesting certificates for. For Google Cloud DNS, select the **GCP Project** first, then the **Zone**.- Directory URL: Enter the **ACME Directory URL** for your desired upstream ACME-compatible CA such as `https://acme-v02.api.letsencrypt.org/directory` for Let's Encrypt.- Account Email: The email address to associate with your ACME account. This email will receive important notifications about your certificates.- EAB Key Identifier (KID): (Optional) The Key Identifier (KID) provided by your ACME CA for External Account Binding (EAB). This is required by some ACME providers (e.g., ZeroSSL, DigiCert) to link your ACME account to an external account you've pre-registered with them.@@ -222,7 +239,7 @@ In the following steps, we explore how to connect Infisical to an ACME-compatibl<AccordionGroup><Accordion title="What DNS validation methods are supported?">- Currently, Infisical supports DNS-01 validation through AWS Route53, Cloudflare, Azure DNS, DNS Made Easy, and PowerDNS. The DNS-01 challenge method is preferred for ACME integrations because it:+ Currently, Infisical supports DNS-01 validation through AWS Route53, Cloudflare, Azure DNS, Google Cloud DNS, DNS Made Easy, and PowerDNS. The DNS-01 challenge method is preferred for ACME integrations because it:- Works with wildcard certificates- Doesn't require your servers to be publicly accessiblediff --git a/frontend/src/hooks/api/appConnections/gcp/queries.tsx b/frontend/src/hooks/api/appConnections/gcp/queries.tsxindex ab777db7fa..3fd830649b 100644--- a/frontend/src/hooks/api/appConnections/gcp/queries.tsx+++ b/frontend/src/hooks/api/appConnections/gcp/queries.tsx@@ -5,6 +5,7 @@ import { apiRequest } from "@app/config/request";import { appConnectionKeys } from "../queries";import {TGcpCertificateMap,+ TGcpCloudDnsZone,TGcpLocation,TGcpProject,TListCertificateManagerResources,@@ -30,7 +31,11 @@ const gcpConnectionKeys = {gcpProjectId] as const,listCertificateMaps: ({ connectionId, gcpProjectId }: TListCertificateManagerResources) =>- [...gcpConnectionKeys.all, "certificate-maps", connectionId, gcpProjectId] as const+ [...gcpConnectionKeys.all, "certificate-maps", connectionId, gcpProjectId] as const,+ listCloudDnsProjects: (connectionId: string) =>+ [...gcpConnectionKeys.all, "cloud-dns-projects", connectionId] as const,+ listCloudDnsZones: ({ connectionId, gcpProjectId }: TListCertificateManagerResources) =>+ [...gcpConnectionKeys.all, "cloud-dns-zones", connectionId, gcpProjectId] as const};export const useGcpConnectionListProjects = (@@ -160,3 +165,54 @@ export const useGcpConnectionListCertificateMaps = (...options});};++export const useGcpConnectionListCloudDnsProjects = (+ connectionId: string,+ options?: Omit<+ UseQueryOptions<+ TGcpProject[],+ unknown,+ TGcpProject[],+ ReturnType<typeof gcpConnectionKeys.listCloudDnsProjects>+ >,+ "queryKey" | "queryFn"+ >+) => {+ return useQuery({+ queryKey: gcpConnectionKeys.listCloudDnsProjects(connectionId),+ queryFn: async () => {+ const { data } = await apiRequest.get<TGcpProject[]>(+ `/api/v1/app-connections/gcp/${connectionId}/cloud-dns-projects`+ );++ return data;+ },+ ...options+ });+};++export const useGcpConnectionListCloudDnsZones = (+ { connectionId, gcpProjectId }: TListCertificateManagerResources,+ options?: Omit<+ UseQueryOptions<+ TGcpCloudDnsZone[],+ unknown,+ TGcpCloudDnsZone[],+ ReturnType<typeof gcpConnectionKeys.listCloudDnsZones>+ >,+ "queryKey" | "queryFn"+ >+) => {+ return useQuery({+ queryKey: gcpConnectionKeys.listCloudDnsZones({ connectionId, gcpProjectId }),+ queryFn: async () => {+ const { data } = await apiRequest.get<TGcpCloudDnsZone[]>(+ `/api/v1/app-connections/gcp/${connectionId}/cloud-dns-zones`,+ { params: { gcpProjectId } }+ );++ return data;+ },+ ...options+ });+};diff --git a/frontend/src/hooks/api/appConnections/gcp/types.ts b/frontend/src/hooks/api/appConnections/gcp/types.tsindex 0040d9b342..75d1dfd4d7 100644--- a/frontend/src/hooks/api/appConnections/gcp/types.ts+++ b/frontend/src/hooks/api/appConnections/gcp/types.ts@@ -22,3 +22,9 @@ export type TGcpCertificateMap = {name: string;description?: string;};++export type TGcpCloudDnsZone = {+ id: string;+ name: string;+ dnsName: string;+};diff --git a/frontend/src/hooks/api/ca/constants.tsx b/frontend/src/hooks/api/ca/constants.tsxindex d2142f597f..6d7ef88c98 100644--- a/frontend/src/hooks/api/ca/constants.tsx+++ b/frontend/src/hooks/api/ca/constants.tsx@@ -17,7 +17,8 @@ export const ACME_DNS_PROVIDER_NAME_MAP: Record<AcmeDnsProvider, string> = {[AcmeDnsProvider.Cloudflare]: "Cloudflare",[AcmeDnsProvider.DNSMadeEasy]: "DNS Made Easy",[AcmeDnsProvider.AzureDNS]: "Azure DNS",- [AcmeDnsProvider.PowerDns]: "PowerDNS"+ [AcmeDnsProvider.PowerDns]: "PowerDNS",+ [AcmeDnsProvider.GcpCloudDns]: "Google Cloud DNS"};export const ACME_DNS_PROVIDER_APP_CONNECTION_MAP: Record<AcmeDnsProvider, AppConnection> = {@@ -25,7 +26,8 @@ export const ACME_DNS_PROVIDER_APP_CONNECTION_MAP: Record<AcmeDnsProvider, AppCo[AcmeDnsProvider.Cloudflare]: AppConnection.Cloudflare,[AcmeDnsProvider.DNSMadeEasy]: AppConnection.DNSMadeEasy,[AcmeDnsProvider.AzureDNS]: AppConnection.AzureDNS,- [AcmeDnsProvider.PowerDns]: AppConnection.PowerDns+ [AcmeDnsProvider.PowerDns]: AppConnection.PowerDns,+ [AcmeDnsProvider.GcpCloudDns]: AppConnection.GCP};export const CA_TYPE_CAPABILITIES_MAP: Record<CaType, CaCapability[]> = {diff --git a/frontend/src/hooks/api/ca/enums.tsx b/frontend/src/hooks/api/ca/enums.tsxindex 86d38a9edb..65ce496950 100644--- a/frontend/src/hooks/api/ca/enums.tsx+++ b/frontend/src/hooks/api/ca/enums.tsx@@ -30,7 +30,8 @@ export enum AcmeDnsProvider {Cloudflare = "cloudflare",DNSMadeEasy = "dns-made-easy",AzureDNS = "azure-dns",- PowerDns = "powerdns"+ PowerDns = "powerdns",+ GcpCloudDns = "gcp-cloud-dns"}export enum CaRenewalStatus {diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsxindex ad5f221e7c..900acefe4a 100644--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsx+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AcmeFields.tsx@@ -31,6 +31,7 @@ import {import { AppConnectionSelectField } from "./AppConnectionSelectField";import { REQUIRED_EAB_DIRECTORIES } from "./constants";+import { GcpCloudDnsZoneFields } from "./GcpCloudDnsZoneFields";import { FormData } from "./schema";type Props = {@@ -244,6 +245,13 @@ export const AcmeFields = ({)}/>)}+ {dnsProvider === AcmeDnsProvider.GcpCloudDns && (+ <GcpCloudDnsZoneFields+ key={dnsAppConnection.id}+ control={control}+ connectionId={dnsAppConnection.id}+ />+ )}<Controllercontrol={control}defaultValue=""diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/GcpCloudDnsZoneFields.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/GcpCloudDnsZoneFields.tsxnew file mode 100644index 0000000000..00267dee7e--- /dev/null+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/GcpCloudDnsZoneFields.tsx@@ -0,0 +1,120 @@+import { useState } from "react";+import { Control, Controller } from "react-hook-form";+import { SingleValue } from "react-select";++import { Field, FieldError, FieldLabel, FilterableSelect } from "@app/components/v3";+import {+ useGcpConnectionListCloudDnsProjects,+ useGcpConnectionListCloudDnsZones+} from "@app/hooks/api/appConnections/gcp/queries";+import { TGcpCloudDnsZone, TGcpProject } from "@app/hooks/api/appConnections/gcp/types";++import { FormData } from "./schema";++type Props = {+ control: Control<FormData>;+ connectionId: string;+};++const getProjectIdFromZone = (zoneResourceName?: string | null) =>+ zoneResourceName?.split("/")[1] ?? "";++const GcpCloudDnsZoneSelect = ({+ connectionId,+ gcpProjectId,+ value,+ onChange,+ error+}: {+ connectionId: string;+ gcpProjectId: string;+ value?: string | null;+ onChange: (value: string) => void;+ error?: { message?: string };+}) => {+ const { data: zones = [], isPending: isZonesPending } = useGcpConnectionListCloudDnsZones(+ { connectionId, gcpProjectId },+ { enabled: Boolean(connectionId) && Boolean(gcpProjectId) }+ );++ return (+ <Field className="mb-4">+ <FieldLabel>+ Zone <span className="text-danger">*</span>+ </FieldLabel>+ <FilterableSelect+ isLoading={isZonesPending && Boolean(connectionId) && Boolean(gcpProjectId)}+ isDisabled={!connectionId || !gcpProjectId}+ value={+ zones.find((zone) => zone.id === value) ||+ (value ? { id: value, name: value.split("/").pop() ?? value, dnsName: "" } : null)+ }+ onChange={(option) => {+ onChange((option as SingleValue<TGcpCloudDnsZone>)?.id ?? "");+ }}+ options={zones}+ placeholder="Select a zone..."+ noOptionsMessage={() => "No public managed zones found in this project."}+ getOptionLabel={(option) =>+ option.dnsName ? `${option.dnsName} (${option.name})` : option.name+ }+ getOptionValue={(option) => option.id}+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </Field>+ );+};++export const GcpCloudDnsZoneFields = ({ control, connectionId }: Props) => {+ const [selectedProjectId, setSelectedProjectId] = useState<string>();++ const { data: projects = [], isPending: isProjectsPending } =+ useGcpConnectionListCloudDnsProjects(connectionId, { enabled: Boolean(connectionId) });++ return (+ <Controller+ name="configuration.dnsProviderConfig.hostedZoneId"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => {+ const gcpProjectId = selectedProjectId ?? getProjectIdFromZone(value);++ return (+ <>+ <Field className="mb-4">+ <FieldLabel>+ GCP Project <span className="text-danger">*</span>+ </FieldLabel>+ <FilterableSelect+ isLoading={isProjectsPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={+ projects.find((project) => project.id === gcpProjectId) ||+ (gcpProjectId ? { id: gcpProjectId, name: gcpProjectId } : null)+ }+ onChange={(option) => {+ setSelectedProjectId((option as SingleValue<TGcpProject>)?.id ?? "");+ onChange("");+ }}+ options={projects}+ placeholder="Select a project..."+ noOptionsMessage={() =>+ "No projects found. Grant the connection's service account the DNS Administrator role on your project and enable the Cloud DNS API there."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ </Field>+ <GcpCloudDnsZoneSelect+ connectionId={connectionId}+ gcpProjectId={gcpProjectId}+ value={value}+ onChange={onChange}+ error={error}+ />+ </>+ );+ }}+ />+ );+};diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsxindex b8ee26af58..8422babd8c 100644--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx@@ -401,6 +401,14 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {enabled: caType === CaType.ACME});+ const { data: availableGcpConnections, isPending: isGcpPending } = useListAvailableAppConnections(+ AppConnection.GCP,+ currentProject.id,+ {+ enabled: caType === CaType.ACME+ }+ );+const { data: availableAzureConnections, isPending: isAzurePending } =useListAvailableAppConnections(AppConnection.AzureADCS, currentProject.id, {enabled: caType === CaType.AZURE_AD_CS@@ -458,7 +466,8 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {...(availableCloudflareConnections || []),...(availableDNSMadeEasyConnections || []),...(availableAzureDNSConnections || []),- ...(availablePowerDnsConnections || [])+ ...(availablePowerDnsConnections || []),+ ...(availableGcpConnections || [])];}, [caType,@@ -467,6 +476,7 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {availableDNSMadeEasyConnections,availableAzureDNSConnections,availablePowerDnsConnections,+ availableGcpConnections,availableAzureConnections,availableAdcsConnections,availableAwsConnections,@@ -487,6 +497,8 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {return availableAzureDNSConnections || [];case AcmeDnsProvider.PowerDns:return availablePowerDnsConnections || [];+ case AcmeDnsProvider.GcpCloudDns:+ return availableGcpConnections || [];default:return [];}@@ -496,7 +508,8 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {availableCloudflareConnections,availableDNSMadeEasyConnections,availableAzureDNSConnections,- availablePowerDnsConnections+ availablePowerDnsConnections,+ availableGcpConnections]);const isPending =@@ -504,7 +517,8 @@ export const ExternalCaModal = ({ popUp, handlePopUpToggle }: Props) => {isCloudflarePending ||isDNSMadeEasyPending ||isAzureDNSPending ||- isPowerDnsPending) &&+ isPowerDnsPending ||+ isGcpPending) &&caType === CaType.ACME) ||(isAzurePending && caType === CaType.AZURE_AD_CS) ||(isAdcsPending && caType === CaType.ADCS) ||