# Enterprise CA count should be retrievable

Enterprise Certification Authorities (CAs) issue certificates for domain authentication and other PKI-dependent services.

Source: https://maester.dev/docs/tests/AD-CFG-12

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/soulemike" title="Michael Soule · Original author"><img src="https://github.com/soulemike.png" alt="Michael Soule" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/soulemike">Michael Soule</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/ad">Active Directory</a> · Active Directory · Certificate Services · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-CFG-12
```

## Overview

Enterprise Certification Authorities (CAs) issue certificates for domain authentication and other PKI-dependent services. An unauthorized or newly introduced Enterprise CA can issue valid certificates that authenticate users/computers, enabling impersonation, man-in-the-middle attacks, and potential privilege escalation.

#### Control Type

**Operational**

#### Security Recommendation
- Maintain an allowlist of approved Enterprise CAs and treat CA additions as high-risk change events.
- Ensure only designated PKI administrators can create/modify CA objects.
- Validate CA certificate chains and revocation configuration after any CA change.
- Monitor and alert on deviations in the number of Enterprise CAs.

#### How the Test Works
- Enumerates Enterprise CA objects in Active Directory (enrollment-capable CA configuration objects).
- Counts how many Enterprise CAs are configured.
- Compares the observed count against the environment baseline and flags unexpected values.

#### Related Tests
- [Test-MtAdEnrollmentCaCertificateDetails](/docs/commands/Test-MtAdEnrollmentCaCertificateDetails): Reviews CA certificate validity periods and integrity.
- [Test-MtAdCertificateTemplatesCount](/docs/commands/Test-MtAdCertificateTemplatesCount): Ensures template exposure isn’t expanded beyond approved policies.
- [Test-MtAdTrustedRootCaCount](/docs/commands/Test-MtAdTrustedRootCaCount): Verifies trusted PKI trust anchors.

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | AD-CFG-12 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Certificate Services |
| Area | Infrastructure hardening |
| Resource type | CertificateAuthority |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdEnterpriseCaCount](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-12.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:Configuration/*:ReadProperty |

</details>

## Source

- Test: [`tests/ad/config/Test.AD-CFG-12.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-12.ps1)
- Documentation: [`tests/ad/config/Test.AD-CFG-12.md`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-12.md)
