aboutsummaryrefslogtreecommitdiff
path: root/docs/configuration.md
diff options
context:
space:
mode:
authorDhruve Ashar <dhruveashar@gmail.com>2016-05-04 08:45:43 -0500
committerTom Graves <tgraves@yahoo-inc.com>2016-05-04 08:45:43 -0500
commita45647746d1efb90cb8bc142c2ef110a0db9bc9f (patch)
tree1c6cdb00bce295b2d16a98860848a19c72c4aa30 /docs/configuration.md
parentabecbcd5e9598471b705a2f701731af1adc9d48b (diff)
downloadspark-a45647746d1efb90cb8bc142c2ef110a0db9bc9f.tar.gz
spark-a45647746d1efb90cb8bc142c2ef110a0db9bc9f.tar.bz2
spark-a45647746d1efb90cb8bc142c2ef110a0db9bc9f.zip
[SPARK-4224][CORE][YARN] Support group acls
## What changes were proposed in this pull request? Currently only a list of users can be specified for view and modify acls. This change enables a group of admins/devs/users to be provisioned for viewing and modifying Spark jobs. **Changes Proposed in the fix** Three new corresponding config entries have been added where the user can specify the groups to be given access. ``` spark.admin.acls.groups spark.modify.acls.groups spark.ui.view.acls.groups ``` New config entries were added because specifying the users and groups explicitly is a better and cleaner way compared to specifying them in the existing config entry using a delimiter. A generic trait has been introduced to provide the user to group mapping which makes it pluggable to support a variety of mapping protocols - similar to the one used in hadoop. A default unix shell based implementation has been provided. Custom user to group mapping protocol can be specified and configured by the entry ```spark.user.groups.mapping``` **How the patch was Tested** We ran different spark jobs setting the config entries in combinations of admin, modify and ui acls. For modify acls we tried killing the job stages from the ui and using yarn commands. For view acls we tried accessing the UI tabs and the logs. Headless accounts were used to launch these jobs and different users tried to modify and view the jobs to ensure that the groups mapping applied correctly. Additional Unit tests have been added without modifying the existing ones. These test for different ways of setting the acls through configuration and/or API and validate the expected behavior. Author: Dhruve Ashar <dhruveashar@gmail.com> Closes #12760 from dhruve/impr/SPARK-4224.
Diffstat (limited to 'docs/configuration.md')
-rw-r--r--docs/configuration.md55
1 files changed, 52 insertions, 3 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index 6512e16faf..9191570d07 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1231,7 +1231,7 @@ Apart from these, the following properties are also available, and may be useful
<td><code>spark.acls.enable</code></td>
<td>false</td>
<td>
- Whether Spark acls should are enabled. If enabled, this checks to see if the user has
+ Whether Spark acls should be enabled. If enabled, this checks to see if the user has
access permissions to view or modify the job. Note this requires the user to be known,
so if the user comes across as null no checks are done. Filters can be used with the UI
to authenticate and set the user.
@@ -1243,8 +1243,33 @@ Apart from these, the following properties are also available, and may be useful
<td>
Comma separated list of users/administrators that have view and modify access to all Spark jobs.
This can be used if you run on a shared cluster and have a set of administrators or devs who
- help debug when things work. Putting a "*" in the list means any user can have the privilege
- of admin.
+ help debug when things do not work. Putting a "*" in the list means any user can have the
+ privilege of admin.
+ </td>
+</tr>
+<tr>
+ <td><code>spark.admin.acls.groups</code></td>
+ <td>Empty</td>
+ <td>
+ Comma separated list of groups that have view and modify access to all Spark jobs.
+ This can be used if you have a set of administrators or developers who help maintain and debug
+ the underlying infrastructure. Putting a "*" in the list means any user in any group can have
+ the privilege of admin. The user groups are obtained from the instance of the groups mapping
+ provider specified by <code>spark.user.groups.mapping</code>. Check the entry
+ <code>spark.user.groups.mapping</code> for more details.
+ </td>
+</tr>
+<tr>
+ <td><code>spark.user.groups.mapping</code></td>
+ <td><code>org.apache.spark.security.ShellBasedGroupsMappingProvider</code></td>
+ <td>
+ The list of groups for a user are determined by a group mapping service defined by the trait
+ org.apache.spark.security.GroupMappingServiceProvider which can configured by this property.
+ A default unix shell based implementation is provided <code>org.apache.spark.security.ShellBasedGroupsMappingProvider</code>
+ which can be specified to resolve a list of groups for a user.
+ <em>Note:</em> This implementation supports only a Unix/Linux based environment. Windows environment is
+ currently <b>not</b> supported. However, a new platform/protocol can be supported by implementing
+ the trait <code>org.apache.spark.security.GroupMappingServiceProvider</code>.
</td>
</tr>
<tr>
@@ -1306,6 +1331,18 @@ Apart from these, the following properties are also available, and may be useful
</td>
</tr>
<tr>
+ <td><code>spark.modify.acls.groups</code></td>
+ <td>Empty</td>
+ <td>
+ Comma separated list of groups that have modify access to the Spark job. This can be used if you
+ have a set of administrators or developers from the same team to have access to control the job.
+ Putting a "*" in the list means any user in any group has the access to modify the Spark job.
+ The user groups are obtained from the instance of the groups mapping provider specified by
+ <code>spark.user.groups.mapping</code>. Check the entry <code>spark.user.groups.mapping</code>
+ for more details.
+ </td>
+</tr>
+<tr>
<td><code>spark.ui.filters</code></td>
<td>None</td>
<td>
@@ -1328,6 +1365,18 @@ Apart from these, the following properties are also available, and may be useful
have view access to this Spark job.
</td>
</tr>
+<tr>
+ <td><code>spark.ui.view.acls.groups</code></td>
+ <td>Empty</td>
+ <td>
+ Comma separated list of groups that have view access to the Spark web ui to view the Spark Job
+ details. This can be used if you have a set of administrators or developers or users who can
+ monitor the Spark job submitted. Putting a "*" in the list means any user in any group can view
+ the Spark job details on the Spark web ui. The user groups are obtained from the instance of the
+ groups mapping provider specified by <code>spark.user.groups.mapping</code>. Check the entry
+ <code>spark.user.groups.mapping</code> for more details.
+ </td>
+</tr>
</table>
#### Encryption