JDBC connections to the Spark clusters work using the Spark thrift server protocol. The connections are secure because the authentication is performed from the control plane using the API gateway and the requests which are authenticated are passed to the Spark cluster to establish the thrift server connectivity.