{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "JSON Schema tibi-server permissions configuration", "description": "tibi-server permissions linter", "type": "object", "additionalProperties": false, "properties": { "public": { "description": "permissions for unauthorized public access", "$ref": "#/definitions/permissionSet" }, "user": { "description": "permissions for authorized users (nativ tibi-server auth)", "$ref": "#/definitions/permissionSet" } }, "patternProperties": { "^x\\-": { "description": "template property" }, "^token:": { "description": "permissions for header or query token", "$ref": "#/definitions/permissionSet" }, "^[a-zA-Z0-9_]+$": { "description": "custom permissions", "$ref": "#/definitions/permissionSet" } }, "required": ["public", "user"], "definitions": { "permissionSet": { "type": "object", "additionalProperties": false, "properties": { "methods": { "type": "object", "description": "permissions for http methods", "additionalProperties": false, "properties": { "get": { "type": "boolean" }, "post": { "type": "boolean" }, "put": { "type": "boolean" }, "delete": { "type": "boolean" } } }, "validProjections": { "type": "array", "items": { "type": "string" } } }, "required": ["methods"] } } }