{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/zero-trust-network-access/main/json-schema/zero-trust-network-access-device-posture-schema.json",
  "title": "ZTNA Device Posture Profile",
  "description": "A reusable posture profile evaluating signals about a client device prior to granting access.",
  "type": "object",
  "required": ["id", "name", "checks"],
  "properties": {
    "id": { "type": "string" },
    "name": { "type": "string" },
    "description": { "type": "string" },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["type"],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "os_version",
              "disk_encryption",
              "firewall_enabled",
              "antivirus_present",
              "edr_running",
              "domain_joined",
              "client_certificate",
              "mdm_enrolled",
              "screen_lock",
              "password_policy",
              "patch_level"
            ]
          },
          "operator": { "type": "string", "enum": ["equals", "gte", "lte", "in", "exists"] },
          "value": {}
        }
      }
    },
    "platforms": { "type": "array", "items": { "type": "string", "enum": ["windows", "macos", "linux", "ios", "android", "chromeos"] } },
    "created": { "type": "string", "format": "date-time" }
  }
}
