Class V4IiziRunShim
Lets the iiziRun launchers of IIZI version 4 that are in the stores - BIG ACE 4.6.0 and ICU 4.6.0 (iiziRun Customized) and iiziRun Developer 4.x - launch their application on a server of IIZI version 5, so that the demo server can take the applications over on their real names before the version 5 apps are published (order CC-V4-IIZIRUN-SHIM, the owner's plan of 2026-10-31). The shim never reaches a customer: this class, its test V4IiziRunShimTest and the two hook lines in ExternalBrowserPagesImpl (each marked // V4-SHIM) are removed in ONE commit before the public v5 build.
What a launcher of version 4 needs. Such a launcher bundles no IIZI client. It asks the server for /iizi/iiziRun/pkey.json (the server's Diffie-Hellman key, for the password it encrypts) and then for /iizi/iiziRun/app.json (the client files to load), and loads the client the reply lists from the server - this server's client, of version 5, which then connects over the WebSocket with the protocol of version 5 (pv=5, no key, no password). The launcher refuses a reply whose version is not exactly 1 ("Remote iiziServer is not compatible with this version of the app.") and reads the member SPK of pkey.json as a hexadecimal number. So, when the switch is on, the two replies carry version 1 and a stand-in key; nothing else changes. The server reads no password (IIZI version 5, L-15 R5): the client public key pk and the encrypted password epw the launcher sends on app.json are not read, as before.
The switch: the system property "iizi.v4.support"; the value "true" is on, absent or anything else is off, and off is the server exactly as without this class.
The detection, per request: pkey.json is asked for by a launcher of version 4 alone (no iiziRun of version 5 asks for it); app.json with a member pk or epw is a launch of version 4 (a launcher of version 5 sends neither). apps.json is left alone: iiziRun Developer 4.x accepts any version from 1 there (jsr/comrun.js), and a reply of 1 would turn the iiziRun Developer of version 5 away. The WebSocket is not touched: no launcher of version 4 in the stores sends a key (k=) there, since the client it runs is this server's.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe parameter ofapp.jsonthat carries the client public key of a launcher before version 5: "pk".static final StringThe member of the key reply the launcher reads the server's Diffie-Hellman public key from: "SPK".static final StringThe one value of the property that switches the shim on: "true".static final StringThe parameter ofapp.jsonthat carries the encrypted password of a launcher before version 5: "epw".static final StringThe system property that switches the shim on: "iizi.v4.support".static final StringThe stand-in server public key: 64 hexadecimal digits, a 256-bit number below the prime of the launcher's Diffie-Hellman group, formatted as the server's own key was (the formerDHKey).static final intThe protocol version every iiziRun before version 5 expects in a reply, 1.static final StringThe member of the replies that carries the protocol version: "version".Method Summary
Modifier and TypeMethodDescriptionstatic booleanadapt(JSONObject root, String target, ClientParams params) static booleanChecks if the shim is on: the system property "iizi.v4.support" is "true".static booleanisVersion4Request(String target, ClientParams params) Checks if a request is one a launcher of IIZI version 4 makes:pkey.jsonalways, andapp.jsoncarrying the client public keypkor the encrypted passwordepw.
Field Details
PROPERTY
The system property that switches the shim on: "iizi.v4.support".- See Also:
ON
The one value of the property that switches the shim on: "true".- See Also:
V4_PROTOCOL_VERSION
public static final int V4_PROTOCOL_VERSIONThe protocol version every iiziRun before version 5 expects in a reply, 1.- See Also:
VERSION_MEMBER
The member of the replies that carries the protocol version: "version".- See Also:
KEY_MEMBER
The member of the key reply the launcher reads the server's Diffie-Hellman public key from: "SPK".- See Also:
STAND_IN_KEY
The stand-in server public key: 64 hexadecimal digits, a 256-bit number below the prime of the launcher's Diffie-Hellman group, formatted as the server's own key was (the formerDHKey). The launcher computes a shared key from it and encrypts the password with that; the server decrypts nothing, so a constant serves.- See Also:
CLIENT_KEY_PARAMETER
The parameter ofapp.jsonthat carries the client public key of a launcher before version 5: "pk".- See Also:
PASSWORD_PARAMETER
The parameter ofapp.jsonthat carries the encrypted password of a launcher before version 5: "epw".- See Also:
Method Details
isEnabled
public static boolean isEnabled()Checks if the shim is on: the system property "iizi.v4.support" is "true". Read at every request, so a test can set and clear it.- Returns:
- true when on, false when the property is absent or has any other value.
isVersion4Request
Checks if a request is one a launcher of IIZI version 4 makes:pkey.jsonalways, andapp.jsoncarrying the client public keypkor the encrypted passwordepw. Every other request,apps.jsonamong them, is not.- Parameters:
target- The request target, e.g.ServerConstants.RUN_PKEY.params- The client parameters of the request's query, null for none.- Returns:
- true for a request of a launcher of version 4, false otherwise.
adapt
Adapts the reply of an iiziRun JSON route for a launcher of IIZI version 4, when the shim is on and the request is such a launcher's: the member "version" becomes 1 and the member "SPK" the stand-in key. The server's log gets one WARNING the first time, and an INFO line per adapted reply.- Parameters:
root- The reply, with the server information already added.target- The request target, e.g.ServerConstants.RUN_APP.params- The client parameters of the request's query, null for none.- Returns:
- true when the reply was adapted, false when it is left as it is (the shim is off, or the request is not a launcher's of version 4).