Repository navigation
Conversation
|
Important Review skippedToo many files! This PR contains 567 files, which is 417 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files.
|
Attribute reviewAttribute review: 50 tests need review, more than the limit of 25 for one run. Split the change, or ask a maintainer to review the attributes and apply the attribute-review-override label. |
Up to standards ✅🟢 Issues
|
earbona23
left a comment
There was a problem hiding this comment.
The check itself reads well — CustomRootTrust with DisableCertificateDownloads, revocation explicitly off and recorded as off in the output, every X509Certificate2 and X509Chain disposed in a finally, and PathUsesCertificateOutsidePublishedInventory to catch a path that leans on something the inventory never published. Offline is the right call for this, and the result says plainly what it does not assess.
Two things before it can be read, though, and the first is why I started here rather than in the diff.
This pull request carries #2734
GitHub shows 567 files and -18,692 lines against main. Measured locally, almost none of that is yours:
git merge-base --is-ancestor <soulemike/ad-test-consolidation> <codex/ntauth-certificate-chain>
-> true, so this branch contains #2734's commits
git diff --stat <soulemike/ad-test-consolidation> <codex/ntauth-certificate-chain>
-> 5 files changed, 494 insertions(+), 2 deletions(-)
git rev-list --count <soulemike/ad-test-consolidation>..<codex/ntauth-certificate-chain>
-> 3
Your own work is three commits over five files:
| File | |
|---|---|
powershell/internal/services/ad/Get-MtAdNtAuthCertificatePath.ps1 |
+122 |
powershell/tests/functions/AdNtAuthCertificatePath.Tests.ps1 |
+281 |
tests/ad/certificate-services/Test.AD-PKI-13.ps1 |
+55 |
tests/ad/certificate-services/Test.AD-PKI-13.md |
+27 |
powershell/internal/checks/ad/ad/Get-MtAdCertificateInventory.ps1 |
+9/-2 |
The other 562 are @soulemike's AD test consolidation, still open as #2734. Both branches delete the same 182 files under tests/ad/, and all 182 are still present on main, so as it stands this pull request would take the consolidation in under a title about NTAuth paths, and whichever lands first makes the other conflict — which is already why this one shows CONFLICTING.
Rebasing those three commits onto current main would turn this into a five-file review, and it would stop the consolidation being merged twice or reviewed in the wrong thread. If the dependency is real and Get-MtAdCertificateInventory -IncludeRawData only exists after #2734, then retargeting the base at that branch says so explicitly instead of hiding it.
-SkippedCustomReason is dropped here
Test.AD-PKI-13.ps1:
Add-MtTestResultDetail -SkippedBecause NotApplicable -SkippedCustomReason 'The collected NTAuth store contains no CA certificates.'Add-MtTestResultDetail only reads -SkippedCustomReason when -SkippedBecause is Custom (powershell/public/run/Add-MtTestResultDetail.ps1:123-127); every other value takes the else branch and overwrites the reason with Get-MtSkippedReason $SkippedBecause. So that sentence never reaches the operator and the report shows the generic not-applicable text. Nothing else in the repository combines those two — -SkippedBecause Custom appears in 207 places and that is the form that keeps the message.
-SkippedBecause Custom -SkippedCustomReason '...' is what you want, and the empty store deserves the specific wording: it is the difference between "this does not apply to you" and "the store I read was empty".
One question
There is no return after that skip. It does terminate — the helper throws a skip record under the native engine and calls Set-ItResult -Skipped under Pester — so I do not think it is live, but the block below it builds a table over an empty $paths and calls Add-MtTestResultDetail a second time, so a reader has to go and check the helper to know it is unreachable. An explicit return would make it local.
And on the subordinate-CA count: the loop increments after comparing, walking ChainElements from leaf to root, and your comment says this is deliberate because Build treats the target as an end entity. That is the kind of off-by-one that is right until it is not — is there a case in the 281 lines of tests with a three-level path and pathLenConstraint = 0 on the root, where the engine's own InvalidBasicConstraints and your counter should agree?
Summary
Adds AD-PKI-13, an informational native check that verifies generic CA certificate paths from the forest's NTAuth store to roots published in AD. It handles Microsoft and third-party CA certificates without requiring a
pKIEnrollmentServiceregistration.Intentionally depends on #2734, based on its head
bf1709daaf89373886caf332e1dcd68fc91af528, to reuse @soulemike's shared certificate inventory and parser. Merge #2734 first, then rebase this follow-up onto main. Until then, review the five-file incremental diff for this extension. The existing NTAuth inventory remains AD-CFG-21.Behavior
CustomRootTrustfromTrustedRootCAs. Published intermediate, enterprise-CA and NTAuth certificates supply possible issuers. A certificate available only from the runner's OS cache cannot make a path verify.Scope and classification
Product=ad,Feature=certificate-services,Area=authentication,ResourceType=CertificateAuthority, Info / Preview,Mitre=None,Control=nist-800-53-r5:SC-17. This is evidence about a published certificate path, not an authentication-risk verdict; it does not affect scores. It supports only the certificate-path portion of SC-17.No AIA downloads, revocation requests, private-key access, certificate enrollment or PKINIT are performed by the check. It does not apply smart-card/client-auth EKU policy, establish organizational root approval, or assess actual DC trust, certificate mappings, effective enrollment permissions, templates or the issuing CA's policy. Missing issuers remain visible inventory gaps. NTAuth authorization and root trust are separate inputs; AD publication does not prove that a DC trusts a root.
Validation
Skipped / NotApplicable.a95f6db9cin a separate checkout: the three OU modification-date cases and this Mac's GitHub Actions colour expectation. No entirely green full-suite run is claimed. Native metadata/lint, layout, complete ScriptAnalyzer coverage and Golden selection/config/legacy-tag tests passed.Invoke-MtTest, fresh processes and validated LDAPS without certificate-check bypasses. All 20 root/depth combinations passed their expected outcomes, including five-certificate paths, the visible empty-store message and restored valid state. The multi-valued projection defect was reproduced on the real LDAP data before the fix and verified afterwards. Runtime parser/helper/check hashes matched the final source; every scenario had zero enterprise CA registrations. Public CA objects and signed empty CRLs were fixtures, not a running CA issuance service. Fixture objects, VM, ISO, bridge, namespace and helper payloads were removed. The source VM remained stopped and all unrelated guest identities/run states were preserved.a95f6db9c, the main-based attribute review could not complete because 50 tests needed review, above the workflow's limit of 25. CodeRabbit also skipped the inherited 567-file diff. These review-capacity limits include Ad test consolidation #2734; rebase after it merges to review the incremental change. Attribute-review workflow.The overlap audit covered main, local PKI work, open PR metadata and targeted searches, including #2734's changed-file patches. #2734 inventories public certificates and expiry observations; #2804/#2806 evaluate AD CS template prerequisites. This extension adds NTAuth-to-published-root cryptographic path assessment.
Sources: NTAuth publication, third-party CA authentication prerequisites, .NET chain policy.
Additional running AD CS / HTTP validation (2026-11-15)
A separate seven-VM lab used actual Windows Server 2025 Datacenter guests: a DC clone, five freshly installed AD CS servers and a fresh workgroup client. The hierarchy was Root + four subordinate CAs + an enterprise-issued WebServer certificate, with path-length limits 4/3/2/1/0. CertSvc issued the certificates and signed the CRLs; HTTP served their public publication files. Upper CA services were stopped during client validation.
certutil -verify -urlfetchexited 0.No product-code change was needed for this additional validation. PKINIT/authentication and OCSP were not tested.
Ready for incremental review. Merge #2734 first, then rebase this follow-up; the Maester 3.0 feature freeze still governs merge timing.