ziti-tunnel-sdk-c icon indicating copy to clipboard operation
ziti-tunnel-sdk-c copied to clipboard

Identities Dir Functionality Broken

Open NicFragale opened this issue 2 years ago • 1 comments

The ZET functionality to ascribe identities for running against is either direct to one with (--identity [path/to/json]) or multiples with (--identity-dir [path/]. When the --identity-dir syntax is used, the ZET binary seems to not read anything in the directory. Further, it seems like it launches multiple instances of ZET causing errors to return stating certain things that it performs at startup are already done. Single/direct --identity still works however.

ZET versio 0.19.6 zet-identity

NicFragale avatar Jul 28 '22 19:07 NicFragale

This happens because special logic that initializes the dns IP range from a config file is invoked when run with -I, and the logic is faulty. Specifically, get_ip_range_from_config() assumes the DNS range starts with the IP address that is assigned to the tun interface.

To be clear, "config file" in this case refers not to an identity json file, but config.json as consumed by Ziti Desktop Edge for Windows. As of now this notion of a "config file" should not be processed by ziti-edge-tunnel on Linux.

To fix this, I think we either need to avoid the config file logic entirely on Linux (e.g. differentiate between --identity-dir and --config) or/and specifically add the DNS IP to the tunnel status model (and also to config.json)

scareything avatar Jul 28 '22 20:07 scareything