mirror of
https://github.com/NetherlandsForensicInstitute/hansken-extraction-plugin-sdk-documentation.git
synced 2026-02-14 14:09:49 +00:00
59 lines
2.5 KiB
Plaintext
59 lines
2.5 KiB
Plaintext
# Extraction Plugin specifications
|
|
|
|
.. note:: If you use the Java or Python extraction plugin SDK, you don't have
|
|
to worry about these specifications. The Java and Python SDKs makes
|
|
sure your plugin is compiled and packaged conform to the extraction
|
|
plugin specifications.
|
|
|
|
This page describes the specifications that define an extraction plugin.
|
|
The spec contains two major parts: a plugin protocol, and the plugin packaging
|
|
method.
|
|
|
|
This specification applies to plugins that are not embedded within Hansken,
|
|
but to plugins that developed and distributed outside the scope of the Hansken
|
|
platform development.
|
|
|
|
## Plugin protocol
|
|
|
|
An extraction plugin is a process that implements a [GRPC](https://grpc.io/)
|
|
service `ExtractionPluginService`. The service defines a protocol that is
|
|
used to allow communication between Hansken and an extraction plugin. The
|
|
GRPC and protocol definitions can be found in the extraction plugin source
|
|
code, under the folder `grpc`.
|
|
|
|
.. note:: The source code of the Extraction Plugin is currently not available
|
|
outside the scope of the Hansken core development teams. If you are
|
|
interested in the GRPC definitions, please :doc:`../contact` the
|
|
Hansken development team.
|
|
|
|
## Packaging
|
|
|
|
An extraction plugin is packaged as a container image -- conform the open
|
|
container initiative [image spec](https://github.com/opencontainers/image-spec).
|
|
An extraction plugin can be
|
|
|
|
The `ENTRYPOINT` of the container image should be a process that starts a GRPC
|
|
server that implements the plugin protocol. The GRPC protocol should run on
|
|
port `8999`.
|
|
|
|
The container image should be labeled with the plugin info.
|
|
The plugin info returned by the plugin plugin-info call and container labels
|
|
are required to match. If not, Hansken will not accept your plugin during
|
|
extractions - as it is unsure if the intended plugin is processing traces.
|
|
|
|
The labels that are expected are:
|
|
|
|
* `org.hansken.plugin-id` (conform :doc:`concepts/plugin_naming_convention`)
|
|
* `org.hansken.plugin-version`
|
|
* `org.hansken.plugin-api-version`
|
|
* `org.hansken.plugin-description`
|
|
* `org.hansken.plugin-webpage`
|
|
* `org.hansken.plugin-deferred-iterations` (optional, only has a meaning for deferred extraction plugins)
|
|
* `org.hansken.plugin-matcher` (see :doc:`concepts/hql_lite`)
|
|
* `org.hansken.plugin-license`
|
|
* `org.hansken.plugin-author-name`
|
|
* `org.hansken.plugin-author-organisation`
|
|
* `org.hansken.plugin-author-email`
|
|
* `org.hansken.plugin-resource-max_cpu` (in milicpu, optional)
|
|
* `org.hansken.plugin-resource-max_mem` (in mbs, optional)
|