title: SSL certificates for 3rd party services over spark
body: <p>im trying to access a service (lets say mongodb) that requires SSL but the connection is rejected from the executor because i dont have the right SSL configurations set.</p>
  
  <p>i know that when submitting a job, spark supports the following configuration:</p>
  
  <pre><code>spark.executor.extraJavaOptions
  spark.driver.extraJavaOptions
  </code></pre>
  
  <p>which then we can set the jvm ssl paths (and passwords respectively): </p>
  
  <pre><code>javax.net.ssl.trustStore
  javax.net.ssl.keyStore
  </code></pre>
  
  <p>however, jvm requires those paths to be a physical path which results in a problem when using amazon's Spark EMR or any other spark cluster that doesnt give disc access, in which the required files can be pre deployed.</p>
  
  <p>so basically my questions are:</p>
  
  <ol>
  <li>is there a way for a spark job to push the truststore/keystore files to all executors ? --files can push the files to all executors but then i will have to get the absaloute path in each executor in order to set the correct config.</li>
  <li>is there are away to run a job on all executors ? (in that job we can push the truststore/keystore from a neutral place to a tmp file on the executor context)</li>
  <li>does jvm can be configured to handle a URI , i.e
  javax.net.ssl.trustStore=s3a://path/to/keystore.key ?</li>
  </ol>