Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "roles": [
    {
      "name": "cluster",
      "operationsAllowed": [
        "CLUSTER:MANAGE",
        "CLUSTER:WRITE",
        "CLUSTER:READ"
   ]

 

 

 

 

...

   ]
    },
    {

...


      "name": "

...

data",

...


      "operationsAllowed": [

...


        "

...

DATA:MANAGE",

...


        "

...

DATA:WRITE",

...


        "

...

DATA:READ"

...


 

...

 

...

    

...

],
      "

...

regions": 

...

[

...

"region1", "region2"]
    }

...


  ]

...


  "users": [

...


    {

...


      "name": "super-user",

...


      "password": "1234567",

...


      "roles": [

...


        "cluster",

...


        "data"

...


      ]
    },

...


    {

...


      "name": "

...

joebloggs",

...


      "password": "1234567",

...


      "roles": [

...


        "

...

data"
      ]

...


    }
  ]
}

In this example we have two roles defined: cluster and data. The data role only has access to two regions: region1 and region2.

To start using this sample perform the following steps:

  1. Using gfsh, start a locator with security activated.

    Code Block
    start locator --name=locator1 \
        --J=-Dgemfire.security-client-authenticator=blah.blah.ExampleJSONAuthorization.create 

...

  1. \
        --J=-Dgemfire.security-client-accessor=blah.blah.ExampleJSONAuthorization.create
  2. Similarly, start a server

    Code Block
    start server --name=server1 --locators=localhost[10334]
  3. asdfsadfsa
  4. type stuff
  5. run stuff
  6. do more stuff

 

sdfdsfsdg

}

Step-by-step guide

Reference

Following are lists for gfsh commands, (highlighted in green), and JMX operations with their corresponding permissions.

...