(#137) Added additional policy mappings - #138
Conversation
- Allow Remote Shell Access - Domain controller: LDAP server signing requirements Enforcement - Network security: LDAP client encryption requirements Fixes ayohrling#137
silug
left a comment
There was a problem hiding this comment.
I verified all three registry mappings against Microsoft's published baselines, and they're real — including LDAPServerEnforceIntegrity, which is easy to mistake for a typo of LDAPServerIntegrity but is genuinely a new, separate value introduced with Windows Server 2025 ("Domain controller: LDAP server signing requirements enforcement" takes precedence over the legacy signing policy; see Microsoft's LDAP signing GP doc and the Server 2025 guest-configuration baseline, which lists it as REG_DWORD, Range(0,1), under NTDS\Parameters). LDAPClientConfidentiality under Services\LDAP is likewise confirmed for "Network security: LDAP client encryption requirements", and AllowRemoteShellAccess matches the WinRS ADMX policy.
Also ran the suite locally on this branch: 69 examples, 0 failures, and rubocop is clean.
A few things before merge, in priority order:
ldapclientconfidentialitycasing is a likely idempotency bug, not just cosmetic (inline).Allow Remote Shell Accessis the first mapping in this file that isn't a registered Security Options policy — worth verifying it round-trips throughsecedit /exporton a real host (inline).- The README's list of valid policy names (the block around line 90–250) doesn't get the three new entries — that list is how users discover what they can pass as a resource title.
- Nits: new functionality is a MINOR bump per semver (2.1.0 rather than 2.0.1), and the new CHANGELOG entry could use an
### Addedheading to match the Keep-a-Changelog format used by the 2.0.0 entry. Microsoft's display name for the DC policy is lowercase "…requirements enforcement" — title matching is case-insensitive (find_mapping_from_policy_descdowncases), so this one is purely cosmetic, but matching the canonical name avoids confusion when people copy names out of secpol.msc.
Fixes from silug's review: - Real idempotency bug: 'ldapclientconfidentiality' -> 'LDAPClientConfidentiality'. find_mapping_from_policy_name does an exact case-sensitive match against what `secedit /export` reports, and the real captured fixture shows the sibling key LDAPClientIntegrity uses PascalCase -- so the lowercase version would never match on read-back, causing Puppet to reapply this setting on every run. - README's list of valid policy names now includes the new entries. While auditing this, found the list was already out of sync from an earlier PR (5 Domain controller entries and EnableGuestAccount were missing, plus a pre-existing "All Local System" -> "Allow Local System" typo). The list is now verified to match lsp_mapping exactly. - Version bump corrected to 2.1.0 (MINOR per semver for new functionality, not PATCH), and CHANGELOG now uses ### Added matching the Keep-a-Changelog format used by the 2.0.0 entry. - Display name casing: "requirements Enforcement" -> "requirements enforcement" to match Microsoft's actual GUI string (cosmetic -- find_mapping_from_policy_desc downcases -- but avoids confusion when copying names out of secpol.msc). - Added forward/reverse mapping test coverage for the new entries; they had none, which is how the casing bug went unnoticed. Per explicit direction: removed 'Allow Remote Shell Access' entirely (mapping, README, CHANGELOG, tests). It's an Administrative Templates policy (WinRM/WinRS), not a Security Options policy, and out of this module's scope regardless of whether it's real/documented -- this also moots the round-trip-through-secedit verification concern the review raised for that specific entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes #137