1172687d4b
v2-ci / unit-tests (push) Has been cancelled
Re-runs only the ScriptWorker step on windev (master da948e5f, SDK 2.0.1, 16 vCPUs): install as the OtOpcUaHost service,
repo Install-ScriptWorkerIsolation.ps1 applied/re-applied/uninstalled twice under pwsh 7 and Windows PowerShell 5.1,
restricted worker, pipe refuses the admin, runner Healthy, strict-peer/API-key matrix on, then cleanup. The harness drops
-PatchedIsolation, gains -PrepareFrom candidate and -ApplyHost, and suffixes the isolation evidence with -Label.
Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
120 lines
14 KiB
JSON
120 lines
14 KiB
JSON
{
|
|
"applyHost": "powershell.exe",
|
|
"whatIf": {
|
|
"script": "install-candidate",
|
|
"host": "powershell.exe",
|
|
"args": "-WhatIf",
|
|
"exit": 0,
|
|
"output": "ScriptWorker isolation install: worker identity NT SERVICE\\OtOpcUaScriptWorker (S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135), host account NT SERVICE\\OtOpcUaHost (S-1-5-80-3928861625-3486739760-3962757976-1980707066-3667558059)\r\nWhat if: Performing the operation \"AnchorService: register the disabled anchor service 'OtOpcUaScriptWorker' so the virtual account 'NT SERVICE\\OtOpcUaScriptWorker' (S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135) resolves by name (never started)\" on target \"OtOpcUaScriptWorker\".\r\nWhat if: Performing the operation \"PeCacheDir: create the PE cache directory and set its ACL (protected; SYSTEM, Administrators, host account full control; no Users; no worker access to the key or markers)\" on target \"C:\\OtOpcUa800\\state\\pe-cache\".\r\nWhat if: Performing the operation \"PeEntriesDir: create the PE entries directory and grant the worker identity Modify (it compiles and writes HMAC'd entries)\" on target \"C:\\OtOpcUa800\\state\\pe-cache\\pe\".\r\nWhat if: Performing the operation \"WorkerFolderAcl: grant the worker identity read+execute on its own binaries\" on target \"C:\\OtOpcUa800\\OtOpcUa\\script-worker\".\r\nWhat if: Performing the operation \"InstallRootDeny: deny the worker identity ReadData/ListDirectory on the install folder (appsettings, logs, host binaries); script-worker\\ stays readable\" on target \"C:\\OtOpcUa800\\OtOpcUa\".\r\nWhat if: Performing the operation \"FirewallBlockOutbound: add a Windows Firewall rule blocking ALL outbound traffic from 'C:\\OtOpcUa800\\OtOpcUa\\script-worker\\ZB.MOM.WW.OtOpcUa.ScriptWorker.exe' (every profile)\" on target \"OtOpcUa-ScriptWorker-BlockOutbound\".\r\nWhat if: Performing the operation \"HostServiceEnv: set Scripting__Worker__Identity=NT SERVICE\\OtOpcUaScriptWorker and Scripting__Worker__PeCacheDir=C:\\OtOpcUa800\\state\\pe-cache in the 'OtOpcUaHost' service environment (other entries kept; takes effect on the next service start)\" on target \"OtOpcUaHost\".\r\n"
|
|
},
|
|
"whatIfOtherHost": {
|
|
"script": "install-candidate",
|
|
"host": "pwsh",
|
|
"args": "-WhatIf",
|
|
"exit": 0,
|
|
"output": "ScriptWorker isolation install: worker identity NT SERVICE\\OtOpcUaScriptWorker (S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135), host account NT SERVICE\\OtOpcUaHost (S-1-5-80-3928861625-3486739760-3962757976-1980707066-3667558059)\r\nWhat if: Performing the operation \"AnchorService: register the disabled anchor service 'OtOpcUaScriptWorker' so the virtual account 'NT SERVICE\\OtOpcUaScriptWorker' (S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135) resolves by name (never started)\" on target \"OtOpcUaScriptWorker\".\r\nWhat if: Performing the operation \"PeCacheDir: create the PE cache directory and set its ACL (protected; SYSTEM, Administrators, host account full control; no Users; no worker access to the key or markers)\" on target \"C:\\OtOpcUa800\\state\\pe-cache\".\r\nWhat if: Performing the operation \"PeEntriesDir: create the PE entries directory and grant the worker identity Modify (it compiles and writes HMAC'd entries)\" on target \"C:\\OtOpcUa800\\state\\pe-cache\\pe\".\r\nWhat if: Performing the operation \"WorkerFolderAcl: grant the worker identity read+execute on its own binaries\" on target \"C:\\OtOpcUa800\\OtOpcUa\\script-worker\".\r\nWhat if: Performing the operation \"InstallRootDeny: deny the worker identity ReadData/ListDirectory on the install folder (appsettings, logs, host binaries); script-worker\\ stays readable\" on target \"C:\\OtOpcUa800\\OtOpcUa\".\r\nWhat if: Performing the operation \"FirewallBlockOutbound: add a Windows Firewall rule blocking ALL outbound traffic from 'C:\\OtOpcUa800\\OtOpcUa\\script-worker\\ZB.MOM.WW.OtOpcUa.ScriptWorker.exe' (every profile)\" on target \"OtOpcUa-ScriptWorker-BlockOutbound\".\r\nWhat if: Performing the operation \"HostServiceEnv: set Scripting__Worker__Identity=NT SERVICE\\OtOpcUaScriptWorker and Scripting__Worker__PeCacheDir=C:\\OtOpcUa800\\state\\pe-cache in the 'OtOpcUaHost' service environment (other entries kept; takes effect on the next service start)\" on target \"OtOpcUaHost\".\r\n"
|
|
},
|
|
"whatIfChangedState": false,
|
|
"apply": {
|
|
"script": "install-candidate",
|
|
"host": "powershell.exe",
|
|
"args": "",
|
|
"exit": 0,
|
|
"output": "ScriptWorker isolation install: worker identity NT SERVICE\\OtOpcUaScriptWorker (S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135), host account NT SERVICE\\OtOpcUaHost (S-1-5-80-3928861625-3486739760-3962757976-1980707066-3667558059)\r\n [changed ] AnchorService OtOpcUaScriptWorker\r\n [unchanged] PeCacheDir C:\\OtOpcUa800\\state\\pe-cache\r\n [changed ] PeEntriesDir C:\\OtOpcUa800\\state\\pe-cache\\pe\r\n [changed ] WorkerFolderAcl C:\\OtOpcUa800\\OtOpcUa\\script-worker\r\n [changed ] InstallRootDeny C:\\OtOpcUa800\\OtOpcUa\r\n [changed ] FirewallBlockOutbound OtOpcUa-ScriptWorker-BlockOutbound\r\n [changed ] HostServiceEnv OtOpcUaHost\r\n\r\nDone. Host configuration for this node:\r\n Scripting:Worker:Identity = NT SERVICE\\OtOpcUaScriptWorker\r\n Scripting:Worker:PeCacheDir = C:\\OtOpcUa800\\state\\pe-cache\r\n Restart OtOpcUaHost for a configuration change to take effect.\r\n\r\nId Target Outcome \r\n-- ------ ------- \r\nAnchorService OtOpcUaScriptWorker changed \r\nPeCacheDir C:\\OtOpcUa800\\state\\pe-cache unchanged\r\nPeEntriesDir C:\\OtOpcUa800\\state\\pe-cache\\pe changed \r\nWorkerFolderAcl C:\\OtOpcUa800\\OtOpcUa\\script-worker changed \r\nInstallRootDeny C:\\OtOpcUa800\\OtOpcUa changed \r\nFirewallBlockOutbound OtOpcUa-ScriptWorker-BlockOutbound changed \r\nHostServiceEnv OtOpcUaHost changed \r\n\r\n\r\n"
|
|
},
|
|
"reapply": {
|
|
"script": "install-candidate",
|
|
"host": "pwsh",
|
|
"args": "",
|
|
"exit": 0,
|
|
"output": "ScriptWorker isolation install: worker identity NT SERVICE\\OtOpcUaScriptWorker (S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135), host account NT SERVICE\\OtOpcUaHost (S-1-5-80-3928861625-3486739760-3962757976-1980707066-3667558059)\r\n [unchanged] AnchorService OtOpcUaScriptWorker\r\n [unchanged] PeCacheDir C:\\OtOpcUa800\\state\\pe-cache\r\n [unchanged] PeEntriesDir C:\\OtOpcUa800\\state\\pe-cache\\pe\r\n [unchanged] WorkerFolderAcl C:\\OtOpcUa800\\OtOpcUa\\script-worker\r\n [unchanged] InstallRootDeny C:\\OtOpcUa800\\OtOpcUa\r\n [unchanged] FirewallBlockOutbound OtOpcUa-ScriptWorker-BlockOutbound\r\n [unchanged] HostServiceEnv OtOpcUaHost\r\n\r\nDone. Host configuration for this node:\r\n Scripting:Worker:Identity = NT SERVICE\\OtOpcUaScriptWorker\r\n Scripting:Worker:PeCacheDir = C:\\OtOpcUa800\\state\\pe-cache\r\n Restart OtOpcUaHost for a configuration change to take effect.\r\n\r\n\u001b[32;1mId \u001b[0m\u001b[32;1m Target \u001b[0m\u001b[32;1m Outcome\u001b[0m\r\n\u001b[32;1m-- \u001b[0m \u001b[32;1m------ \u001b[0m \u001b[32;1m-------\u001b[0m\r\nAnchorService OtOpcUaScriptWorker unchanged\r\nPeCacheDir C:\\OtOpcUa800\\state\\pe-cache unchanged\r\nPeEntriesDir C:\\OtOpcUa800\\state\\pe-cache\\pe unchanged\r\nWorkerFolderAcl C:\\OtOpcUa800\\OtOpcUa\\script-worker unchanged\r\nInstallRootDeny C:\\OtOpcUa800\\OtOpcUa unchanged\r\nFirewallBlockOutbound OtOpcUa-ScriptWorker-BlockOutbound unchanged\r\nHostServiceEnv OtOpcUaHost unchanged\r\n\r\n"
|
|
},
|
|
"reapplySameHost": {
|
|
"script": "install-candidate",
|
|
"host": "powershell.exe",
|
|
"args": "",
|
|
"exit": 0,
|
|
"output": "ScriptWorker isolation install: worker identity NT SERVICE\\OtOpcUaScriptWorker (S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135), host account NT SERVICE\\OtOpcUaHost (S-1-5-80-3928861625-3486739760-3962757976-1980707066-3667558059)\r\n [unchanged] AnchorService OtOpcUaScriptWorker\r\n [unchanged] PeCacheDir C:\\OtOpcUa800\\state\\pe-cache\r\n [unchanged] PeEntriesDir C:\\OtOpcUa800\\state\\pe-cache\\pe\r\n [unchanged] WorkerFolderAcl C:\\OtOpcUa800\\OtOpcUa\\script-worker\r\n [unchanged] InstallRootDeny C:\\OtOpcUa800\\OtOpcUa\r\n [unchanged] FirewallBlockOutbound OtOpcUa-ScriptWorker-BlockOutbound\r\n [unchanged] HostServiceEnv OtOpcUaHost\r\n\r\nDone. Host configuration for this node:\r\n Scripting:Worker:Identity = NT SERVICE\\OtOpcUaScriptWorker\r\n Scripting:Worker:PeCacheDir = C:\\OtOpcUa800\\state\\pe-cache\r\n Restart OtOpcUaHost for a configuration change to take effect.\r\n\r\nId Target Outcome \r\n-- ------ ------- \r\nAnchorService OtOpcUaScriptWorker unchanged\r\nPeCacheDir C:\\OtOpcUa800\\state\\pe-cache unchanged\r\nPeEntriesDir C:\\OtOpcUa800\\state\\pe-cache\\pe unchanged\r\nWorkerFolderAcl C:\\OtOpcUa800\\OtOpcUa\\script-worker unchanged\r\nInstallRootDeny C:\\OtOpcUa800\\OtOpcUa unchanged\r\nFirewallBlockOutbound OtOpcUa-ScriptWorker-BlockOutbound unchanged\r\nHostServiceEnv OtOpcUaHost unchanged\r\n\r\n\r\n"
|
|
},
|
|
"reapplyAllUnchanged": true,
|
|
"reapplyStepCounts": [
|
|
7,
|
|
7
|
|
],
|
|
"envBefore": [
|
|
"ASPNETCORE_URLS",
|
|
"Cluster__Hostname",
|
|
"Cluster__Port",
|
|
"Cluster__PublicHostname",
|
|
"Cluster__Roles__0",
|
|
"Cluster__SeedNodes__0",
|
|
"Cluster__SystemName",
|
|
"ConfigSource__ApiKey",
|
|
"ConfigSource__CentralFetchEndpoints__0",
|
|
"ConfigSource__FetchTimeoutSeconds",
|
|
"ConfigSource__Mode",
|
|
"DOTNET_ENVIRONMENT",
|
|
"OpcUa__AllowAnonymous",
|
|
"OpcUa__ApplicationName",
|
|
"OpcUa__ApplicationUri",
|
|
"OpcUa__AutoAcceptUntrustedClientCertificates",
|
|
"OpcUa__EnabledSecurityProfiles__0",
|
|
"OpcUa__EnabledSecurityProfiles__1",
|
|
"OpcUa__OpcUaPort",
|
|
"OpcUa__PublicHostname",
|
|
"OTOPCUA_ROLES",
|
|
"Secrets__SqlitePath",
|
|
"Security__Acl__Enabled",
|
|
"Security__ApiKeys__Pepper",
|
|
"Security__Ldap__Enabled",
|
|
"ZB_SECRETS_MASTER_KEY"
|
|
],
|
|
"envAfter": [
|
|
"ASPNETCORE_URLS",
|
|
"Cluster__Hostname",
|
|
"Cluster__Port",
|
|
"Cluster__PublicHostname",
|
|
"Cluster__Roles__0",
|
|
"Cluster__SeedNodes__0",
|
|
"Cluster__SystemName",
|
|
"ConfigSource__ApiKey",
|
|
"ConfigSource__CentralFetchEndpoints__0",
|
|
"ConfigSource__FetchTimeoutSeconds",
|
|
"ConfigSource__Mode",
|
|
"DOTNET_ENVIRONMENT",
|
|
"OpcUa__AllowAnonymous",
|
|
"OpcUa__ApplicationName",
|
|
"OpcUa__ApplicationUri",
|
|
"OpcUa__AutoAcceptUntrustedClientCertificates",
|
|
"OpcUa__EnabledSecurityProfiles__0",
|
|
"OpcUa__EnabledSecurityProfiles__1",
|
|
"OpcUa__OpcUaPort",
|
|
"OpcUa__PublicHostname",
|
|
"OTOPCUA_ROLES",
|
|
"Scripting__Runner",
|
|
"Scripting__Worker__Identity",
|
|
"Scripting__Worker__PeCacheDir",
|
|
"Secrets__SqlitePath",
|
|
"Security__Acl__Enabled",
|
|
"Security__ApiKeys__Pepper",
|
|
"Security__Ldap__Enabled",
|
|
"ZB_SECRETS_MASTER_KEY"
|
|
],
|
|
"anchor": "[SC] QueryServiceConfig SUCCESS\r\n\r\nSERVICE_NAME: OtOpcUaScriptWorker\r\n TYPE : 10 WIN32_OWN_PROCESS \r\n START_TYPE : 4 DISABLED\r\n ERROR_CONTROL : 1 NORMAL\r\n BINARY_PATH_NAME : \"C:\\OtOpcUa800\\OtOpcUa\\script-worker\\ZB.MOM.WW.OtOpcUa.ScriptWorker.exe\"\r\n LOAD_ORDER_GROUP : \r\n TAG : 0\r\n DISPLAY_NAME : OtOpcUa ScriptWorker identity (anchor, never started)\r\n DEPENDENCIES : \r\n SERVICE_START_NAME : NT SERVICE\\OtOpcUaScriptWorker\r\n",
|
|
"anchorSid": "\r\nNAME: OtOpcUaScriptWorker\r\nSERVICE SID: S-1-5-80-1846135827-3903057317-1998105452-3938448374-3023753135\r\nSTATUS: Active\r\n",
|
|
"installAcl": "C:\\OtOpcUa800\\OtOpcUa NT SERVICE\\OtOpcUaScriptWorker:(OI)(CI)(DENY)(S,RD)\r\n NT SERVICE\\OtOpcUaHost:(OI)(CI)(RX)\r\n NT AUTHORITY\\SYSTEM:(I)(OI)(CI)(F)\r\n BUILTIN\\Administrators:(I)(OI)(CI)(F)\r\n\r\nSuccessfully processed 1 files; Failed processing 0 files\r\n",
|
|
"workerDirAcl": "C:\\OtOpcUa800\\OtOpcUa\\script-worker NT SERVICE\\OtOpcUaScriptWorker:(OI)(CI)(RX)\r\n NT SERVICE\\OtOpcUaScriptWorker:(I)(OI)(CI)(DENY)(S,RD)\r\n NT SERVICE\\OtOpcUaHost:(I)(OI)(CI)(RX)\r\n NT AUTHORITY\\SYSTEM:(I)(OI)(CI)(F)\r\n BUILTIN\\Administrators:(I)(OI)(CI)(F)\r\n\r\nSuccessfully processed 1 files; Failed processing 0 files\r\n",
|
|
"peCacheAcl": "C:\\OtOpcUa800\\state\\pe-cache NT AUTHORITY\\SYSTEM:(OI)(CI)(F)\r\n BUILTIN\\Administrators:(OI)(CI)(F)\r\n NT SERVICE\\OtOpcUaHost:(OI)(CI)(F)\r\n\r\nSuccessfully processed 1 files; Failed processing 0 files\r\n",
|
|
"peAcl": "C:\\OtOpcUa800\\state\\pe-cache\\pe NT SERVICE\\OtOpcUaScriptWorker:(OI)(CI)(M)\r\n NT AUTHORITY\\SYSTEM:(I)(OI)(CI)(F)\r\n BUILTIN\\Administrators:(I)(OI)(CI)(F)\r\n NT SERVICE\\OtOpcUaHost:(I)(OI)(CI)(F)\r\n\r\nSuccessfully processed 1 files; Failed processing 0 files\r\n",
|
|
"firewall": {
|
|
"name": "OtOpcUa-ScriptWorker-BlockOutbound",
|
|
"direction": "Outbound",
|
|
"action": "Block",
|
|
"enabled": "True",
|
|
"profile": "Any",
|
|
"program": "C:\\OtOpcUa800\\OtOpcUa\\script-worker\\ZB.MOM.WW.OtOpcUa.ScriptWorker.exe"
|
|
},
|
|
"workerExeSha256": "C2A2A56D3D91916DABA72BD4D69E3DED5CAD309121AE9CA00D4E8A3FE9AAAE12",
|
|
"workerFiles": 275
|
|
}
|