You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds explicit LDAP encryption/signing opt-outs and separately acknowledged plaintext Basic binds, with clear warnings, fail-closed checks, and settings preserved across reconnects.
Validation
6,915 tests with no failures; module and website builds passed; 59 Windows tests and all 8 Azure lab cases passed. Temporary lab policy was restored.
Explicit unsigned/unsealed Negotiate, Kerberos, and NTLM connections worked, including subsequent domain, GPO, and DACL reads.
Plaintext Basic worked only with the additional acknowledgement.
Missing acknowledgements and policy-overridden signing were correctly rejected.
The encrypted LDAPS control passed. Unit tests confirmed unchanged encrypted defaults and no plaintext fallback from Auto, LDAPS, or StartTLS.
The full suite completed 6,915 tests with no failures.
This is not exhaustive regression certification: Linux and child/separate-forest live testing were not performed, and Auto/StartTLS were not rerun live against the final expanded change.
Limitations
Explicit SASL opt-outs require provider and policy support. Branch has not been rebased onto latest upstream main.
Summary by CodeRabbit
New Features
Active Directory connections now support an explicit unencrypted LDAP mode; encrypted connections remain the default.
Separate acknowledgements are required to disable encryption, disable signing, or use Basic authentication with a plaintext password. Plaintext-password connections also require an explicitly specified server.
Connection summaries and warnings identify disabled protections and associated risks. Connections fail if required signing or sealing settings cannot be applied.
Protection settings are preserved when connections are reused and reflected in relevant cache behavior.
Documentation
Added guidance on LDAP protection, opt-in requirements, risks, and troubleshooting, including recommendations to limit unencrypted connections to test labs.
This pull request changes files that a website explainer describes:
How Maester works (website/public/explainers/how-it-works/) describes powershell/public/connect/Connect-Maester.ps1
If the change alters what the explainer shows (a gate, a reason code, a command, a count), update its composition and its chapters in website/src/data/explainers.json. If it doesn't, no action is needed.
No actionable comments were generated in the recent review.
Walkthrough
Active Directory connections now support an explicit unencrypted LDAP mode with separate acknowledgements for unencrypted transport, unsigned SASL, and Basic-auth plaintext passwords. Connection creation enforces the selected options. Active Directory reads preserve them in protocol evidence and cache keys.
Connection entry points accept None and the protection acknowledgements. Validation restricts the options to supported combinations, while existing automatic TLS attempts remain unchanged. Public examples, compatibility profiles, documentation, and protocol tests cover the options and defaults.
LDAP connection creation validates the selected options and warns when TLS is disabled. For unencrypted non-Basic connections, it checks sealing and signing settings before binding and verifies them after binding. Tests cover rejected combinations and provider or policy failures.
Preserve options across reads and re-probes powershell/internal/services/ad/protocol/Get-MtAdLdapProtectionCacheSuffix.ps1, powershell/internal/services/ad/protocol/New-MtAdProtocolConnection.ps1, powershell/public/services/ad/Get-MtADDacls.ps1, powershell/public/services/ad/Get-MtADDomainState.ps1, powershell/public/services/ad/Get-MtADGpoState.ps1, powershell/tests/functions/ActiveDirectoryLdapProtection.Tests.ps1
Protocol evidence records the requested server and protection settings. Domain, GPO, and DACL reads pass those settings to connection creation and include the protection mode in cache keys. Re-created connections use the recorded server and options.
sequenceDiagram
participant ConnectMaester as Connect-Maester
participant ConnectTarget as Connect-MtAdTarget
participant ProtocolConnection as New-MtAdProtocolConnection
participant LdapConnection as New-MtLdapConnection
participant DomainState as Get-MtADDomainState
ConnectMaester->>ConnectTarget: Pass selected TLS and protection options
ConnectTarget->>LdapConnection: Create LDAP connection with selected options
DomainState->>ProtocolConnection: Recreate connection from protocol evidence
ProtocolConnection->>LdapConnection: Pass recorded protection options and server
Loading
Suggested reviewers:merill, snozz-al, samerde
Merge Risk: Minimal · up to 93813
This change adds explicit, opt-in unencrypted LDAP modes that require acknowledgements and fail closed. Encrypted defaults are preserved and tests cover the new paths. No actionable merge-blocking risk was found.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Description check
The description covers the summary, validation results, and limitations. It does not follow the repository template. It omits the code freeze notice (which is informational), the linked issue ("Closes…
Use the repository's pull request template. Fill in the "Closes #" line with the related issue number, or state that no issue exists. Keep the "## 📑 Description" and "## ✅ Checks" headings, and tick the checklist items that apply (code styl…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title "feat(ad): add explicit LDAP protection opt-outs" names the main change. The PR adds explicit opt-outs for LDAP encryption and SASL signing, plus a separately acknowledged plaintext Basic bi…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(ad): add explicit LDAP protection opt-outs" names the main change. The PR adds explicit opt-outs for LDAP encryption and SASL signing, plus a separately acknowledged plaintext Basic bind option. The title is specific, short, and follows a conventional commit style.
Full details: Description check
Explanation
The description covers the summary, validation results, and limitations. It does not follow the repository template. It omits the code freeze notice (which is informational), the linked issue ("Closes # <!-- Issue # here -->" is left unfilled), and the checklist, which is unticked and not updated. The Additional Information section is also absent. The author's content is detailed and useful, but the template structure is not followed and the issue reference is missing.
Resolution
Use the repository's pull request template. Fill in the "Closes #" line with the related issue number, or state that no issue exists. Keep the "## 📑 Description" and "## ✅ Checks" headings, and tick the checklist items that apply (code style, docs updated, and the pester.ps1 run). Move the validation details and limitations under "## ℹ️ Additional Information".
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds explicit LDAP encryption/signing opt-outs and separately acknowledged plaintext Basic binds, with clear warnings, fail-closed checks, and settings preserved across reconnects.
Validation
6,915 tests with no failures; module and website builds passed; 59 Windows tests and all 8 Azure lab cases passed. Temporary lab policy was restored.
Limitations
Explicit SASL opt-outs require provider and policy support. Branch has not been rebased onto latest upstream main.
Summary by CodeRabbit