Context
This article provides sample code on setting up TLS on Spark Connector.
Method
Code sample for configuring TLS on Spark:
conf.set("aerospike.keyPath", "<Path to FeatureKey.conf>") // not necessary from 3.1.0/2.8.0 connector if server have spark connector enabled.
conf.set("aerospike.seedhost", "<Aerospike_seed_Host>:PORT")
conf.set("aerospike.user", "<Aerospike user>")
conf.set("aerospike.password", "<Aerospike Password>")
conf.set("aerospike.tls.enabletls","true")
conf.set("aerospike.tls.tlsname","<TLS_NAME>")
conf.set("aerospike.tls.keystore-store-type","<Keystore_type_like_JKS>")
conf.set("aerospike.tls.keystore-store-file","<Keystore cert file>")
conf.set("aerospike.tls.keystore-store-password-file","<Keystore store password file>")
conf.set("aerospike.tls.keystore-key-password-file","<Keystore_password_path_and_filename>")
conf.set("aerospike.tls.truststore-store-type","JKS")
conf.set("aerospike.tls.truststore-store-file","<Truststore CA cert file>")
conf.set("aerospike.tls.truststore-store-password-file","<Truststore CA certfile password file>")
conf.set("aerospike.tls.truststore-key-password-file","<Truststore CA Key password file>")
conf.set("aerospike.timeout", "<Aerospike_Timeout>") // no necessary for tls
Notes
While building TLS connection, spark connector doesn’t use any default location for cert files. It only assumes store type as JKS, if absent.
Applies To Earliest Version
4.9
Applies To Latest Version
Current Version