This class provides a sample implementation of
SecurityManager for authentication and
authorization initialized from data provided as JSON.
A Geode member must be configured with the following:
security-manager = org.apache.geode.security.examples.TestSecurityManager
The class can be initialized with from a JSON resource called
security.json. This file
must exist on the classpath, so members should be started with an appropriate
--classpathoption.
The format of the JSON for configuration is as follows:
{
"roles": [
{
"name": "admin",
"operationsAllowed": [
"CLUSTER:MANAGE",
"DATA:MANAGE"
]
},
{
"name": "readRegionA",
"operationsAllowed": [
"DATA:READ"
],
"regions": ["RegionA", "RegionB"]
}
],
"users": [
{
"name": "admin",
"password": "secret",
"roles": ["admin"]
},
{
"name": "guest",
"password": "guest",
"roles": ["readRegionA"]
}
]
}