The policies schema defines the JSON schema used for service access policies in security.manager.
Referencing the policies schema definition file in policies JSON files serves two purposes:
- Validation of policies JSON regarding
- structure
- types of values
- allowed patterns for values
- Provide editing support, eg. in Visual Studio Code, like
- code suggest
- type documentation
- type examples
An instance of the schema may look like this:
{
"$schema": "https://raw.githubusercontent.com/conterra/policies-json/1.7.0/schema/policies.schema.json",
"policies": [
{
"layers": ["0", "1", "2"],
"roles": ["${guests}", "enhancedSecurity_authenticated"],
"restrictions": ["area51"]
}
],
"properties": {
"guests": "41477fa98f444444855e1e0b7b132b45"
},
"restrictions": {
"area51": {
"type": "spatial",
"featuretypeurl": "https://gis.example.com:6443/arcgis/rest/services/RestricionAreas/FeatureServer/0",
"featurequery": "area_name = '51'"
},
"secret_data": {
"type": "field",
"hiddenfields": ["PLANET_OF_BIRTH", "IQ", "HUMAN_NAME"]
}
}
}
Please see the test folder more samples /test/json.