This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add schema.json files for parser message types
- Loading branch information
1 parent
fc62f8c
commit 568fa50
Showing
6 changed files
with
479 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"$ref": "#/definitions/LoggerOptions", | ||
"definitions": { | ||
"LoggerOptions": { | ||
"type": "object", | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
}, | ||
"tags": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"level": { | ||
"enum": ["debug", "error", "warn"], | ||
"type": "string" | ||
}, | ||
"error": {}, | ||
"payload": {} | ||
}, | ||
"required": ["message"] | ||
} | ||
}, | ||
"$schema": "http://json-schema.org/draft-07/schema#" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{ | ||
"$ref": "#/definitions/ParserInfo", | ||
"definitions": { | ||
"ParserInfo": { | ||
"type": "object", | ||
"properties": { | ||
"version": { | ||
"description": "The version of the RedEye parser config that the parser is compatible with", | ||
"type": "number" | ||
}, | ||
"id": { | ||
"description": "ID for parser, should match the standard name of the binary file or command", | ||
"type": "string" | ||
}, | ||
"name": { | ||
"description": "The name of the parser", | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "An optional description of the parser", | ||
"type": "string" | ||
}, | ||
"uploadForm": { | ||
"$ref": "#/definitions/UploadForm", | ||
"description": "An object that configures the upload form" | ||
} | ||
}, | ||
"required": ["id", "name", "uploadForm", "version"] | ||
}, | ||
"UploadForm": { | ||
"type": "object", | ||
"properties": { | ||
"tabTitle": { | ||
"description": "The title of the tab in the upload form", | ||
"type": "string" | ||
}, | ||
"enabledInBlueTeam": { | ||
"description": "Whether the parser is enabled in blue team mode\nThis should be false unless the parser is intended to be used by a blue team\nThe Blue team mode is intended to be a read only mode", | ||
"type": "boolean" | ||
}, | ||
"serverDelineation": { | ||
"$ref": "#/definitions/ServerDelineationTypes", | ||
"description": "The type of server delineation used by the parser" | ||
}, | ||
"fileUpload": { | ||
"description": "An object that configures the file upload portion of the upload form", | ||
"anyOf": [ | ||
{ | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/FileUpload" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"validate": { | ||
"enum": ["none", "parser"], | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["validate"] | ||
} | ||
] | ||
}, | ||
{ | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/FileUpload" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"validate": { | ||
"description": "validate uploaded files in client by file extensions", | ||
"type": "string", | ||
"const": "file-extensions" | ||
}, | ||
"acceptedExtensions": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"required": ["acceptedExtensions", "validate"] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"fileDisplay": { | ||
"$ref": "#/definitions/FileDisplay", | ||
"description": "An object that configures the display of servers/files after upload" | ||
} | ||
}, | ||
"required": ["enabledInBlueTeam", "fileDisplay", "fileUpload", "serverDelineation", "tabTitle"] | ||
}, | ||
"ServerDelineationTypes": { | ||
"enum": ["database", "folder"], | ||
"type": "string" | ||
}, | ||
"FileUpload": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"$ref": "#/definitions/UploadType", | ||
"description": "The type of upload, a selection of files or a directory" | ||
}, | ||
"description": { | ||
"description": "Describes what should be uploaded for the selected parser", | ||
"type": "string" | ||
}, | ||
"example": { | ||
"description": "A string that will be displayed in the upload form as an example of the type of file or shape of directory to upload", | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["description", "type"] | ||
}, | ||
"UploadType": { | ||
"enum": ["directory", "file"], | ||
"type": "string" | ||
}, | ||
"FileDisplay": { | ||
"type": "object", | ||
"properties": { | ||
"editable": { | ||
"description": "Whether the names of the servers inferred from the uploaded files are editable\nA user may want to change the name of a server to something more descriptive", | ||
"type": "boolean" | ||
} | ||
}, | ||
"required": ["editable"] | ||
} | ||
}, | ||
"$schema": "http://json-schema.org/draft-07/schema#" | ||
} |
Oops, something went wrong.