Hello @Chris Terrell ,
I looked into this specifically for the SCM create path. Windows does not document such an integration point, and my analysis of the documented interfaces, set out below, is that there is no supported one either. I have not found a 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:
-
CreateServicerequires an SCM handle holdingSC_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 withQueryServiceObjectSecurity/SetServiceObjectSecurity(orsc 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 me to distinguish a documented limitation from an undocumented implementation detail or an unsettled documentation question: the documentation does not state this exclusion expressly. What it does is describe the create-path decision surface in full, and that surface is exclusively an access-check model over the SCManager and service objects, with no extensibility point of the kind you need. The conclusion that no supported integration point exists is my inference from that documented surface, together with the premise that a supported contract is one Microsoft documents. It is not an express documented exclusion, and it does not rest on any undocumented implementation detail. My September 18 comment below separates the documented statements from the inference in detail.
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
CreateServicerequest 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-operationRegNtPreCreateKeyEx/RegNtPreSetValueKey). A kernel filter can block, before the configuration manager processes it, the writes SCM makes underHKLM\SYSTEM\CurrentControlSet\Services\<name>, including theObjectNamevalue 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: per MS-SCMR the SCM server performs the creation, so the write the callback sees is the server's operation, not your original caller's call, and the notification structure carries no identification of the RPC client or theCreateServicerequest; 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. Blocking is documented from Windows XP, theRegNtPre*classes from Windows Server 2003, andCmRegisterCallbackExwith layered filtering from Windows Vista. - RPC filtering (
netsh rpc filter). Can block calls to the SCM RPC interface preventively and independently, but at interface and caller-attribute granularity, with opnum-level conditions only on Windows 11 with the October 2025 cumulative update or later. It cannot parse theCreateServicearguments, 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 framings: I do not find a supported SCM-path contract that satisfies the requirement. That conclusion is my inference from the documented, access-based SCM security model; the documentation does not state the exclusion expressly, and the conclusion does not depend on any 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 filtering with blocking from Windows XP (RegNtPre* classes from Server 2003, CmRegisterCallbackEx from Vista); WFP RPC filtering from Vista and Server 2008, with opnum conditions on Windows 11 with the October 2025 cumulative update or later. No specific build, update level, or filter configuration was assumed beyond what the cited documentation states.
Sources:
- Service Security and Access Rights
- SCM Handles
- CreateServiceW
- MS-SCMR, RCreateServiceW (Opnum 12)
- Filtering Registry Calls
- WFP filtering conditions by layer
- netsh rpc
- Application Control for Business (WDAC)
I hope this settles the integration-point question for your design.
Thank you.