You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/security.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,34 @@ See the [Secrets Documentation about spaces][13] for more details about spaces.
86
86
the keystore and truststore secrets will also show up as environment-based secrets,
87
87
due to the way secrets are implemented. You can ignore these extra environment variables.
88
88
89
+
# Spark SASL (RPC endpoint authentication)
90
+
Spark uses Simple Authentication Security Layer (SASL) to authenticate Executors with the Driver and for encrypting messages sent between components. This functionality relies on a shared secret between all components you expect to communicate with each other. A secret can be generated with the DC/OS Spark CLI
91
+
```bash
92
+
dcos spark secret <secret_path>
93
+
# for example
94
+
dcos spark secret /sparkAuthSecret
95
+
```
96
+
This will generate a random secret and upload it to the DC/OS secrets store [14] at the designated path. To use this secret for RPC authentication add the following configutations to your CLI command:
97
+
```bash
98
+
dcos spark run --submit-args="\
99
+
...
100
+
--conf spark.mesos.containerizer=mesos \ # Mesos UCR is required for secrets
101
+
--conf spark.authenticate=true \ # tell Spark to use authentication
102
+
--conf spark.authenticate.enableSaslEncryption=true \ # tell Spark to encrypt with Sasl
103
+
--conf spark.authenticate.secret=sparkauthsecret.secret \ # name of file-based secret for Driver, you may change the name
104
+
--conf spark.executorEnv._SPARK_AUTH_SECRET=sparkauthsecret.secret \ # name of file-based secret for the Executors
105
+
--conf spark.mesos.driver.secret.names=<secret_path> \ # secret path generated in the previous step, for Driver
106
+
--conf spark.mesos.driver.secret.filenames=sparkauthsecret.secret \ # tell Mesos to put the secret in this file in the Driver
107
+
--conf spark.mesos.executor.secret.names=<secret_path> \ # secret path generated in previous step for Executor
108
+
--conf spark.mesos.executor.secret.filenames=sparkauthsecret.secret \ # tell Mesos to put the secret in this File for the Executors
0 commit comments