ac4c4d40dc
v2-ci / unit-tests (push) Has been cancelled
Adds scripts/validation/opcua-windows-service/: a phased PowerShell gate (Invoke-ServiceGate.ps1) that installs the known-good build as the real OtOpcUaHost service via Install-Services.ps1, seeds LocalDb through the production cache API (Seeder, built against the baseline tree), upgrades in place with config/PKI/LocalDb carried with their ACLs, starts/stops through the SCM, runs a strict SDK 2 probe matrix (Sign + SignAndEncrypt, valid/wrong/unknown/disabled/anonymous keys, untrusted client and server), exercises the ScriptWorker isolation, rolls back and cleans up. windev 2026-11-12 (efb9197a->438484fd->efb9197a): app cert CEF9D91F... reused byte-for-byte with identical PKI SDDL on every start, all gating checks pass, 0 secrets in logs. Findings filed: #879 (None endpoint cannot be dropped), #880 (SDK 2 client 65-char key vs SDK 1.5 server: rollback/QA risk), #883 (Install-ScriptWorkerIsolation.ps1 fails on pwsh 7 and 5.1; runtime isolation proven with the patch in the evidence directory). Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
429 lines
16 KiB
JSON
429 lines
16 KiB
JSON
{
|
|
"label": "b4",
|
|
"baselineServer": true,
|
|
"utc": "2026-11-12T15:10:57.9938311Z",
|
|
"cases": [
|
|
{
|
|
"name": "encrypt-valid-key-65",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenInvalid",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "sign-valid-key-65",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"sign",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "Sign",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenInvalid",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-valid-key-54",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"allow"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"policy": "Basic256Sha256",
|
|
"expected": "allow",
|
|
"result": "allowed",
|
|
"serverState": "0 (Good [0x00000000])",
|
|
"serviceLevel": "250 (Good [0x00000000])",
|
|
"unsNamespaceIndex": 3,
|
|
"virtualTag": "800 (Good [0x00000000])",
|
|
"serverCertSha1": "CEF9D91F8CBC0EE78B317D3AA51EB40CD9C41ACA",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "sign-valid-key-54",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"sign",
|
|
"allow"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "Sign",
|
|
"policy": "Basic256Sha256",
|
|
"expected": "allow",
|
|
"result": "allowed",
|
|
"serverState": "0 (Good [0x00000000])",
|
|
"serviceLevel": "250 (Good [0x00000000])",
|
|
"unsNamespaceIndex": 3,
|
|
"virtualTag": "800 (Good [0x00000000])",
|
|
"serverCertSha1": "CEF9D91F8CBC0EE78B317D3AA51EB40CD9C41ACA",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-wrong-secret-54",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenRejected",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "sign-wrong-secret-54",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"sign",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "Sign",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenRejected",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-unknown-key-id-54",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenRejected",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-disabled-key-54",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenRejected",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-wrong-secret-65",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenInvalid",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-unknown-key-id-65",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"key-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "key-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenInvalid",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-anonymous",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"anon-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "anon-deny",
|
|
"result": "denied",
|
|
"status": "BadIdentityTokenInvalid",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-untrusted-client",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\untrusted-client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"peer-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "peer-deny",
|
|
"result": "denied",
|
|
"status": "BadSecurityChecksFailed",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "sign-untrusted-client",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\untrusted-client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"sign",
|
|
"peer-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "Sign",
|
|
"expected": "peer-deny",
|
|
"result": "denied",
|
|
"status": "BadSecurityChecksFailed",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "encrypt-untrusted-server",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"encrypt",
|
|
"peer-deny"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "SignAndEncrypt",
|
|
"expected": "peer-deny",
|
|
"result": "denied",
|
|
"status": "BadCertificateUntrusted",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
}
|
|
],
|
|
"clis": [
|
|
{
|
|
"name": "cli-sdk1-encrypt-key-65",
|
|
"exe": "C:\\OtOpcUa800\\upload\\baseline-cli\\ZB.MOM.WW.OtOpcUa.Client.CLI.exe",
|
|
"argv": "read --url <url> --security encrypt --username apikey --password <task-secret> --node i=2259",
|
|
"exit": 0,
|
|
"good": true,
|
|
"secretOccurrencesInOutput": 0,
|
|
"output": "Node: i=2259\r\nValue: 0\r\nStatus: Good [0x00000000]\r\nSource Time: 2026-11-12T15:10:46.4132866Z\r\nServer Time: 2026-11-12T15:10:46.4132866Z\r\n"
|
|
},
|
|
{
|
|
"name": "cli-sdk2-encrypt-key-54",
|
|
"exe": "C:\\OtOpcUa800\\upload\\candidate-cli\\ZB.MOM.WW.OtOpcUa.Client.CLI.exe",
|
|
"argv": "read --url <url> --security encrypt --username apikey --password <task-secret> --node i=2259",
|
|
"exit": 0,
|
|
"good": true,
|
|
"secretOccurrencesInOutput": 0,
|
|
"output": "Node: i=2259\r\nValue: 0\r\nStatus: Good [0x00000000]\r\nSource Time: 11/12/2026 15:10:49\r\nServer Time: 11/12/2026 15:10:49\r\n"
|
|
}
|
|
],
|
|
"findings": [
|
|
{
|
|
"name": "endpoints-advertised",
|
|
"args": [
|
|
"endpoints",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa"
|
|
],
|
|
"exit": 3,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "endpoints",
|
|
"result": "insecure-offered",
|
|
"endpoints": [
|
|
{
|
|
"mode": "None",
|
|
"policy": "None",
|
|
"tokens": [
|
|
"UserName"
|
|
],
|
|
"certSha1": "CEF9D91F8CBC0EE78B317D3AA51EB40CD9C41ACA"
|
|
},
|
|
{
|
|
"mode": "Sign",
|
|
"policy": "Basic256Sha256",
|
|
"tokens": [
|
|
"UserName"
|
|
],
|
|
"certSha1": "CEF9D91F8CBC0EE78B317D3AA51EB40CD9C41ACA"
|
|
},
|
|
{
|
|
"mode": "SignAndEncrypt",
|
|
"policy": "Basic256Sha256",
|
|
"tokens": [
|
|
"UserName"
|
|
],
|
|
"certSha1": "CEF9D91F8CBC0EE78B317D3AA51EB40CD9C41ACA"
|
|
}
|
|
]
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "none-endpoint-valid-key-54",
|
|
"args": [
|
|
"probe",
|
|
"C:\\OtOpcUa800\\state\\client-pki",
|
|
"opc.tcp://localhost:14841/OtOpcUa",
|
|
"none",
|
|
"allow"
|
|
],
|
|
"exit": 0,
|
|
"secretOccurrencesInOutput": 0,
|
|
"result": {
|
|
"mode": "probe",
|
|
"securityMode": "None",
|
|
"policy": "None",
|
|
"expected": "allow",
|
|
"result": "allowed",
|
|
"serverState": "0 (Good [0x00000000])",
|
|
"serviceLevel": "250 (Good [0x00000000])",
|
|
"unsNamespaceIndex": 3,
|
|
"virtualTag": "800 (Good [0x00000000])",
|
|
"serverCertSha1": "CEF9D91F8CBC0EE78B317D3AA51EB40CD9C41ACA",
|
|
"autoAccept": false
|
|
},
|
|
"output": null
|
|
},
|
|
{
|
|
"name": "cli-sdk2-encrypt-key-65",
|
|
"exe": "C:\\OtOpcUa800\\upload\\candidate-cli\\ZB.MOM.WW.OtOpcUa.Client.CLI.exe",
|
|
"argv": "read --url <url> --security encrypt --username apikey --password <task-secret> --node i=2259",
|
|
"exit": 1,
|
|
"good": false,
|
|
"secretOccurrencesInOutput": 0,
|
|
"output": "ERROR\r\nOpc.Ua.ServiceResultException: [80200000] (BadIdentityTokenInvalid)\r\n at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header) \r\n at Opc.Ua.SessionClient.ActivateSessionAsync(RequestHeader requestHeader, SignatureData clientSignature, ArrayOf`1 clientSoftwareCertificates, ArrayOf`1 localeIds, ExtensionObject userIdentityToken, SignatureData userTokenSignature, CancellationToken ct) \r\n at Opc.Ua.Client.Session.OpenCoreAsync(SessionClient serviceClient, String sessionName, UInt32 sessionTimeout, IUserIdentity identity, ArrayOf`1 preferredLocales, Boolean checkDomain, Boolean closeChannel, CancellationToken ct, ArrayOf`1 refreshedEndpoints) \r\n at Opc.Ua.Client.Session.OpenCoreAsync(SessionClient serviceClient, String sessionName, UInt32 sessionTimeout, IUserIdentity identity, ArrayOf`1 preferredLocales, Boolean checkDomain, Boolean closeChannel, CancellationToken ct, ArrayOf`1 refreshedEndpoints) \r\n at Opc.Ua.Client.DefaultSessionFactory.CreateAsync(ApplicationConfiguration configuration, ITransportWaitingConnection connection, ConfiguredEndpoint endpoint, Boolean updateBeforeConnect, Boolean checkDomain, String sessionName, UInt32 sessionTimeout, IUserIdentity identity, ArrayOf`1 preferredLocales, DiagnosticsMasks returnDiagnostics, CancellationToken ct) \r\n at ZB.MOM.WW.OtOpcUa.Client.Shared.Adapters.DefaultSessionFactory.CreateSessionAsync(ApplicationConfiguration config, EndpointDescription endpoint, String sessionName, UInt32 sessionTimeoutMs, UserIdentity identity, Boolean validateServerHostName, CancellationToken ct) in \\private\\tmp\\claude-501\\-Users-dohertj2-Desktop-scadaproj\\a6d396bd-5e2c-4e21-a60d-576a5e97f6b7\\scratchpad\\wt800\\src\\Client\\ZB.MOM.WW.OtOpcUa.Client.Shared\\Adapters\\DefaultSessionFactory.cs:27\r\n at ZB.MOM.WW.OtOpcUa.Client.Shared.OpcUaClientService.ConnectToEndpointAsync(ConnectionSettings settings, String endpointUrl, CancellationToken ct) in \\private\\tmp\\claude-501\\-Users-dohertj2-Desktop-scadaproj\\a6d396bd-5e2c-4e21-a60d-576a5e97f6b7\\scratchpad\\wt800\\src\\Client\\ZB.MOM.WW.OtOpcUa.Client.Shared\\OpcUaClientService.cs:801\r\n at ZB.MOM.WW.OtOpcUa.Client.Shared.OpcUaClientService.ConnectAsync(ConnectionSettings settings, CancellationToken ct) in \\private\\tmp\\claude-501\\-Users-dohertj2-Desktop-scadaproj\\a6d396bd-5e2c-4e21-a60d-576a5e97f6b7\\scratchpad\\wt800\\src\\Client\\ZB.MOM.WW.OtOpcUa.Client.Shared\\OpcUaClientService.cs:129\r\n at ZB.MOM.WW.OtOpcUa.Client.CLI.CommandBase.CreateServiceAndConnectAsync(CancellationToken ct) in \\private\\tmp\\claude-501\\-Users-dohertj2-Desktop-scadaproj\\a6d396bd-5e2c-4e21-a60d-576a5e97f6b7\\scratchpad\\wt800\\src\\Client\\ZB.MOM.WW.OtOpcUa.Client.CLI\\CommandBase.cs:116\r\n at ZB.MOM.WW.OtOpcUa.Client.CLI.Commands.ReadCommand.ExecuteAsync(IConsole console) in \\private\\tmp\\claude-501\\-Users-dohertj2-Desktop-scadaproj\\a6d396bd-5e2c-4e21-a60d-576a5e97f6b7\\scratchpad\\wt800\\src\\Client\\ZB.MOM.WW.OtOpcUa.Client.CLI\\Commands\\ReadCommand.cs:47\r\n at ZB.MOM.WW.OtOpcUa.Client.CLI.Commands.ReadCommand.ExecuteAsync(IConsole console) in \\private\\tmp\\claude-501\\-Users-dohertj2-Desktop-scadaproj\\a6d396bd-5e2c-4e21-a60d-576a5e97f6b7\\scratchpad\\wt800\\src\\Client\\ZB.MOM.WW.OtOpcUa.Client.CLI\\Commands\\ReadCommand.cs:78\r\n at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in \\_\\CliFx\\CliApplication.cs:144\r\n at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in \\_\\CliFx\\CliApplication.cs:185\r\n"
|
|
}
|
|
],
|
|
"health": [
|
|
{
|
|
"path": "/health/ready",
|
|
"status": 200,
|
|
"body": "{\"status\":\"Healthy\",\"totalDurationMs\":0.9159,\"entries\":{\"opcua-endpoint\":{\"status\":\"Healthy\",\"description\":\"OPC UA endpoint is listening\",\"durationMs\":0.0201,\"data\":{\"status\":\"Started\"}},\"script-runner\":{\"status\":\"Healthy\",\"description\":\"Scripts run in process (Scripting:Runner=InProcess).\",\"durationMs\":0.1409},\"akka\":{\"status\":\"Healthy\",\"description\":\"Akka cluster member status: Up\",\"durationMs\":0.1152,\"data\":{\"selfAddress\":\"akka.tcp://otopcua@127.0.0.1:18801\",\"selfRoles\":[\"driver\"],\"memberCount\":1,\"unreachableCount\":0,\"leader\":\"akka.tcp://otopcua@127.0.0.1:18801\"}}}}"
|
|
},
|
|
{
|
|
"path": "/healthz",
|
|
"status": 200,
|
|
"body": "Healthy"
|
|
},
|
|
{
|
|
"path": "/health/active",
|
|
"status": 200,
|
|
"body": "{\"status\":\"Healthy\",\"totalDurationMs\":1.6714,\"entries\":{\"opcua-endpoint\":{\"status\":\"Healthy\",\"description\":\"OPC UA endpoint is listening\",\"durationMs\":0.0181,\"data\":{\"status\":\"Started\"}},\"akka\":{\"status\":\"Healthy\",\"description\":\"Akka cluster member status: Up\",\"durationMs\":0.101,\"data\":{\"selfAddress\":\"akka.tcp://otopcua@127.0.0.1:18801\",\"selfRoles\":[\"driver\"],\"memberCount\":1,\"unreachableCount\":0,\"leader\":\"akka.tcp://otopcua@127.0.0.1:18801\"}},\"cluster-primary\":{\"status\":\"Healthy\",\"description\":\"Active node for role \\u0027driver\\u0027 (oldest Up member).\",\"durationMs\":0.1893,\"data\":{\"selfAddress\":\"akka.tcp://otopcua@127.0.0.1:18801\",\"activeRole\":\"driver\",\"activeNode\":\"akka.tcp://otopcua@127.0.0.1:18801\"}},\"localdb-replication\":{\"status\":\"Healthy\",\"description\":\"LocalDb replication is not configured on this node (default-OFF).\",\"durationMs\":1.0444}}}"
|
|
}
|
|
],
|
|
"failed": [],
|
|
"outputsWithSecrets": []
|
|
}
|