{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "description": "The settings for the embedded DLP (dlpd) engine",
    "markdownDescription": "The settings for the embedded DLP (`dlpd`) engine",
    "additionalProperties": false,
    "required": ["version"],
    "properties": {
        "version": {
            "type": "string",
            "enum": ["5.4"],
            "description": "The software version the configuration was created for"
        },
        "environment": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "socket": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "path": {
                            "type": "string",
                            "default": "/var/run/halon/dlpd.sock",
                            "description": "socket path"
                        },
                        "owner": {
                            "type": "string",
                            "description": "socket owner"
                        },
                        "group": {
                            "type": "string",
                            "description": "socket group"
                        },
                        "chmod": {
                            "$ref": "#/definitions/mode",
                            "description": "socket chmod"
                        }
                    }
                },
                "tmpdir": {
                    "type": "string",
                    "default": "/var/spool/halon/tmp/dlpd",
                    "description": "Temp path"
                },
                "controlsocket": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "path": {
                            "type": "string",
                            "default": "/var/run/halon/dlpd.ctl",
                            "description": "socket path"
                        },
                        "owner": {
                            "type": "string",
                            "description": "socket owner"
                        },
                        "group": {
                            "type": "string",
                            "description": "socket group"
                        },
                        "chmod": {
                            "$ref": "#/definitions/mode",
                            "description": "socket chmod"
                        }
                    }
                },
                "privdrop": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "user": {
                            "type": "string",
                            "description": "Privdrop user"
                        },
                        "group": {
                            "type": "string",
                            "description": "Privdrop group"
                        }
                    }
                },
                "appconf": {
                    "type": "string",
                    "default": "/etc/halon/dlpd-app.yaml",
                    "description": "Application conf path"
                },
                "umask": {
                    "$ref": "#/definitions/mode",
                    "description": "Application umask after privdrop"
                }
            }
        }
    },
    "definitions": {
        "mode": {
            "type": "string",
            "pattern": "^[0-7][0-7][0-7][0-7]$",
            "minLength": 4,
            "maxLength": 4
        }
    }
}