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
Address PR comments
Carlos Monastyrski17f911455e96
diff --git a/backend/src/lib/gateway-v2/adcs-rpc.ts b/backend/src/lib/gateway-v2/adcs-rpc.tsindex 59064c36c8..4b6c8200c4 100644--- a/backend/src/lib/gateway-v2/adcs-rpc.ts+++ b/backend/src/lib/gateway-v2/adcs-rpc.ts@@ -2,7 +2,7 @@ import http from "node:http";import { logger } from "@app/lib/logger";-export type AdcsRpcEndpoint = "/v1/test" | "/v1/discover-ca" | "/v1/templates" | "/v1/enroll";+export type AdcsRpcEndpoint = "/v1/test" | "/v1/discover-ca" | "/v1/templates" | "/v1/enroll" | "/v1/revoke";export type AdcsRpcRequestBody = {username: string;@@ -21,6 +21,7 @@ export type AdcsEnrollResult = {dispositionMessage?: string;hresult?: number;};+export type AdcsRevokeResult = { ok: boolean };// CR_DISP_* request-disposition codes (small values) from ICertRequestD::Request.const ADCS_REQUEST_DISPOSITIONS: Record<number, string> = {diff --git a/backend/src/server/routes/v1/certificate-authority-routers/adcs-certificate-authority-router.ts b/backend/src/server/routes/v1/certificate-authority-routers/adcs-certificate-authority-router.tsindex 88ecb533ac..bf5818da30 100644--- a/backend/src/server/routes/v1/certificate-authority-routers/adcs-certificate-authority-router.ts+++ b/backend/src/server/routes/v1/certificate-authority-routers/adcs-certificate-authority-router.ts@@ -2,7 +2,6 @@ import { z } from "zod";import { EventType } from "@app/ee/services/audit-log/audit-log-types";import { readLimit } from "@app/server/config/rateLimiter";-import { openApiHidden } from "@app/server/lib/schemas";import { verifyAuth } from "@app/server/plugins/auth/verify-auth";import { AuthMode } from "@app/services/auth/auth-type";import {@@ -36,9 +35,6 @@ export const registerADCSCertificateAuthorityRouter = async (server: FastifyZodPparams: z.object({caId: z.string().describe("ADCS CA ID")}),- querystring: z.object({- projectId: z.string().optional().describe(openApiHidden())- }),response: {200: z.object({templates: z.array(diff --git a/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.ts b/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.tsindex 05c5c3f487..00f43bff79 100644--- a/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.ts+++ b/backend/src/server/routes/v1/certificate-authority-routers/internal-certificate-authority-router.ts@@ -764,7 +764,7 @@ export const registerInternalCertificateAuthorityRouter = async (server: Fastifyserver.route({method: "POST",- url: "/:caId/install-certificate-adcs-native",+ url: "/:caId/install-certificate-native-adcs",config: {rateLimit: writeLimit},diff --git a/backend/src/services/app-connection/app-connection-maps.ts b/backend/src/services/app-connection/app-connection-maps.tsindex 1467a8c61c..ffe22bf104 100644--- a/backend/src/services/app-connection/app-connection-maps.ts+++ b/backend/src/services/app-connection/app-connection-maps.ts@@ -10,7 +10,7 @@ export const APP_CONNECTION_NAME_MAP: Record<AppConnection, string> = {[AppConnection.AzureClientSecrets]: "Azure Client Secrets",[AppConnection.AzureDevOps]: "Azure DevOps",[AppConnection.AzureADCS]: "Azure ADCS (Web Enrollment)",- [AppConnection.ADCS]: "ADCS",+ [AppConnection.ADCS]: "Microsoft ADCS",[AppConnection.AzureDNS]: "Azure DNS",[AppConnection.Databricks]: "Databricks",[AppConnection.Humanitec]: "Humanitec",diff --git a/backend/src/services/certificate-authority/adcs/adcs-certificate-authority-fns.ts b/backend/src/services/certificate-authority/adcs/adcs-certificate-authority-fns.tsindex 3c261efc9c..6fb65f8730 100644--- a/backend/src/services/certificate-authority/adcs/adcs-certificate-authority-fns.ts+++ b/backend/src/services/certificate-authority/adcs/adcs-certificate-authority-fns.ts@@ -4,15 +4,16 @@ import RE2 from "re2";import { TableName } from "@app/db/schemas";import { TGatewayPoolServiceFactory } from "@app/ee/services/gateway-pool/gateway-pool-service";import { TGatewayV2ServiceFactory } from "@app/ee/services/gateway-v2/gateway-v2-service";-import { crypto } from "@app/lib/crypto/cryptography";import { BadRequestError, NotFoundError } from "@app/lib/errors";import {ADCS_DISPOSITION_ISSUED,AdcsEnrollResult,+ AdcsRevokeResult,AdcsTemplatesResult,describeAdcsDisposition} from "@app/lib/gateway-v2/adcs-rpc";import { ProcessedPermissionRules } from "@app/lib/knex/permission-filter-utils";+import { logger } from "@app/lib/logger";import { OrgServiceActor } from "@app/lib/types";import { executeAdcsGatewayOperation, resolveAdcsCaName } from "@app/services/app-connection/adcs";import { TAppConnectionDALFactory } from "@app/services/app-connection/app-connection-dal";@@ -27,8 +28,9 @@ import {CertKeyUsage,CertSignatureAlgorithm,CertStatus,- TAltNameType+ CrlReason} from "@app/services/certificate/certificate-types";+import { generateLeafKeypairAndCsr } from "@app/services/certificate-common/certificate-csr-utils";import { calculateFinalRenewBeforeDays } from "@app/services/certificate-common/certificate-issuance-utils";import { CertificateRequestCancelledError } from "@app/services/certificate-common/certificate-request-errors";import { TCertificateProfileDALFactory } from "@app/services/certificate-profile/certificate-profile-dal";@@ -61,6 +63,19 @@ const SIG_ALG_MAP: Record<string, Record<string, CertSignatureAlgorithm>> = {}};+// RFC 5280 section 5.3.1 CRLReason codes, which MS-CSRA ICertAdminD::RevokeCertificate expects as `Reason`.+const ADCS_CRL_REASON_CODES: Record<CrlReason, number> = {+ [CrlReason.UNSPECIFIED]: 0,+ [CrlReason.KEY_COMPROMISE]: 1,+ [CrlReason.CA_COMPROMISE]: 2,+ [CrlReason.AFFILIATION_CHANGED]: 3,+ [CrlReason.SUPERSEDED]: 4,+ [CrlReason.CESSATION_OF_OPERATION]: 5,+ [CrlReason.CERTIFICATE_HOLD]: 6,+ [CrlReason.PRIVILEGE_WITHDRAWN]: 9,+ [CrlReason.A_A_COMPROMISE]: 10+};+// The CA (not the request) decides how it signs, so read the algorithm off the issued certificate.const extractIssuedSignatureAlgorithm = (certObj: x509.X509Certificate): CertSignatureAlgorithm | undefined => {try {@@ -134,7 +149,7 @@ type TADCSCertificateAuthorityFnsDeps = {"create" | "transaction" | "findByIdWithAssociatedCa" | "updateById" | "findWithAssociatedCa" | "findById">;externalCertificateAuthorityDAL: Pick<TExternalCertificateAuthorityDALFactory, "create" | "update">;- certificateDAL: Pick<TCertificateDALFactory, "create" | "transaction" | "updateById">;+ certificateDAL: Pick<TCertificateDALFactory, "create" | "findOne" | "transaction" | "updateById">;certificateBodyDAL: Pick<TCertificateBodyDALFactory, "create">;certificateSecretDAL: Pick<TCertificateSecretDALFactory, "create">;kmsService: Pick<@@ -471,27 +486,13 @@ export const ADCSCertificateAuthorityFns = ({if (csr) {csrDerBase64 = Buffer.from(new Uint8Array(new x509.Pkcs10CertificateRequest(csr).rawData)).toString("base64");} else {- const leafKeys = await crypto.nativeCrypto.subtle.generateKey(alg, true, ["sign", "verify"]);- const skLeafObj = crypto.nativeCrypto.KeyObject.from(leafKeys.privateKey);- skLeaf = skLeafObj.export({ format: "pem", type: "pkcs8" }) as string;-- const subjectDN = buildSubjectDN(commonName);-- const csrObj = await x509.Pkcs10CertificateRequestGenerator.create({- name: subjectDN,- keys: leafKeys,- signingAlgorithm: alg,- ...(altNames.length > 0 && {- extensions: [- new x509.SubjectAlternativeNameExtension(- altNames.map((sanValue) => ({ type: "dns" as TAltNameType, value: sanValue })),- false- )- ]- })+ const generated = await generateLeafKeypairAndCsr({+ subjectName: buildSubjectDN(commonName),+ algorithm: alg,+ altNames});-- csrDerBase64 = Buffer.from(new Uint8Array(csrObj.rawData)).toString("base64");+ skLeaf = generated.privateKeyPem;+ csrDerBase64 = generated.csrDerBase64;}const enrollResult = await executeAdcsGatewayOperation<AdcsEnrollResult>(@@ -654,6 +655,55 @@ export const ADCSCertificateAuthorityFns = ({}));};+ const revokeCertificate = async ({+ caId,+ serialNumber,+ reason+ }: {+ caId: string;+ serialNumber: string;+ reason: CrlReason;+ }) => {+ const ca = await certificateAuthorityDAL.findByIdWithAssociatedCa(caId);+ if (!ca.externalCa || ca.externalCa.type !== CaType.ADCS) {+ throw new BadRequestError({ message: `CA is not a Microsoft ADCS certificate authority [caId=${caId}]` });+ }++ const cert = await certificateDAL.findOne({ caId, serialNumber });+ if (!cert) {+ throw new NotFoundError({+ message: `Certificate not found for revocation [caId=${caId}] [serialNumber=${serialNumber}]`+ });+ }++ const adcsCa = castDbEntryToADCSCertificateAuthority(ca);+ const { credentials, gatewayId, gatewayPoolId } = await getAdcsConnectionCredentials(+ adcsCa.configuration.appConnectionId,+ appConnectionDAL,+ kmsService+ );++ // Unlike issuance, revocation is an MS-CSRA (ICertAdminD::RevokeCertificate) operation,+ // so it targets /v1/revoke and requires the connection account to hold Manage CA (Certificate Manager)+ // rights rather than just Enroll. AD CS identifies the certificate by its serial number as plain hex+ // with no leading "0x" — the form it is already stored in — so it is forwarded unchanged.+ await executeAdcsGatewayOperation<AdcsRevokeResult>(+ {+ gatewayId,+ gatewayPoolId,+ credentials,+ endpoint: "/v1/revoke",+ caName: adcsCa.configuration.caName,+ params: { serialNumber, reason: ADCS_CRL_REASON_CODES[reason] }+ },+ { gatewayV2Service, gatewayPoolService }+ );++ logger.info(+ `Microsoft ADCS certificate revocation submitted [caId=${caId}] [certificateId=${cert.id}] [serialNumber=${serialNumber}] [reason=${reason}]`+ );+ };+return {createCertificateAuthority,getCertificateAuthority,@@ -661,6 +711,7 @@ export const ADCSCertificateAuthorityFns = ({deleteCertificateAuthority,listCertificateAuthorities,orderCertificate,- getCertificateTemplates+ getCertificateTemplates,+ revokeCertificate};};diff --git a/backend/src/services/certificate-authority/certificate-authority-maps.ts b/backend/src/services/certificate-authority/certificate-authority-maps.tsindex 3aaae9b5e7..e6e63688ed 100644--- a/backend/src/services/certificate-authority/certificate-authority-maps.ts+++ b/backend/src/services/certificate-authority/certificate-authority-maps.ts@@ -4,7 +4,7 @@ export const CERTIFICATE_AUTHORITIES_TYPE_MAP: Record<CaType, string> = {[CaType.INTERNAL]: "Internal",[CaType.ACME]: "ACME-compatible CA",[CaType.AZURE_AD_CS]: "Active Directory Certificate Service",- [CaType.ADCS]: "Active Directory Certificate Service (Gateway)",+ [CaType.ADCS]: "Microsoft ADCS",[CaType.AWS_PCA]: "AWS Private Certificate Authority",[CaType.DIGICERT]: "DigiCert",[CaType.AWS_ACM_PUBLIC_CA]: "AWS ACM Public CA",@@ -24,11 +24,7 @@ export const CERTIFICATE_AUTHORITIES_CAPABILITIES_MAP: Record<CaType, CaCapabiliCaCapability.RENEW_CERTIFICATES// Note: REVOKE_CERTIFICATES intentionally omitted - not supported by ADCS connector],- [CaType.ADCS]: [- CaCapability.ISSUE_CERTIFICATES,- CaCapability.RENEW_CERTIFICATES- // Note: REVOKE_CERTIFICATES intentionally omitted - MS-WCCE enrollment does not support revocation- ],+ [CaType.ADCS]: [CaCapability.ISSUE_CERTIFICATES, CaCapability.REVOKE_CERTIFICATES, CaCapability.RENEW_CERTIFICATES],[CaType.AWS_PCA]: [CaCapability.ISSUE_CERTIFICATES,CaCapability.REVOKE_CERTIFICATES,diff --git a/backend/src/services/certificate-authority/certificate-authority-service.ts b/backend/src/services/certificate-authority/certificate-authority-service.tsindex 19935a1296..b9a3a918d9 100644--- a/backend/src/services/certificate-authority/certificate-authority-service.ts+++ b/backend/src/services/certificate-authority/certificate-authority-service.ts@@ -70,10 +70,7 @@ import {AzureAdCsCertificateAuthorityFns,castDbEntryToAzureAdCsCertificateAuthority} from "./azure-ad-cs/azure-ad-cs-certificate-authority-fns";-import {- TCreateAzureAdCsCertificateAuthorityDTO,- TUpdateAzureAdCsCertificateAuthorityDTO-} from "./azure-ad-cs/azure-ad-cs-certificate-authority-types";+import { TUpdateAzureAdCsCertificateAuthorityDTO } from "./azure-ad-cs/azure-ad-cs-certificate-authority-types";import { TCertificateAuthorityDALFactory } from "./certificate-authority-dal";import { CaType } from "./certificate-authority-enums";import {@@ -342,12 +339,9 @@ export const certificateAuthorityServiceFactory = ({}if (type === CaType.AZURE_AD_CS) {- return azureAdCsFns.createCertificateAuthority({- name,- projectId,- configuration: configuration as TCreateAzureAdCsCertificateAuthorityDTO["configuration"],- status,- actor+ throw new BadRequestError({+ message:+ "Creating new Azure ADCS (Web Enrollment) certificate authorities is no longer supported. Use the Microsoft ADCS connection instead."});}@@ -1288,6 +1282,11 @@ export const certificateAuthorityServiceFactory = ({return;}+ if (caType === CaType.ADCS) {+ await adcsFns.revokeCertificate({ caId, serialNumber, reason });+ return;+ }+throw new BadRequestError({message: `Certificate revocation via CA service is not supported for CA type "${caType}"`});diff --git a/backend/src/services/certificate-common/certificate-csr-utils.ts b/backend/src/services/certificate-common/certificate-csr-utils.tsindex 6905f0d2b6..f37c764710 100644--- a/backend/src/services/certificate-common/certificate-csr-utils.ts+++ b/backend/src/services/certificate-common/certificate-csr-utils.ts@@ -1,5 +1,6 @@import * as x509 from "@peculiar/x509";+import { crypto } from "@app/lib/crypto/cryptography";import { BadRequestError } from "@app/lib/errors";import {@@ -11,7 +12,7 @@ import {TAltNameMapping,TAltNameType} from "../certificate/certificate-types";-import { extractDnParts } from "../certificate-authority/certificate-authority-fns";+import { extractDnParts, keyAlgorithmToAlgCfg } from "../certificate-authority/certificate-authority-fns";import { validateAndMapAltNameType } from "../certificate-authority/certificate-authority-validators";import { TCertificateRequest } from "../certificate-policy/certificate-policy-types";import { mapLegacyExtendedKeyUsageToStandard, mapLegacyKeyUsageToStandard } from "./certificate-constants";@@ -319,3 +320,42 @@ export const extractAlgorithmsFromCSR = (csr: string) => {signatureAlgorithm: normalizedSignatureAlg};};++/**+ * Generates a leaf keypair and builds a PKCS#10 CSR for it. Callers pass the subject DN and the+ * WebCrypto algorithm config (from keyAlgorithmToAlgCfg); DNS SANs are optional.+ * Returns the private key (PKCS#8 PEM) plus the CSR in both PEM and base64-DER form.+ */+export const generateLeafKeypairAndCsr = async ({+ subjectName,+ algorithm,+ altNames = []+}: {+ subjectName: string;+ algorithm: ReturnType<typeof keyAlgorithmToAlgCfg>;+ altNames?: string[];+}): Promise<{ privateKeyPem: string; csrPem: string; csrDerBase64: string }> => {+ const leafKeys = await crypto.nativeCrypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);+ const skLeafObj = crypto.nativeCrypto.KeyObject.from(leafKeys.privateKey);+ const privateKeyPem = skLeafObj.export({ format: "pem", type: "pkcs8" }) as string;++ const csrObj = await x509.Pkcs10CertificateRequestGenerator.create({+ name: subjectName,+ keys: leafKeys,+ signingAlgorithm: algorithm,+ ...(altNames.length > 0 && {+ extensions: [+ new x509.SubjectAlternativeNameExtension(+ altNames.map((value) => ({ type: "dns" as TAltNameType, value })),+ false+ )+ ]+ })+ });++ return {+ privateKeyPem,+ csrPem: csrObj.toString("pem"),+ csrDerBase64: Buffer.from(new Uint8Array(csrObj.rawData)).toString("base64")+ };+};diff --git a/backend/src/services/certificate/certificate-service.ts b/backend/src/services/certificate/certificate-service.tsindex 0b531e9439..175afce4f2 100644--- a/backend/src/services/certificate/certificate-service.ts+++ b/backend/src/services/certificate/certificate-service.ts@@ -536,7 +536,8 @@ export const certificateServiceFactory = ({ca.externalCa?.type === CaType.AWS_PCA ||ca.externalCa?.type === CaType.AWS_ACM_PUBLIC_CA ||ca.externalCa?.type === CaType.DIGICERT ||- ca.externalCa?.type === CaType.GODADDY+ ca.externalCa?.type === CaType.GODADDY ||+ ca.externalCa?.type === CaType.ADCS) {await certificateAuthorityService.revokeCertificate({caId: ca.id,diff --git a/docs/docs.json b/docs/docs.jsonindex 3c29ca55bf..b2351b1af5 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -112,7 +112,6 @@"integrations/app-connections/adcs","integrations/app-connections/aws","integrations/app-connections/azure-app-configuration",- "integrations/app-connections/azure-adcs","integrations/app-connections/azure-client-secrets","integrations/app-connections/azure-devops","integrations/app-connections/azure-dns",@@ -893,7 +892,6 @@"documentation/platform/pki/ca/digicert-direct","documentation/platform/pki/ca/godaddy","documentation/platform/pki/ca/sectigo",- "documentation/platform/pki/ca/azure-adcs","documentation/platform/pki/ca/adcs","documentation/platform/pki/ca/aws-pca","documentation/platform/pki/ca/aws-acm-public-ca",diff --git a/docs/documentation/platform/pki/ca/adcs.mdx b/docs/documentation/platform/pki/ca/adcs.mdxindex 50c084d508..0ddeb3a782 100644--- a/docs/documentation/platform/pki/ca/adcs.mdx+++ b/docs/documentation/platform/pki/ca/adcs.mdx@@ -1,22 +1,13 @@----title: "Microsoft AD CS (Native)"+title: "Microsoft ADCS"description: "Learn how to issue and manage certificates using Microsoft Active Directory Certificate Services (AD CS) over MS-WCCE through an Infisical Gateway."----Issue and manage certificates using Microsoft Active Directory Certificate Services (AD CS) over the native Windows Client Certificate Enrollment protocol (MS-WCCE). Requests are relayed through an Infisical [Gateway](/documentation/platform/gateways/overview) that runs inside your network, so the AD CS server is never exposed to Infisical.--<Note>- This is the native AD CS integration (MS-WCCE over DCOM through a Gateway). It is separate from the [Azure ADCS (Web Enrollment)](/documentation/platform/pki/ca/azure-adcs) integration, which uses the AD CS web enrollment pages over HTTPS.-</Note>+Issue and manage certificates using Microsoft Active Directory Certificate Services (AD CS) over the Windows Client Certificate Enrollment protocol (MS-WCCE). Requests are relayed through an Infisical [Gateway](/documentation/platform/gateways/overview) that runs inside your network, so the AD CS server is never exposed to Infisical.## Prerequisites-Before setting up the native AD CS integration, ensure you have:--- A Microsoft Active Directory Certificate Services (AD CS) server (Enterprise CA)-- An Infisical [Gateway](/documentation/platform/gateways/overview) deployed inside the network that can reach the AD CS server over DCOM-- A domain account with Enroll permission on the certificate templates you plan to use-- An ADCS app connection configured (see [ADCS Connection](/integrations/app-connections/adcs))+Before setting up a Microsoft ADCS certificate authority, configure a [Microsoft ADCS app connection](/integrations/app-connections/adcs). It covers the AD CS server, the Infisical [Gateway](/documentation/platform/gateways/overview) (including the network and port requirements), and the domain account used for enrollment.You can use AD CS in a few ways: as an **External CA** that issues certificates directly, to back a **code signing signer**, or to **sign internal intermediate CAs** so you can build an Infisical-managed CA hierarchy backed by your AD CS server. In every case the certificate template is chosen by the issuance flow (profile, signer, or intermediate CA), not by the CA itself.@@ -31,11 +22,11 @@ You can use AD CS in a few ways: as an **External CA** that issues certificatesIn **Certificate Manager**, go to **Certificate Authorities** and scroll to the **External Certificate Authorities** section.</Step>- <Step title="Create a New ADCS Certificate Authority">+ <Step title="Create a New Microsoft ADCS Certificate Authority">Click **Create CA** and configure:- - **Type**: Choose **ADCS**+ - **Type**: Choose **Microsoft ADCS**- **Name**: Friendly name for this CA (for example, `production-adcs`)- - **ADCS Connection**: Choose your ADCS connection+ - **Microsoft ADCS Connection**: Choose your Microsoft ADCS connection- **Certificate Authority**: Optional. Leave blank to discover it automatically from the CA host.</Step>@@ -102,12 +93,12 @@ You can use AD CS in a few ways: as an **External CA** that issues certificates<Step title="Open the Install Certificate Modal">Press **Install CA Certificate** on the intermediate CA, select **External CA (Automated)**, and press **Choose Integration**.</Step>- <Step title="Select ADCS">- Choose **ADCS** as the integration provider.+ <Step title="Select Microsoft ADCS">+ Choose **Microsoft ADCS** as the integration provider.</Step><Step title="Configure Signing Details">Configure the following:- - **ADCS Connection**: Select your ADCS connection.+ - **Microsoft ADCS Connection**: Select your Microsoft ADCS connection.- **Certificate Template**: The subordinate CA template name (for example, `SubCA`).- **Path Length**: Max intermediate CAs below this one (`-1` for no limit, `0` to prevent chaining).</Step>@@ -134,7 +125,7 @@ You can use AD CS in a few ways: as an **External CA** that issues certificates</Step><Step title="Install the Certificate">```bash Request- curl --location --request POST 'https://app.infisical.com/api/v1/cert-manager/ca/internal/<ca-id>/install-certificate-adcs-native' \+ curl --location --request POST 'https://app.infisical.com/api/v1/cert-manager/ca/internal/<ca-id>/install-certificate-native-adcs' \--header 'Authorization: Bearer <access-token>' \--header 'Content-Type: application/json' \--data-raw '{@@ -180,11 +171,9 @@ You can use AD CS in a few ways: as an **External CA** that issues certificates## Limitations-<Note>- - Requests are issued immediately. Templates that require manual approval or are held by CA policy are not supported.- - Certificate revocation is not supported by the native AD CS integration.- - Authentication uses NTLM.-</Note>+- Requests are issued immediately. Templates that require manual approval or are held by CA policy are not supported.+- Revoking a certificate requires the connection account to have Manage CA (Certificate Manager) rights on the CA, which is a stronger permission than the Enroll right used for issuance.+- Authentication uses NTLM.## Troubleshootingdiff --git a/docs/documentation/platform/pki/ca/ca-renewal.mdx b/docs/documentation/platform/pki/ca/ca-renewal.mdxindex 3de61c70b5..6c5f32fef7 100644--- a/docs/documentation/platform/pki/ca/ca-renewal.mdx+++ b/docs/documentation/platform/pki/ca/ca-renewal.mdx@@ -14,7 +14,7 @@ Renew a CA certificate to extend its validity period. The renewal process varies<Note>- If renewing an intermediate CA chained to an **Infisical CA**, Infisical will automate the process of generating a new certificate for you.- - If renewing an intermediate CA signed by an **external CA provider** (e.g., Venafi, Azure AD CS), you can configure auto-renewal to automate the process. See [Venafi auto-renewal](/documentation/platform/pki/ca/venafi#auto-renewal) or [AD CS auto-renewal](/documentation/platform/pki/ca/azure-adcs#auto-renewal-for-ad-cs-signed-cas).+ - If renewing an intermediate CA signed by an **external CA provider** (e.g., Venafi, Microsoft ADCS), you can configure auto-renewal to automate the process. See [Venafi auto-renewal](/documentation/platform/pki/ca/venafi#auto-renewal) or [Microsoft ADCS auto-renewal](/documentation/platform/pki/ca/adcs).- If renewing an intermediate CA chained to an **external parent CA via manual import**, you'll need to generate a new certificate from the external parent CA and manually import it back.</Note>diff --git a/docs/documentation/platform/pki/ca/external-ca.mdx b/docs/documentation/platform/pki/ca/external-ca.mdxindex 1f984de9bb..5dce4cef4a 100644--- a/docs/documentation/platform/pki/ca/external-ca.mdx+++ b/docs/documentation/platform/pki/ca/external-ca.mdx@@ -21,7 +21,7 @@ graph TD| Type | Examples | Use Case ||------|----------|----------|| **External Public CAs** | Let's Encrypt, DigiCert, Sectigo | Public-facing services with browser trust |-| **External Private CAs** | AWS Private CA, Venafi, Azure ADCS | Internal services, cloud-hosted or on-prem |+| **External Private CAs** | AWS Private CA, Venafi, Microsoft ADCS | Internal services, cloud-hosted or on-prem |Infisical can act as an ACME client, allowing integration with any [ACME-compatible CA](/documentation/platform/pki/ca/acme-ca).@@ -56,10 +56,7 @@ Infisical can act as an ACME client, allowing integration with any [ACME-compati<Card title="AWS Private CA" icon="aws" href="/documentation/platform/pki/ca/aws-pca">Cloud-native private certificate management via AWS PCA.</Card>- <Card title="Azure ADCS (Web Enrollment)" icon="microsoft" href="/documentation/platform/pki/ca/azure-adcs">- Microsoft AD CS via the web enrollment pages over HTTPS.- </Card>- <Card title="ADCS (Native)" icon="microsoft" href="/documentation/platform/pki/ca/adcs">+ <Card title="Microsoft ADCS" icon="microsoft" href="/documentation/platform/pki/ca/adcs">Microsoft AD CS over MS-WCCE through an Infisical Gateway.</Card><Card title="Venafi TLS Protect Cloud" icon="cloud" href="/documentation/platform/pki/ca/venafi">diff --git a/docs/documentation/platform/pki/ca/overview.mdx b/docs/documentation/platform/pki/ca/overview.mdxindex a88d18379d..fb459ffb05 100644--- a/docs/documentation/platform/pki/ca/overview.mdx+++ b/docs/documentation/platform/pki/ca/overview.mdx@@ -17,7 +17,7 @@ Certificate Manager supports two types of CAs:<Card title="External CA" icon="building-columns" href="/documentation/platform/pki/ca/external-ca">**Integrated with Infisical**- Connect to public CAs (Let's Encrypt, DigiCert) or enterprise PKI (AWS PCA, Azure ADCS, Venafi). Use existing infrastructure or issue publicly trusted certificates.+ Connect to public CAs (Let's Encrypt, DigiCert) or enterprise PKI (AWS PCA, Microsoft ADCS, Venafi). Use existing infrastructure or issue publicly trusted certificates.</Card></CardGroup>@@ -27,7 +27,7 @@ Certificate Manager supports two types of CAs:|----------|----------------|| Internal services, mTLS between microservices | Private CA || Public-facing websites needing browser trust | External CA (Let's Encrypt, DigiCert) |-| Enterprise with existing PKI infrastructure | External CA (AWS PCA, Azure ADCS, Venafi) |+| Enterprise with existing PKI infrastructure | External CA (AWS PCA, Microsoft ADCS, Venafi) || IoT devices, internal device fleet | Private CA || Regulated environments with specific CA requirements | External CA (your approved provider) |@@ -59,8 +59,8 @@ Infisical integrates with major public and private CA providers:<Card title="AWS PCA" icon="aws" href="/documentation/platform/pki/ca/aws-pca">Private CA managed in AWS.</Card>- <Card title="Azure ADCS" icon="microsoft" href="/documentation/platform/pki/ca/azure-adcs">- Active Directory Certificate Services.+ <Card title="Microsoft ADCS" icon="microsoft" href="/documentation/platform/pki/ca/adcs">+ Active Directory Certificate Services over the Gateway.</Card><Card title="Venafi" icon="building" href="/documentation/platform/pki/ca/venafi">Enterprise certificate lifecycle management.diff --git a/docs/documentation/platform/pki/ca/private-ca.mdx b/docs/documentation/platform/pki/ca/private-ca.mdxindex f37d94e157..942ec72ac7 100644--- a/docs/documentation/platform/pki/ca/private-ca.mdx+++ b/docs/documentation/platform/pki/ca/private-ca.mdx@@ -91,7 +91,7 @@ Create a simple Private CA hierarchy with a root CA and intermediate CA.Infisical currently supports the following external CA providers for signing intermediate CAs:- [Venafi TLS Protect Cloud](/documentation/platform/pki/ca/venafi)- - [Azure AD CS](/documentation/platform/pki/ca/azure-adcs#signing-internal-intermediate-cas-with-ad-cs)+ - [Microsoft ADCS](/documentation/platform/pki/ca/adcs)<Note>When using an external CA, the certificate issued by the provider **must** correspond to the CSR generated by Infisical.@@ -238,7 +238,7 @@ Create a simple Private CA hierarchy with a root CA and intermediate CA.You can use an external CA provider to automatically sign the intermediate CA certificate via API. See the provider-specific documentation for the full API workflow:- [Venafi TLS Protect Cloud](/documentation/platform/pki/ca/venafi)- - [Azure AD CS](/documentation/platform/pki/ca/azure-adcs#signing-internal-intermediate-cas-with-ad-cs)+ - [Microsoft ADCS](/documentation/platform/pki/ca/adcs)<Note>When using an external CA, the certificate issued by the provider **must** correspond to the CSR generated by Infisical.@@ -259,7 +259,7 @@ Create a simple Private CA hierarchy with a root CA and intermediate CA.Infisical supports `RSA 2048`, `RSA 4096`, `ECDSA P-256`, `ECDSA P-384` key algorithms specified at the time of creating a CA.</Accordion><Accordion title="Does Infisical support chaining an Intermediate CA to an external CA?">- Yes. You can either manually obtain a CSR and import the signed certificate, or use an integrated external CA provider like [Venafi TLS Protect Cloud](/documentation/platform/pki/ca/venafi) or [Azure AD CS](/documentation/platform/pki/ca/azure-adcs#signing-internal-intermediate-cas-with-ad-cs) to automate the signing process.+ Yes. You can either manually obtain a CSR and import the signed certificate, or use an integrated external CA provider like [Venafi TLS Protect Cloud](/documentation/platform/pki/ca/venafi) or [Microsoft ADCS](/documentation/platform/pki/ca/adcs) to automate the signing process.</Accordion></AccordionGroup>diff --git a/docs/documentation/platform/pki/concepts/certificate-components.mdx b/docs/documentation/platform/pki/concepts/certificate-components.mdxindex 20c8f3896d..fea583196b 100644--- a/docs/documentation/platform/pki/concepts/certificate-components.mdx+++ b/docs/documentation/platform/pki/concepts/certificate-components.mdx@@ -8,7 +8,7 @@ description: "Learn the main components for managing certificates with InfisicalThe following resources define how certificates are issued, shaped, and governed in Infisical:- [Certificate Authority (CA)](/documentation/platform/pki/ca/overview): The trusted entity that issues X.509 certificates. This can be an [Internal CA](/documentation/platform/pki/ca/private-ca) or an [External CA](/documentation/platform/pki/ca/external-ca) in Infisical.- The former represents a fully managed CA hierarchy within Infisical, while the latter represents an external CA (e.g. [DigiCert](/documentation/platform/pki/ca/digicert), [Let's Encrypt](/documentation/platform/pki/ca/lets-encrypt), [Microsoft AD CS](/documentation/platform/pki/ca/azure-adcs), etc.) that can be integrated with Infisical.+ The former represents a fully managed CA hierarchy within Infisical, while the latter represents an external CA (e.g. [DigiCert](/documentation/platform/pki/ca/digicert), [Let's Encrypt](/documentation/platform/pki/ca/lets-encrypt), [Microsoft AD CS](/documentation/platform/pki/ca/adcs), etc.) that can be integrated with Infisical.- [Certificate Policy](/documentation/platform/pki/settings/policies): A policy structure specifying permitted attributes for requested certificates. This includes constraints around subject naming conventions, SAN fields, key usages, and extended key usages.diff --git a/docs/integrations/app-connections/adcs.mdx b/docs/integrations/app-connections/adcs.mdxindex 7c2c638dc9..6680a47674 100644--- a/docs/integrations/app-connections/adcs.mdx+++ b/docs/integrations/app-connections/adcs.mdx@@ -1,24 +1,18 @@----title: "ADCS Connection"-description: "Learn how to configure a native ADCS Connection for Infisical certificate management."+title: "Microsoft ADCS Connection"+description: "Learn how to configure a Microsoft ADCS Connection for Infisical certificate management."---Connect Infisical to Microsoft Active Directory Certificate Services (AD CS) over MS-WCCE through an Infisical [Gateway](/documentation/platform/gateways/overview). The Gateway runs inside your network and speaks to the CA directly, so the AD CS server never needs to be exposed to Infisical.-<Note>- This is the native AD CS integration. It talks to the CA over the Windows Client Certificate Enrollment protocol (MS-WCCE) through a Gateway. It is separate from the [Azure ADCS (Web Enrollment)](/integrations/app-connections/azure-adcs) connection, which uses the AD CS web enrollment pages over HTTPS.-</Note>-## Prerequisites- A Microsoft Active Directory Certificate Services (AD CS) server (Enterprise CA)- An Infisical [Gateway](/documentation/platform/gateways/overview) deployed inside the network that can reach the AD CS server-- A domain account with Enroll permission on the certificate templates you plan to use-- Network connectivity from the Gateway to the AD CS server over DCOM (MS-WCCE)--<Note>- The connection authenticates with NTLM. The Gateway reaches the CA host over DCOM. No inbound access to the AD CS server from Infisical is required, and no configuration file is created on the Gateway.-</Note>+- A domain account with Enroll permission on the certificate templates you plan to use (and Manage CA / Certificate Manager rights if you want to revoke certificates)+- Network reachability from the Gateway to the AD CS server on:+ - **TCP 135** (RPC endpoint mapper) and the server's **dynamic RPC port range** (default `49152-65535`) for MS-WCCE over DCOM+ - **TCP 445** (SMB) only if you rely on automatic CA-name discovery (reads the CA name over the Remote Registry service)## Connection Setup@@ -28,7 +22,7 @@ Connect Infisical to Microsoft Active Directory Certificate Services (AD CS) ove</Step><Step title="Add Connection">- Select the **ADCS Connection** option from the connection options modal.+ Select the **Microsoft ADCS Connection** option from the connection options modal.</Step><Step title="Configure Connection Details">- **Name**: Friendly name for this connection (for example, `production-adcs`)@@ -40,10 +34,6 @@ Connect Infisical to Microsoft Active Directory Certificate Services (AD CS) oveA Gateway is required. The control plane cannot reach AD CS over DCOM directly, so every operation is relayed through the Gateway.</Step><Step title="Connection Created">- Your **ADCS Connection** is now available for use in your Infisical projects.+ Your **Microsoft ADCS Connection** is now available for use in your Infisical projects.</Step></Steps>--## Certificate Authority Name--The AD CS certificate authority name is discovered automatically from the CA host, so you do not have to enter it. If discovery cannot run in your environment (for example, the Remote Registry service is disabled on the CA host), provide the certificate authority name explicitly when creating the [external CA](/documentation/platform/pki/ca/adcs).diff --git a/frontend/src/helpers/appConnections.ts b/frontend/src/helpers/appConnections.tsindex c90368747f..a6d0cf7b91 100644--- a/frontend/src/helpers/appConnections.ts+++ b/frontend/src/helpers/appConnections.ts@@ -160,7 +160,7 @@ export const APP_CONNECTION_MAP: Record<description: "Issue certificates via Active Directory Certificate Services web enrollment."},[AppConnection.ADCS]: {- name: "ADCS",+ name: "Microsoft ADCS",image: "Microsoft Azure.png",category: "CERTIFICATES",description: "Issue certificates via Active Directory Certificate Services over the Gateway."diff --git a/frontend/src/hooks/api/ca/constants.tsx b/frontend/src/hooks/api/ca/constants.tsxindex ab1717d7fd..46aeac93fc 100644--- a/frontend/src/hooks/api/ca/constants.tsx+++ b/frontend/src/hooks/api/ca/constants.tsx@@ -40,7 +40,11 @@ export const CA_TYPE_CAPABILITIES_MAP: Record<CaType, CaCapability[]> = {CaCapability.RENEW_CERTIFICATES],[CaType.AZURE_AD_CS]: [CaCapability.ISSUE_CERTIFICATES, CaCapability.RENEW_CERTIFICATES],- [CaType.ADCS]: [CaCapability.ISSUE_CERTIFICATES, CaCapability.RENEW_CERTIFICATES],+ [CaType.ADCS]: [+ CaCapability.ISSUE_CERTIFICATES,+ CaCapability.REVOKE_CERTIFICATES,+ CaCapability.RENEW_CERTIFICATES+ ],[CaType.AWS_PCA]: [CaCapability.ISSUE_CERTIFICATES,CaCapability.REVOKE_CERTIFICATES,@@ -67,7 +71,7 @@ export const CA_TYPE_CAPABILITIES_MAP: Record<CaType, CaCapability[]> = {export const EXTERNAL_CA_TYPE_NAME_MAP: Record<string, string> = {[CaType.ACME]: "ACME",[CaType.AZURE_AD_CS]: "Azure ADCS (Web Enrollment)",- [CaType.ADCS]: "ADCS",+ [CaType.ADCS]: "Microsoft ADCS",[CaType.AWS_PCA]: "AWS Private CA (PCA)",[CaType.DIGICERT]: "DigiCert CertCentral",[CaType.AWS_ACM_PUBLIC_CA]: "AWS ACM Public CA",diff --git a/frontend/src/hooks/api/ca/mutations.tsx b/frontend/src/hooks/api/ca/mutations.tsxindex c0e00d3a24..efd9213226 100644--- a/frontend/src/hooks/api/ca/mutations.tsx+++ b/frontend/src/hooks/api/ca/mutations.tsx@@ -256,7 +256,7 @@ export const useInstallCaCertificateVenafi = () =>export const useInstallCaCertificateAdcs = () =>useInstallCaCertificate("install-certificate-adcs");export const useInstallCaCertificateAdcsNative = () =>- useInstallCaCertificate("install-certificate-adcs-native");+ useInstallCaCertificate("install-certificate-native-adcs");export const useCreateCaSigningConfig = () => {const queryClient = useQueryClient();diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/AdcsNativeCaInstallForm.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/AdcsNativeCaInstallForm.tsxindex 833d0d0c24..8e86a4b064 100644--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/AdcsNativeCaInstallForm.tsx+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/AdcsNativeCaInstallForm.tsx@@ -121,7 +121,7 @@ export const AdcsNativeCaInstallForm = ({ caId, handlePopUpToggle }: Props) => {name="appConnectionId"render={({ field: { onChange, value }, fieldState: { error } }) => (<FormControl- label="ADCS Connection"+ label="Microsoft ADCS Connection"errorText={error?.message}isError={Boolean(error)}isRequired@@ -134,7 +134,7 @@ export const AdcsNativeCaInstallForm = ({ caId, handlePopUpToggle }: Props) => {onChange(selected?.id ?? "");}}options={availableAdcsConnections || []}- placeholder="Select an ADCS connection..."+ placeholder="Select a Microsoft ADCS connection..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}/>diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/CaInstallCertModal.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/CaInstallCertModal.tsxindex 348d4338a9..b4c40be5e1 100644--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/CaInstallCertModal.tsx+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/CaInstallCertModal/CaInstallCertModal.tsx@@ -73,16 +73,10 @@ const INTEGRATIONS: TIntegration[] = [description: "Automated certificate lifecycle management",image: "/images/integrations/Venafi.png"},- {- id: "azure-adcs",- name: "Azure AD CS (Web Enrollment)",- description: "Microsoft Active Directory Certificate Services",- image: "/images/integrations/Microsoft Azure.png"- },{id: "adcs",- name: "ADCS",- description: "Microsoft AD CS (native)",+ name: "Microsoft ADCS",+ description: "Microsoft Active Directory Certificate Services",image: "/images/integrations/Microsoft Azure.png"}];diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsxindex 432063727a..6eb522f172 100644--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaModal.tsx@@ -259,8 +259,7 @@ type Props = {const caTypes = [{ label: "ACME", value: CaType.ACME },- { label: "Azure ADCS (Web Enrollment)", value: CaType.AZURE_AD_CS },- { label: "ADCS", value: CaType.ADCS },+ { label: "Microsoft ADCS", value: CaType.ADCS },{ label: "AWS Private CA (PCA)", value: CaType.AWS_PCA },{ label: "AWS ACM Public CA", value: CaType.AWS_ACM_PUBLIC_CA },{ label: "DigiCert CertCentral", value: CaType.DIGICERT },diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsxindex 8409182620..9eefe6537c 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsx@@ -72,6 +72,11 @@ export const AppConnectionsSelect = ({ onSelect, projectType }: Props) => {const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["upgradePlan"] as const);const [search, setSearch] = useState("");+ const visibleOptions = useMemo(+ () => (appConnectionOptions ?? []).filter((option) => option.app !== AppConnection.AzureADCS),+ [appConnectionOptions]+ );+const handleSelect = (app: AppConnection) => {if (APP_CONNECTION_MAP[app].enterprise && !subscription.enterpriseAppConnections) {handlePopUpOpen("upgradePlan", { isEnterpriseFeature: true });@@ -82,16 +87,16 @@ export const AppConnectionsSelect = ({ onSelect, projectType }: Props) => {const optionsByApp = useMemo(() => {const map = new Map<AppConnection, TAppConnectionOption>();- appConnectionOptions?.forEach((option) => map.set(option.app, option));+ visibleOptions.forEach((option) => map.set(option.app, option));return map;- }, [appConnectionOptions]);+ }, [visibleOptions]);const filteredOptions = useMemo(() => {const query = search.trim().toLowerCase();- if (!query) return appConnectionOptions ?? [];+ if (!query) return visibleOptions;return (- appConnectionOptions?.filter(({ app, name }) => {+ visibleOptions.filter(({ app, name }) => {const entry = APP_CONNECTION_MAP[app];const aliases = entry?.aliases ?? [];return (@@ -103,7 +108,7 @@ export const AppConnectionsSelect = ({ onSelect, projectType }: Props) => {);}) ?? []);- }, [appConnectionOptions, search]);+ }, [visibleOptions, search]);const popularOptions = useMemo(() =>@@ -180,7 +185,7 @@ export const AppConnectionsSelect = ({ onSelect, projectType }: Props) => {<section><SectionLabel>All apps</SectionLabel><div className="grid grid-cols-1 gap-3 sm:grid-cols-2">- {(appConnectionOptions ?? []).map((option) => (+ {visibleOptions.map((option) => (<ProviderCardkey={option.app}app={option.app}