Hello,
I recently made a post on the subreddit asking about the feasibility of my implementation. I've made some progress in getting a network set up on an EC2 instance and enrolling my windows host machine through the desktop edge and a separate Ubuntu EC2 instance on the network through a tunneler, and I was able to simulate communication between the two.
I began running into issues when following the Using 3rd Party CAs with Ziti CLI, and ZAC. I would create a new CA just fine, but when I tried to verify it through ZAC, the contents would not populate.
A blank shaded window would popup, but there would be no verification token field or standard UI layout. I would need to refresh the page to close out of it
After troubleshooting this for a while, it led me to doing a fresh ziti install on a new EC2 instance following the same steps as before. The network setup went as expected and accessing the ZAC console did as well. I created my identities through the CLI and exported JWT to my local machine using scp to enroll my windows device and separate EC2 instance in the network again. I was able to enroll the separate EC2 instance just fine using the ziti-edge-tunnel, but when I tried to enroll my windows device through the desktop edge I am getting a similar enrollment failed: CONTROLLER_UNAVAILABLE(-7) that has been seen on here before. Here is the full log.
[2024-11-08T16:04:15.504Z] INFO ziti-edge-tunnel:ziti-edge-tunnel.c:2086 run() ============================================================================
[2024-11-08T16:04:15.511Z] ERROR ziti-edge-tunnel:tun.c:107 WintunLogger() Failed to find matching adapter name: Element not found. (Code 0x00000490)
[2024-11-08T16:04:31.901Z] ERROR ziti-sdk:ziti_enroll.c:249 well_known_certs_cb() D:/a/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c/build/_deps/ziti-sdk-c-src/library/ziti_enroll.c:144 - ZITI_JWT_VERIFICATION_FAILED => -7 (JWT verification failed)
[2024-11-08T16:04:31.901Z] ERROR ziti-edge-tunnel:ziti-edge-tunnel.c:330 tunnel_enroll_cb() enrollment failed: CONTROLLER_UNAVAILABLE(-7)
I began looking into the WintunLogger() Failed to find matching adapter through my adapter settings and this is what I found.
I've uninstalled and reinstalled the desktop edge client multiple times, but I am still facing the same error. I have yet to try this on another device, but plan to soon.
I've tried the steps from a previous post:
This can happen for a few different reasons. The most common of which are:
the jwt issuer url is invalid
the certificate presented by the iss url was not signed by the same key that signed the jwt and server cert
the controller is offline or unreacable
the JWT has expired. it's only valid for 3 hours by default. see the edge.enrollment.edgeIdentity.duration setting of the controller
My EXTERNAL_DNS configuration is through the public IP of my EC2 instance.
- I am unable to curl https://44.204.250.56:8441 from my windows machine or my already enrolled EC2 instance
- I am able to use openssl to return a certificate valid for the URL I am connecting to
- I can verify that my JWT has not expired
Following this discussion post Host OpenZiti Anywhere Unable to enroll - #11 by TheLumberjack, I was able to verify that the SSL handshake changes a bit between the IP and the DNS.
openssl s_client -connect ec2-44-204-250-56.compute-1.amazonaws.com:8441 </dev/null
CONNECTED(00000003)
depth=2 C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-root-ca Root CA
verify error:num=19:self-signed certificate in certificate chain
verify return:1
depth=2 C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-root-ca Root CA
verify return:1
depth=1 C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-intermediate
verify return:1
depth=0 C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111 server certificate
verify return:1
---
Certificate chain
0 s:C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111 server certificate
i:C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-intermediate
a:PKEY: rsaEncryption, 4096 (bit); sigalg: RSA-SHA256
v:NotBefore: Nov 8 13:48:04 2024 GMT; NotAfter: Nov 8 13:49:00 2025 GMT
1 s:C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-intermediate
i:C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-root-ca Root CA
a:PKEY: rsaEncryption, 4096 (bit); sigalg: RSA-SHA256
v:NotBefore: Nov 8 13:47:51 2024 GMT; NotAfter: Nov 6 13:48:49 2034 GMT
2 s:C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-root-ca Root CA
i:C = US, L = Charlotte, O = NetFoundry, OU = ADV-DEV, CN = ip-172-31-8-111-edge-controller-root-ca Root CA
a:PKEY: rsaEncryption, 4096 (bit); sigalg: RSA-SHA256
v:NotBefore: Nov 8 13:47:43 2024 GMT; NotAfter: Nov 6 13:48:42 2034 GMT
---
Server certificate
One other thing I noticed is that I currently have no sessions running in ZAC, there are API sessions for my Default Admin, Router, and my windows laptop accessing ZAC as the IPs match.
The reason I bring this up is I noticed a session was there when I previously had everything connected and running on the network.
I am sorry for the long post, but I wanted to make sure I included everything I've attempted up until this point. I really appreciate any help. Thank You!