when running the ziti-edge-tunnel binary to add a --jwt the --jwt flag should be validated as a jwt first. if it is not a jwt, treat it like a path and try to read the passed value as a file on the local filesystem relative to the cwd of where ziti-edge-tunnel was executed from.
for example this fails (because it references a file, and is not valid jwt content):
& 'C:\Program Files (x86)\NetFoundry Inc\Ziti Desktop Edge\ziti-edge-tunnel.exe' add --jwt .\keychain1.jwt
whereas this will succeed as the --jwt is now the content of the file:
& 'C:\Program Files (x86)\NetFoundry Inc\Ziti Desktop Edge\ziti-edge-tunnel.exe' add --use-keychain --jwt (Get-Content -Raw .\keychain1.jwt).Trim() -i .\keychain1.json -P discourse
StartServiceCtrlDispatcher failed (1063)
{
"Success":true,
"Code":0
}
USEFUL LOG
[2026-06-10T17:26:31.474Z] ERROR ziti-edge-tunnel:process_cmd.c:417 enroll_ziti_async() cannot enroll: -3
[2026-06-10T17:26:31.474Z] ERROR ziti-edge-tunnel:process_cmd.c:66 tunnel_enroll_cb() enrollment failed: enrollment failed(-22)
when running the ziti-edge-tunnel binary to
adda--jwtthe--jwtflag should be validated as a jwt first. if it is not a jwt, treat it like a path and try to read the passed value as a file on the local filesystem relative to the cwd of where ziti-edge-tunnel was executed from.for example this fails (because it references a file, and is not valid jwt content):
whereas this will succeed as the --jwt is now the content of the file:
USEFUL LOG
[2026-06-10T17:26:31.474Z] ERROR ziti-edge-tunnel:process_cmd.c:417 enroll_ziti_async() cannot enroll: -3
[2026-06-10T17:26:31.474Z] ERROR ziti-edge-tunnel:process_cmd.c:66 tunnel_enroll_cb() enrollment failed: enrollment failed(-22)