Skip to content

Add native Active Directory security descriptor utilities - #831

Open
stevebauman wants to merge 5 commits into
masterfrom
feature/security-descriptor
Open

stevebauman wants to merge 5 commits into
masterfrom
feature/security-descriptor

Conversation

@stevebauman

@stevebauman stevebauman commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Active Directory stores permissions in the binary ntSecurityDescriptor attribute. Editing these permissions is required for settings such as "User cannot change password", which cannot be set through the account control flag alone.

I've added native utilities for reading, editing, and encoding security descriptors. You can load a descriptor with withSecurityDescriptor(), edit it through securityDescriptor(), assign it back to ntSecurityDescriptor, and call the usual save() method.

Saving automatically selects the descriptor sections that changed and writes them alongside other pending attributes in one LDAP request. The connection's previous controls are restored after the operation. I've also included documentation and a runnable example for disabling password changes.

The unit and integration suites pass locally on PHP 8.1 and 8.4, along with Pint. Live Active Directory writes still need validation.

Closes #681.

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.

Create ntSecurityDescriptor utilities

1 participant