After working through a few different scenarios, I though to share a learning … which I believe is covered … but maybe not in a simple format that makes it easy to understand.
@TheLumberjack … it would be great if you can clarify the following… as its something that I have found through comparing different examples… across different SDKs
When you need to use an intercept, you need to use a tunneller. This is because the tunneller is what is used to intercept the traffic.
Intercepts are required for integration in situations where app integration is not possible.
If you run the SDK examples on your desktop, this is already catered for. You will have already enrolled the user using the Desktop Edge, which acts as a tunneller.
If you want to run the SDK on a remote server, you need to use a different tunnelling application. The recommended app is ziti-edge-tunnel, which is a newer version of the ziti-tunnel app that is bundled with the ziti binaries.
I won’t go through all of the steps to install it, but running it is very simple.
./ziti-edge-tunnel run -i /mnt/v/temp/httpbin-identity.json
In case where you have the SDKs embedded at the application level, you no longer need an intercept. Instead, you can simply call a service.
One example of this is the golang curlz. In the example below private-httpbin is the name of the service. In such cases, as an intercept is not required, it does not need to be configured.
ZITI_SDK_CONFIG=/mnt/v/temp/httpbin-identity.json ./curlz http://private-httpbin:2000/json
A great example to work through is the JDBC postgres example below. This is a bit different because of how the intercept works. Rather than being an http end point… it is a database host.
In this case, you don’t need to use a tunneller… even though it requires an intercept. This is because of zitified JDBC driver.
what I understand is that you can make a native call in Java without the JDBC driver using sockets. I think you can work it out if you just follow through the code, but its a bit out of my expertise
PS… my next challenge is to replicate the zitified JDBC example in Python… I have realised that you can simply load up the JDBC driver in Python… and run it that way… though I like to make things more complex… and want to see how far I can get with using sockets. There is already half of it done with the existing Python samples… and will be working through this over the next few days.
This is something I am really yet to explore… and will be starting off with the Python socket db connection as mentioned above
all further comments are welcome