...
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:
Using gfsh, start a locator with security activated.
Code Block start locator --name=locator1 \ --J=-Dgemfire.security-client-authenticator=blah.blah.ExampleJSONAuthorization.create
...
\ --J=-Dgemfire.security-client-accessor=blah.blah.ExampleJSONAuthorization.create
Similarly, start a server
Code Block start server --name=server1 --locators=localhost[10334]
- asdfsadfsa
- type stuff
- run stuff
- 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.
...