{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "timestamp" : {
      "type" : "string",
      "format" : "date-time",
      "x-isAttributed" : false,
      "description" : "The timestamp when the event originally occurred"
    },
    "asset" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Asset where local account is created"
    },
    "hostname" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The hostname of the system the local account was created on",
      "format" : "hostname"
    },
    "os_type" : {
      "type" : "string",
      "enum" : [ "WINDOWS", "MAC", "LINUX" ],
      "x-isAttributed" : false,
      "description" : "The OS this event happened on"
    },
    "source_user" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Name of the user that created the local account"
    },
    "source_user_domain" : {
      "type" : "string",
      "x-isAttributed" : true,
      "format" : "hostname",
      "description" : "Source user domain name"
    },
    "source_account" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Account name that created the local account"
    },
    "target_account" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Account name that was created on the system"
    },
    "windows_event_code" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Local account windows creation event code",
      "pattern" : "\\d+"
    },
    "r7_hostid" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The host id of the system on which the event happened. Only included for data sourced from endpoint agents"
    },
    "source_json" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "The data that was received or collected by our collector or endpoint agent, formatted as JSON"
    },
    "source_data" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The unparsed, original log line as received from the collector"
    },
    "custom_data" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "JSON string produced by applying one or more user-defined custom parsers to the original data"
    },
    "r7_context" : {
      "type" : "object",
      "properties" : {
        "source_user" : {
          "type" : "object",
          "properties" : {
            "domain" : {
              "type" : "string",
              "x-isAttributed" : false,
              "format" : "hostname",
              "description" : "The domain of the user"
            },
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "user"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "source_account" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "enum" : [ "account", "asset:account" ]
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "asset" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "asset"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        }
      },
      "x-isAttributed" : true,
      "description" : "R7_context includes attributed information related to the entry, with references to Rapid7-specific RRNs"
    },
    "entry_id" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Unique Entry ID assigned to each document or log entry"
    }
  },
  "required" : [ "timestamp", "hostname", "os_type", "target_account" ],
  "description" : "Represents the creation of a local account on a system"
}