If handshake failure executed it most probably means that an incomplete certificate trust path. But I am not an integration architect, looping the best integration guru @ben_speight to throw some light on this.
This is quite new to me as well. We have never used middleware while integrating Via Anaplan Connect. Hence would be more than happy to see what his response be.
This is an interesting scenario. I have dealt with a few middleware and PKIX/handshake issues in the past back when I used to work in Anaplan Support. I also reached out and consulted my fellow colleague @JonFerneau regarding this issue.
Here is what he said in regards to the error:
"If they are behind a proxy then yes, adding the -via and -viauser variables to the script should resolve the issue. Otherwise, they would need to add the Anaplan certificates to their Java trust store so that they trust the api.anaplan and auth.anaplan endpoints. Article attached that walks through that process."
In other words the handshake PKIX error you are encountering is tied to a trust issue between Anaplan/Java Store.
Attaching an article which can help walk you or your IT team through how to add certs to the Java Trust Store.
Let me know if you have any further questions on this!