Skip to content

ziti-edge-tunnel add --jwt #1358

Description

@dovholuknf

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions