Repository navigation
Add Directory Groups plugin: multi-domain OU groups and browser - #39
Merged
Merged
Conversation
Namespace FOG\Plugins\DirectoryGroups, node and permission 'directorygroups', tables directoryOUs / directoryOUAssoc with do*/doa* columns plus a nullable doDomainID. The host select is posted as 'directorygroups' instead of 'ou'. The ou plugin is untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each domain has its own server, bind account, CA certificate and base DNs. The plugin answers core's DIRECTORY_CONNECTION with the domain that matches the host's AD domain, and hides the FOG_DIRECTORY_* connection settings while it is installed (SETTINGS_HIDDEN). A domain's Organizational Units tab lists its OUs as a searchable tree and adds the selected ones as directory groups. The host's Active Directory tab gets a Browse Directory button that fills the Domain Name and OU fields from the tree. On install, the FOG_DIRECTORY_* connection becomes the first domain, and the ou plugin's OUs and host links are copied in, idempotently. Uninstall drops all three tables. Refs FOGProject/fogproject#1879 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
directorygroups, the replacement for theouplugin agreed on FOGProject/fogproject#1879.What it does
DIRECTORY_CONNECTIONwith the domain that matches the host's AD domain (case-insensitive). A host in no listed domain gets no connection, and placement skips it.FOG_DIRECTORY_LDAP_URI,_BIND_DN,_BIND_PASSWORD,_CA_CERTand_BASE_DNon the FOG Settings page while installed (SETTINGS_HIDDEN).FOG_DIRECTORY_PLACEMENT_ENABLEDstays visible. Uninstall brings them back.fogad.local/Sales/Staging).oudid (nodedirectorygroups, tablesdirectoryOUs,directoryOUAssoc).Install migration
FOG_DIRECTORY_*connection becomes the first domain. Its name comes from the base DN's DC= parts.ouis installed, its OUs and host links are copied in with their ids (INSERT IGNORE, so a re-run is a no-op). Copied groups get the domain their DN sits under.ouitself is left installed. Retiring it is a separate change.Security
alwayssensitive tier and is stripped from the export. The edit form never renders it; a blank field keeps it.directorydomain, so grouping hosts does not grant access to bind accounts. Adding OUs as groups also needsdirectorygroups.create.Depends on FOGProject/fogproject#1882 (merged into working-1.6).
Tests
sh tests/run-all.sh: 18 of 18 pass.ourow and 1 host link, and seeded the first domain. A second domain on a Samba AD listed 1104 OUs over LDAPS with CA verification. Two OUs were added as groups from the tree. Browse Directory filled both host fields. The settings page showed only the placement switch. A General save with a blank password kept the stored one. Uninstall dropped all three tables and leftouuntouched.🤖 Generated with Claude Code