spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tgravescs <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4224] [Core][YARN] - Support group acls...
Date Tue, 03 May 2016 17:51:46 GMT
Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12760#discussion_r61925009
  
    --- Diff: core/src/test/scala/org/apache/spark/SecurityManagerSuite.scala ---
    @@ -60,6 +110,43 @@ class SecurityManagerSuite extends SparkFunSuite with ResetSystemProperties
{
         assert(securityManager.checkUIViewPermissions(null) === true)
       }
     
    +  test("set security with api for groups") {
    +    val conf = new SparkConf
    +    conf.set("spark.user.groups.mapping", "org.apache.spark.DummyGroupMappingServiceProvider")
    +
    +    val securityManager = new SecurityManager(conf);
    +    securityManager.setAcls(true)
    +    securityManager.setViewAclsGroups("group1,group2")
    +
    +    // group1,group2 match
    +    assert(securityManager.checkUIViewPermissions("user1") === true)
    +    assert(securityManager.checkUIViewPermissions("user2") === true)
    +
    +    // change groups so they do not match
    +    securityManager.setViewAclsGroups("group4,group5")
    +    assert(securityManager.checkUIViewPermissions("user1") === false)
    +    assert(securityManager.checkUIViewPermissions("user2") === false)
    +
    +
    +    val conf2 = new SparkConf
    +    conf.set("spark.user.groups.mapping", "BogusServiceProvider")
    --- End diff --
    
    I don't think we need this section of tests, we already test BogusServiceProvider in the
test above.  One is enough.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message