LuciferYang commented on code in PR #58010: URL: https://github.com/apache/spark/pull/58010#discussion_r4313939533
########## docs/security.md: ########## @@ -183,6 +183,30 @@ 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 Review Comment: This paragraph tells users to bind `_SPARK_SSL_RPC_*` on the driver through `secretKeyRef` (the driver part came from my earlier review), but I missed a side effect: `SSLOptions.parse` reads these variables for every namespace, ahead of the `spark.ssl.*` defaults, so the driver's UI picks up the RPC password instead of inheriting `spark.ssl.keyStorePassword`. When the two keystore passwords differ, the UI cannot open its keystore and `WebUI.bind` calls `System.exit(1)`. One sentence here would cover it: on the driver these variables also override passwords the UI inherits from `spark.ssl.*`, so a UI keystore with a different password needs its own `spark.ssl.ui.*` password. Scoping the env fallback to the rpc namespace would fix it in code too, but that changes parsing for every namespace and goes beyond this PR. -- 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]
