fix: Align managed-service-account DNS requirements in ADCS compositions BED-9336 - #3195
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change adds managed service account detection and applies it to ESC3, ESC6, ESC9, ESC10, and ESC13 path composition. It adds DNS-focused graph fixtures and integration tests for GMSA, MSA, and regular-user behavior. ChangesManaged service account AD CS support
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR aligns DNS-template handling for managed service accounts while continuing to reject ordinary users, with targeted test coverage. No actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant ADCSGraph
participant ESCPathComposition
participant isManagedServiceAccount
participant IntegrationTest
ADCSGraph->>ESCPathComposition: provide principals and certificate templates
ESCPathComposition->>isManagedServiceAccount: classify user victim
isManagedServiceAccount-->>ESCPathComposition: managed status or property error
ESCPathComposition->>IntegrationTest: return retained or excluded compositions
IntegrationTest->>ESCPathComposition: validate ESC3, ESC6a, ESC9a, ESC10a, and ESC13 results
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
182835c to
7d00dbf
Compare
|
Thanks for the extra information on this ❤️ it was extremely helpful to understand the problem statement! Great job! |
|
Hey @kpowderly, thanks a lot for the review! :) |
5628cff to
f1e3e31
Compare
Description
This PR aligns ADCS edge creation and composition when a certificate template requires a DNS or domain-DNS subject alternative name.
gMSAs and sMSAs are represented as
Usernodes, but they possess the DNS identity required by these templates. Creation already preserved these accounts in some paths, while several composition implementations treated them as ordinary users and discarded the supporting template path.This change:
isManagedServiceAccounthelper for thegmsaandmsaproperties.Stack
mainBED-9336-adcs-managed-account-dnsBED-9336-adcs-trust-pathstomain.Commit review order
refactor: centralize managed service account detection BED-9336isManagedServiceAccount.fix: align ESC3 managed-account DNS requirements BED-9336fix: align managed-account DNS in ADCS compositions BED-9336Motivation and Context
Resolves BED-9336
Creation and composition must evaluate certificate-template requirements consistently. Previously, a managed service account could receive a valid post-processed edge because it has a DNS identity, but composition could reject the same path because the account is ingested as a
User.That produced edges with empty or incomplete composition graphs. Centralizing the account classification removes the inconsistency without relaxing DNS requirements for ordinary users.
How Has This Been Tested?
Validated with:
go test ./packages/go/analysis/ad -count=1just prepare-for-codereviewCoverage includes:
SubjectAltRequireDNSandSubjectAltRequireDomainDNS.Screenshots (optional):
N/A — backend graph analysis only.
Types of changes
Checklist:
Summary by CodeRabbit