[ 
https://issues.apache.org/jira/browse/GEODE-2920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16061363#comment-16061363
 ] 

ASF GitHub Bot commented on GEODE-2920:
---------------------------------------

Github user jaredjstewart commented on a diff in the pull request:

    https://github.com/apache/geode/pull/596#discussion_r123818520
  
    --- Diff: 
geode-core/src/test/java/org/apache/geode/management/internal/security/DiskStoreMXBeanSecurityJUnitTest.java
 ---
    @@ -57,7 +56,48 @@ public void setUp() throws Exception {
       }
     
       @Test
    -  @ConnectionConfiguration(user = "data-admin", password = "1234567")
    +  @ConnectionConfiguration(user = "clusterRead", password = "clusterRead")
    +  public void testClusterReadAccess() throws Exception {
    +    assertThatThrownBy(() -> 
bean.flush()).hasMessageContaining(TestCommand.diskManage.toString());
    --- End diff --
    
    A bunch of tests in this change set can be simplified by using method 
references in place of lambda expressions (when the lambdas take no parameters 
and invoke a no-arg method on the target):
    ```
    
assertThatThrownBy(bean::flush).hasMessageContaining(TestCommand.diskManage.toString());
    ```
    in place of 
    ```
    assertThatThrownBy(() -> 
bean.flush()).hasMessageContaining(TestCommand.diskManage.toString());
    ```



> secure disk-store as a resource
> -------------------------------
>
>                 Key: GEODE-2920
>                 URL: https://issues.apache.org/jira/browse/GEODE-2920
>             Project: Geode
>          Issue Type: Sub-task
>          Components: security
>            Reporter: Swapnil Bawaskar
>
> Treat DISK as a CLUSTER resource so that administrators can control the 
> ability to manage diskstores/create regions that will write to disk stores.
> Only a user with CLUSTER:MANAGE:DISK should be able to run the following gfsh 
> commands:
> {noformat}
> create disk-store
> alter disk-store
> compact disk-store
> destroy disk-store
> revoke missing-disk-store
> {noformat}
> And the following JMX bean methods:
> {noformat}
> DiskStoreMXBean.forceCompaction
> DiskStoreMXBean.flush
> DiskStoreMXBean.forceRoll
> DiskStoreMXBean.setDiskUsageCriticalPercentage
> DiskStoreMXBean.setDiskUsageWarningPercentage
> DistributedSystemMXBean.revokeMissingDiskStores
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to