Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature taxonomy #1668

Merged
merged 59 commits into from
Jan 21, 2021
Merged

Feature taxonomy #1668

merged 59 commits into from
Jan 21, 2021

Conversation

rriclet
Copy link
Contributor

@rriclet rriclet commented Nov 18, 2020

Import taxonomies as a zip file

Formatting

Each taxonomy must be placed in a .json file.
Name the .zip file and .json files as you like.

The format of each JSON taxonomy must comply with the MISP taxonomy format, found here :
https://tools.ietf.org/id/draft-dulaunoy-misp-taxonomy-format-04.html

Usage

When calling the API, you must specify a file attribute. An example with the curl command below :
curl -u user:password -F file=@zipPath server/api/v1/taxonomy/import-zip

Errors

If you import a taxonomy which namespace is already in your organisation : the API will respond an error with the guilty namespace inside and no taxonomy will be added to your organisation.

If files inside .zip file are not JSON MISP formatted files : the API will respond an error with the guilty file inside and no taxonomy will be added to your organisation.

.property("namespace", UMapping.string)(_.field.readonly)
.property("description", UMapping.string)(_.field.readonly)
.property("version", UMapping.int)(_.field.readonly)
// Predicates ?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there other public properties to add ?

Copy link
Contributor

@To-om To-om left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job !

@nadouani nadouani linked an issue Nov 19, 2020 that may be closed by this pull request
20 tasks
@nadouani nadouani added the TheHive4 TheHive4 related issues label Nov 19, 2020
@nadouani nadouani added this to the 4.1.0 milestone Nov 19, 2020
@To-om
Copy link
Contributor

To-om commented Dec 8, 2020

Also, taxonomyCtrl should be included in describeCtrl.

@To-om To-om merged commit 58e4ae9 into develop-th4 Jan 21, 2021
@To-om To-om deleted the feature-taxonomy branch March 31, 2021 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TheHive4 TheHive4 related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add support to taxonomies
3 participants