Hello @Chris Terrell ,
I looked into this specifically for the SCM create path, and the answer is that Windows does not document or support such an integration point. There is no supported way for an independent component to evaluate the actual CreateService request, meaning the caller, executable/config inputs, and the requested service-account association, and reject it before the creation effects occur. The documented SCM security model is an access-check model only, and none of its surfaces is a content-aware, pre-create policy callback.
What the SCM path exposes, all access-based and all documented:
-
CreateService requires an SCM handle holding SC_MANAGER_CREATE_SERVICE, and only administrators can obtain a create-capable handle. The decision is made against the SCManager object's security descriptor, which you read or set with QueryServiceObjectSecurity / SetServiceObjectSecurity (or sc sdset scmanager). That gate is preventive and enforced by SCM itself, but it is caller-and-rights based: it decides whether a principal may create a service at all. It does not see, and cannot reject on, the requested service-account value or the executable/config inputs, so it does not meet the policy you described. The SCManager descriptor became modifiable in Windows Server 2003 SP1; it was not on XP or Server 2003 RTM.
There is no documented callback, filter, or hook on CreateService that receives the request parameters and can veto them, and no documented composition that binds an independent authorization decision to the same SCM request and caller, with delegated processing, and prevents creation effects. On the nature of that answer, since you asked to distinguish it: this is a documented design boundary, not an undocumented implementation detail and not a point the docs leave open. The SCM security model is fully documented, it is exclusively an access-check model over the SCManager and service objects, and it defines no extensibility surface of the kind you need. The mechanism is absent by documented design, not hidden.
The supported, preventive mechanisms that come closest, and where each one falls short of your boundary:
- Code-integrity policy (WDAC, or AppLocker on older systems). Preventive and independent of the caller. It constrains which executable/image identity may run, including a service's image, so it partly covers "executable-content identity." It does not evaluate the
CreateService request and does not reject on the service-account association; it acts on the image at load or run, not on the create request. WDAC applies to Windows 10 and Server 2016 and later.
- Registry filtering driver (
CmRegisterCallbackEx, pre-operation RegNtPreCreateKeyEx / RegNtPreSetValueKey). A kernel filter can block, before the configuration manager processes it, the writes SCM makes under HKLM\SYSTEM\CurrentControlSet\Services\<name>, including the ObjectName value that carries the service account. This is the only supported mechanism that is both preventive and able to read the requested account. But it filters the registry effect, not the SCM request: the operating thread is SCM (services.exe), not your original caller, so it does not deliver the SCM caller identity or the request as one delegated unit; SCM writes the account and other inputs as separate registry operations you must correlate; and it requires a signed kernel-mode driver, subject to driver-signing and memory-integrity constraints on current builds. Pre-operation blocking with these capabilities is Windows Vista and later.
- RPC filtering (
netsh rpc filter). Can block calls to the SCM RPC interface preventively and independently, but at interface/opnum and caller-attribute granularity. It cannot parse the CreateService arguments, so it cannot reject specifically on the requested account.
None of these binds an account-aware, parameter-level decision to the actual CreateService request and caller, with delegated processing and prevention before all SCM, registry, filesystem, and credential effects. Caller-side wrappers, post-create notifications (NotifyServiceStatusChange), auditing, and later DACL changes are out of scope for the same reason you gave.
So, to your two framings: there is no supported SCM-path contract that satisfies the requirement, and the reason is a documented design limitation of the SCM security model, which is access-based only, not an undocumented detail. If the policy must be content-aware and pre-creation, the supported building blocks are the SCManager descriptor to constrain who may create services, WDAC to constrain the service image, and, for account-content enforcement, a registry-filter driver that vetoes the service-key write, accepting that it is a registry-path control rather than an SCM-request contract.
Versions and configuration: the SCM access model applies to current Windows client and server, with the descriptor-modifiability change at Server 2003 SP1 as noted; WDAC from Windows 10 and Server 2016; registry and RPC filtering from Vista onward. No specific build, update level, or filter configuration was assumed beyond what the cited documentation states.
Sources:
I hope this settles the integration-point question for your design. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation
Thank you.