test(validation): ScadaBridge consumer matrix uses a production-length API key; SDK 2 consumer run (ScadaBridge#125)
v2-ci / unit-tests (push) Waiting to run

The consumer matrix minted a 55-character otua_matrix_ key, which stays
under SDK 2's 64-byte RsaEncryptedSecret threshold and so could not show
lmxopcua#880 from the consumer side. It now uses the ApiKeySecret.Generate
shape (65 characters), as opcua-sdk-compatibility already does.

README records the 2026-11-12 run with ScadaBridge on SDK 2.0.1
(a2e9d718): matrix 11/11 x3 modes on 83ed880e and 412da27c, ACL off and
on; 8/8 trust controls fail closed; failover 8/8; a mutation with the SDK
default UserName handler fails every baseline leg with
BadIdentityTokenInvalid.

Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
This commit is contained in:
Joseph Doherty
2026-11-12 22:22:45 -05:00
parent f3178c5f5d
commit 2705f16670
2 changed files with 23 additions and 2 deletions
@@ -16,7 +16,11 @@ SECURITY = {"None": "none", "Sign": "sign", "SignAndEncrypt": None}
def leg_env(mode):
env = os.environ.copy()
env["OPCUA_MATRIX_PASSWORD"] = "otua_matrix_" + secrets.token_urlsafe(32)
# The production ApiKeySecret.Generate shape and length, 65 characters (lmxopcua#880, ScadaBridge#125): the
# 55-character key used before stayed under SDK 2's 64-byte RsaEncryptedSecret threshold, so it could not show
# whether an SDK 2 consumer still sends the password in a format an SDK 1.5 server decrypts.
env["OPCUA_MATRIX_PASSWORD"] = "otua_" + secrets.token_hex(8) + "_" + secrets.token_urlsafe(32)
assert len(env["OPCUA_MATRIX_PASSWORD"]) == 65
for name in ("SCADABRIDGE_PROBE_PKI", "SCADABRIDGE_PROBE_SERVER_CERTS", "OPCUA_MATRIX_SERVER_SECURITY"):
env.pop(name, None)
if SECURITY[mode]: