I have set up a TLS enabled cluster following the steps highlighted by @ajbeamon and have verified the behavior by trying to connect to the same using fdbcli and providing the necessary certificate and key files. But while connecting to the cluster from a java client showed some strange behavior. Setting the TLS paths in the network options while running the java client through Windows OS gave a TLS error but interestingly enough the same worked on a unix machine. The network options are set like this
fdb.options().setTLSCertPath("path to cert file");
fdb.options().setTLSCaPath("path to CA file");
fdb.options().setTLSKeyPath("path to key file");
fdb.options().setTLSVerifyPeers("Check.Valid=1".getBytes());
and the stacktrace looks like this :
Exception in thread “main” com.apple.foundationdb.FDBException: TLS error
at com.apple.foundationdb.FDB.Network_setOption(Native Method)
at com.apple.foundationdb.OptionsSet.setOption(OptionsSet.java:55)
at com.apple.foundationdb.NetworkOptions.setTLSCertPath(NetworkOptions.java:87)
at Transaction.main(Transaction.java:33)
can anyone please help if i am missing something here?
And also for the record layer i couldn’t find any way from which the TLS paths can be set in the network options from the java client. Is there any other way to specify the tls paths in java client itself?