{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "Sessions",
    "Notification",
    "BruteForce",
    "CredentialPolicy",
    "Timezone",
    "ProductionMode",
    "Proxy"
  ],
  "properties": {
    "schema_version": {
      "type": "integer"
    },
    "Sessions": {
      "type": "object",
      "required": [
        "sessionTimeout",
        "maxSessionsPerUser",
        "maxSSHConnections"
      ],
      "additionalProperties": false,
      "properties": {
        "sessionTimeout": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^(?:[5-9]|[1-5][0-9]|60)m$"
            },
            {
              "type": "string",
              "pattern": "^(?:[1-9]|1[0-9]|2[0-4])h$"
            }
          ]
        },
        "maxSessionsPerUser": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        },
        "maxSSHConnections": {
          "type": "integer",
          "minimum": 3,
          "maximum": 100
        }
      }
    },
    "Notification": {
      "type": "object",
      "required": [
        "notificationText"
      ],
      "additionalProperties": false,
      "properties": {
        "notificationText": {
          "type": "string",
          "minLength": 0,
          "maxLength": 1000
        }
      }
    },
    "BruteForce": {
      "type": "object",
      "required": [
        "maxFailedLoginAttemptsBeforeLockout",
        "loginAttemptWindowMinutes",
        "lockoutDurationMinutes"
      ],
      "additionalProperties": false,
      "properties": {
        "maxFailedLoginAttemptsBeforeLockout": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        },
        "loginAttemptWindowMinutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 300
        },
        "lockoutDurationMinutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        }
      }
    },
    "CredentialPolicy": {
      "type": "object",
      "required": [
        "expirationDays"
      ],
      "additionalProperties": false,
      "properties": {
        "expirationDays": {
          "type": "integer",
          "minimum": 1,
          "maximum": 7300
        }
      }
    },
    "Timezone": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40,
      "pattern": "^[A-Za-z0-9_-]+(?:/[A-Za-z0-9_-]+)*$"
    },
    "ProductionMode": {
      "type": "boolean"
    },
    "Network": {
      "type": "array",
      "minItems": 0,
      "maxItems": 5,
      "items": {
        "type": "object",
        "required": [
          "Name",
          "IP-Assignment",
          "IP-Address",
          "Mask"
        ],
        "additionalProperties": false,
        "properties": {
          "Name": {
            "type": "string"
          },
          "IP-Assignment": {
            "type": "string",
            "enum": [
              "dhcp",
              "static",
              "unconfigured"
            ]
          },
          "IP-Address": {
            "type": "string",
            "format": "ipv4"
          },
          "Mask": {
            "type": "string",
            "format": "ipv4"
          },
          "DNS-1": {
            "type": "string",
            "format": "ipv4"
          },
          "DNS-2": {
            "type": "string",
            "format": "ipv4"
          },
          "DNS-3": {
            "type": "string",
            "format": "ipv4"
          },
          "Disabled-Traffic": {
            "type": "boolean"
          }
        }
      }
    },
    "Proxy": {
      "type": "object",
      "required": [
        "HTTP-Proxy",
        "Enable",
        "HTTPS-Proxy",
        "Username",
        "Exceptions"
      ],
      "additionalProperties": false,
      "properties": {
        "HTTP-Proxy": {
          "oneOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "string",
              "maxLength": 0
            }
          ]
        },
        "Enable": {
          "type": "boolean"
        },
        "HTTPS-Proxy": {
          "oneOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "string",
              "maxLength": 0
            }
          ]
        },
        "Username": {
          "type": "string"
        },
        "Password": {
          "type": "string",
          "minLength": 0,
          "maxLength": 1001
        },
        "Exceptions": {
          "type": "string"
        }
      }
    }
  }
}