Skip to content

(#137) Added additional policy mappings - #138

Merged
silug merged 2 commits into
ayohrling:mainfrom
michael-riddle:issue_137
Jul 23, 2026
Merged

(#137) Added additional policy mappings#138
silug merged 2 commits into
ayohrling:mainfrom
michael-riddle:issue_137

Conversation

@michael-riddle

Copy link
Copy Markdown
  • Allow Remote Shell Access
  • Domain controller: LDAP server signing requirements Enforcement
  • Network security: LDAP client encryption requirements

Fixes #137

- Allow Remote Shell Access
- Domain controller: LDAP server signing requirements Enforcement
- Network security: LDAP client encryption requirements

Fixes ayohrling#137

@silug silug left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. ldapclientconfidentiality casing is a likely idempotency bug, not just cosmetic (inline).
  2. Allow Remote Shell Access is the first mapping in this file that isn't a registered Security Options policy — worth verifying it round-trips through secedit /export on a real host (inline).
  3. 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.
  4. 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 ### Added heading 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_desc downcases), so this one is purely cosmetic, but matching the canonical name avoids confusion when people copy names out of secpol.msc.

Comment thread lib/puppet_x/lsp/security_policy.rb Outdated
Comment thread lib/puppet_x/lsp/security_policy.rb Outdated
Comment thread CHANGELOG.md Outdated
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>
@silug
silug merged commit 96bee0d into ayohrling:main Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add additional policy entries in lib/puppet_x/lsp/security_policy.rb

2 participants