sweb commented on code in PR #58010: URL: https://github.com/apache/spark/pull/58010#discussion_r4442463750
########## docs/security.md: ########## @@ -183,6 +183,37 @@ Unlike the other SSL settings for the UI, the RPC SSL is *not* automatically ena `spark.ssl.enabled` is set. It must be explicitly enabled, to ensure a safe migration path for users upgrading Spark versions. +On Kubernetes, RPC SSL passwords set in the Spark configuration are propagated to executor pods +using environment variables, like the authentication secret described under +[Kubernetes](#kubernetes) above, so any user who can list pods in the namespace can read them. In +cluster mode they are also stored in plaintext in the driver's ConfigMap. To avoid both, store the +passwords in a Kubernetes Secret and bind the following variables on the driver and the executors +using `spark.kubernetes.driver.secretKeyRef.<name>` and +`spark.kubernetes.executor.secretKeyRef.<name>`, instead of setting them in the Spark configuration: + +* `_SPARK_SSL_RPC_KEY_STORE_PASSWORD` +* `_SPARK_SSL_RPC_KEY_PASSWORD` +* `_SPARK_SSL_RPC_PRIVATE_KEY_PASSWORD` +* `_SPARK_SSL_RPC_TRUST_STORE_PASSWORD` + +For example: +`spark.kubernetes.executor.secretKeyRef._SPARK_SSL_RPC_KEY_STORE_PASSWORD=<secret-name>:<key>`. + +On the driver, these variables also take precedence over the passwords the UI inherits from +`spark.ssl.*`. If the UI keystore or truststore uses a different password, set it explicitly in Review Comment: @LuciferYang I tried to address this here: https://github.com/apache/spark/pull/58010/commits/74d7d553f5f46be725cad8ba7e22411749cc2753 I also updated the PR description to indicate that this section of the documentation was covered. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
