Hey everyone!
I just got into OpenZiti as it's an interesting concept for me.
I used the quickstart Docker Compose file with a few changes that I need to run it in Mac's Docker Desktop engine. Nothing major though. Dotenv file is the same as in the example except I set an admin password for convenience.
Everything starts and works flawlessly, I can bash into the controller and list everything, create and enroll identities, access my website etc. Problems start when I try to connect to my network.
Using Ziti Desktop Edge - creating an identity yields a docker network hostname instead of localhost
(e.g. ziti-edge-controller:1280
, which is inaccessible). When changing ZITI_CTRL_EDGE_ADVERTISED_ADDRESS
to localhost
, controllers stop connecting, so that's not a way to solve it. I know that advertised address should not be localhost
in production environment, but I can't even connect to test it.
Ok, I can work around that by creating a custom JWT and signing it using the same certificate. Now Desktop Edge can see the controller, but says that CONTROLLER_UNAVAILABLE
. Upon further research, I find that it's not the controller - it gets the request, but container logs say that tls handshake failed
, and desktop logs say that jwt signature is invalid
, even though it easily valides using a simple Go scratch or a 3rd-party site.
Maybe I don't have the certificates in my local Mac machine? Got everything from the container, installed it on my Mac, trusted everything by hand, rebooted, tried again - nope.
So desktop app is not working in my particular case - let's try step 2, this might be easier.
Using Go SDK - we create and enroll an identity, feed the resulting json to the example code, input our service name and everything should just connect - but no. I'm stuck with the same problem again - an instance of *rest_model.SessionDetail
has a list of edge routers, but their addresses are again using docker network aliases, so I can't connect to it at all.
What do I need to do? I believe the simplest way to test the network is to create a VM, set up a reverse proxy to controller, ZAC and main edge router (that's in purple, for Docker Compose example) and use domains as advertised addresses for almost every container in the network (so that it stops communicating inside docker network and has to go outside at least to DNS to resolve advertised domains, and that's a bummer).
What I want from OpenZiti as a result? I have 15 to 25 VMs in my home server, and now I use the reverse proxy, but it would be much safer and easier to communicate using ZTN for all the clients. I want to spin up another VM to host a docker-compose for the network controller and place a router inside every service and connect it to the main, so that I can use ZAC to create identities and policies (which identity has access to which service) and I'd have only two ports forwarded on my router (for the controller and main ziti router)
Much thanks! Hope I solve this mystery.