{
  "$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"
    },
    "user" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The name of the user who accessed the file"
    },
    "account" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The name of the account associated with the user"
    },
    "account_domain" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The domain associated with the account"
    },
    "source_asset" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The source asset (host or machine) where the file access originated"
    },
    "source_address" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The network address of the source asset",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      }, {
        "format" : "hostname"
      } ]
    },
    "service" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The service used to access the file"
    },
    "target_asset" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The asset (host or machine) that is the target of the access attempt"
    },
    "target_address" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The network address of the target machine",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      }, {
        "format" : "hostname"
      } ]
    },
    "file_path" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The full path of the accessed file"
    },
    "file_name" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The name of the accessed file"
    },
    "file_extension" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The extension of the accessed file"
    },
    "file_share" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The name or path of the file share involved in the access"
    },
    "honey_file" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Indicates whether the file is a honeypot (true or false)"
    },
    "access_types" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The types of file access operations performed"
    },
    "r7_context" : {
      "type" : "object",
      "properties" : {
        "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
        },
        "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
        },
        "source_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
        },
        "target_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"
    },
    "custom_data" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "JSON string produced by applying one or more user-defined custom parsers to the original data"
    },
    "source_data" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The unparsed, original log line as received from the collector"
    },
    "source_json" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "The data that was received or collected by our collector or endpoint agent, formatted as JSON"
    }
  },
  "required" : [ "timestamp", "service", "file_path" ],
  "description" : "File access"
}