-
- Downloads
[SPARK-20379][CORE] Allow SSL config to reference env variables.
This change exposes the internal code path in SparkConf that allows configs to be read with variable substitution applied, and uses that new method in SSLOptions so that SSL configs can reference other variables, and more importantly, environment variables, providing a secure way to provide passwords to Spark when using SSL. The approach is a little bit hacky, but is the smallest change possible. Otherwise, the concept of "namespaced configs" would have to be added to the config system, which would create a lot of noise for not much gain at this point. Tested with added unit tests, and on a real cluster with SSL enabled. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #18394 from vanzin/SPARK-20379.try2.
Showing
- core/src/main/scala/org/apache/spark/SSLOptions.scala 10 additions, 10 deletionscore/src/main/scala/org/apache/spark/SSLOptions.scala
- core/src/main/scala/org/apache/spark/SparkConf.scala 5 additions, 0 deletionscore/src/main/scala/org/apache/spark/SparkConf.scala
- core/src/test/scala/org/apache/spark/SSLOptionsSuite.scala 16 additions, 0 deletionscore/src/test/scala/org/apache/spark/SSLOptionsSuite.scala
Please register or sign in to comment