3
0
Files
corteza/def/def-rbac.json
2021-07-08 11:42:18 +02:00

79 lines
2.0 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"resource": {
"additionalProperties": false,
"type": "object",
"description": "RBAC resource definition",
"properties": {
"prefix": {
"type": "string",
"description": "Resource name",
"pattern": "^[a-z]+:?[a-zA-Z]+(:[a-zA-Z]+)?$"
},
"references": {
"type": "array",
"title": "Reference components",
"description": "When not explicitly defined it fallbacks to one item array with 'ID'",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"field": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
{
"type": "string"
}
]
}
},
"attributes": {
"anyOf": [
{
"type": "boolean",
"enum": [ "true" ],
"title": "Custom implementation of resource attributes",
},
{
"type": "array",
"title": "List of resource attributes",
"description": "Attributes are used for generating list of contextual roles"
}
]
}
}
},
"operations": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^([a-z]+(-[a-z]+)*)(\\.[a-z]+)*$": {
"anyOf": [
{ "type": "boolean", "enum": [ "false" ] },
{
"type": "object",
"additionalProperties": false,
"properties": {
"canFnName": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
]
}
}
}
}
}