Files
hansken-extraction-plugin-s…/0.9.16/dev/concepts/extraction_plugins.html
Roel van Dijk 93b020aef4 Update documentation to 0.9.16 (#10)
Co-authored-by: Roel van Dijk <rdvdijk@users.noreply.github.com>
2026-03-06 09:59:38 +01:00

197 lines
12 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hansken Extraction Plugins &mdash; Hansken Extraction Plugins for plugin developers 0.9.16
documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d75fae25" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../../_static/wider_pages.css?v=32ad70ab" />
<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=433a2a34"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Anatomy of a plugin" href="anatomy_of_a_plugin.html" />
<link rel="prev" title="General concepts" href="../concepts.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home">
Hansken Extraction Plugins for plugin developers
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../concepts.html">General concepts</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Hansken Extraction Plugins</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#building-a-plugin">Building a plugin</a></li>
<li class="toctree-l3"><a class="reference internal" href="#package-the-plugin">Package the plugin</a></li>
<li class="toctree-l3"><a class="reference internal" href="#upload-the-plugin-to-hansken">Upload the plugin to Hansken</a></li>
<li class="toctree-l3"><a class="reference internal" href="#refresh-the-hansken-tools-list">Refresh the Hansken tools list</a></li>
<li class="toctree-l3"><a class="reference internal" href="#start-an-extraction-with-the-plugin-enabled">Start an extraction with the plugin enabled</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="anatomy_of_a_plugin.html">Anatomy of a plugin</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugin_types.html">Extraction plugin types</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugin_naming_convention.html">Plugin naming convention</a></li>
<li class="toctree-l2"><a class="reference internal" href="traces.html">Traces &amp; Trace model</a></li>
<li class="toctree-l2"><a class="reference internal" href="hql_lite.html">HQL-Lite</a></li>
<li class="toctree-l2"><a class="reference internal" href="data_transformations.html">Data Transformations</a></li>
<li class="toctree-l2"><a class="reference internal" href="test_framework.html">Test framework</a></li>
<li class="toctree-l2"><a class="reference internal" href="all_in_one_debugging.html">Debugging locally with Hansken All in One (AIO)</a></li>
<li class="toctree-l2"><a class="reference internal" href="isolation.html">Plugin isolation</a></li>
<li class="toctree-l2"><a class="reference internal" href="kubernetes_autoscaling.html">Kubernetes, Autoscaling, Resourcemanagement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../spec.html">Extraction Plugin specifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../java.html">Java</a></li>
<li class="toctree-l1"><a class="reference internal" href="../python.html">Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../faq.html">Frequently Asked Questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../contact.html">Contact</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../changes.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Hansken Extraction Plugins for plugin developers</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../concepts.html">General concepts</a></li>
<li class="breadcrumb-item active">Hansken Extraction Plugins</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/dev/concepts/extraction_plugins.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="hansken-extraction-plugins">
<h1>Hansken Extraction Plugins<a class="headerlink" href="#hansken-extraction-plugins" title="Link to this heading"></a></h1>
<p>Hansken Extraction Plugins enable Hansken users to add their own extraction tools to Hansken.</p>
<p>To use an Extraction Plugin in Hansken, the following steps have to be done:</p>
<ol class="arabic simple">
<li><p>Build the plugin</p></li>
<li><p>Upload the plugin to Hansken</p></li>
<li><p>Refresh the Hansken tools list</p></li>
<li><p>Start an extraction with the plugin enabled</p></li>
</ol>
<section id="building-a-plugin">
<h2>Building a plugin<a class="headerlink" href="#building-a-plugin" title="Link to this heading"></a></h2>
<p>Hansken Extraction Plugins can be built in Java or Python by implementing an interface. Which interface you choose
depends on the type of plugin you choose to make, see <a class="reference internal" href="plugin_types.html"><span class="doc">Plugin Types</span></a>. For more information on coding
your own plugin, see the <a class="reference external" href="https://git.eminjenv.nl/hanskaton/hansken-extraction-plugin-sdk/examples">Extraction Plugin Examples</a>.</p>
<p>The plugin can then be tested using the <a class="reference internal" href="test_framework.html"><span class="doc">Test Framework</span></a>. This way you make sure everything works as
expected before taking further steps.</p>
</section>
<section id="package-the-plugin">
<h2>Package the plugin<a class="headerlink" href="#package-the-plugin" title="Link to this heading"></a></h2>
<p>To upload a plugin into Hansken, a docker image for this plugin must be uploaded to the docker registry. First, the
plugin container image must be packaged.
A plugin is packaged into an OCI image (also known as Docker image).</p>
<ul class="simple">
<li><p><a class="reference internal" href="../python/packaging.html"><span class="doc">Package a docker image for a Python plugin</span></a></p></li>
<li><p><a class="reference internal" href="../java/packaging.html"><span class="doc">Package a docker image for a Java plugin</span></a></p></li>
</ul>
</section>
<section id="upload-the-plugin-to-hansken">
<span id="upload-plugin"></span><h2>Upload the plugin to Hansken<a class="headerlink" href="#upload-the-plugin-to-hansken" title="Link to this heading"></a></h2>
<p>Hansken finds the plugins by scanning a docker registry. It will try to load all docker images with a certain prefix as
Extraction Plugins. The settings for this are defined in Hansken properties:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">registry.extraction.plugins.registry.uri</span></code> defines the registry</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">registry.extraction.plugins.registry.prefix</span></code> defines the prefix plugins must have</p></li>
</ul>
<p>When the image is packaged locally, it needs to be pushed (uploaded) to the docker registry. These commands provide an
outline of how to do this:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">login</span> <span class="pre">&lt;docker-registry&gt;</span></code> (make sure you are logged in to the registry)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">push</span> <span class="pre">&lt;docker-registry&gt;&lt;prefix&gt;&lt;pluginname&gt;</span></code> (push the plugin docker image to the registry)</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>For more information about uploading plugins and running them in Hansken, see the Using extraction plugins in
Hansken chapter of the <em>Hansken User Guide</em>.</p>
</div>
</section>
<section id="refresh-the-hansken-tools-list">
<h2>Refresh the Hansken tools list<a class="headerlink" href="#refresh-the-hansken-tools-list" title="Link to this heading"></a></h2>
<p>Hansken checks which plugins are available at startup. The list of available plugins can also be refreshed by calling
the following endpoint: <code class="docutils literal notranslate"><span class="pre">&lt;hansken-domain&gt;/gatekeeper/tools?refresh=true</span></code></p>
<p>This can be invoked via an internet browser.</p>
</section>
<section id="start-an-extraction-with-the-plugin-enabled">
<h2>Start an extraction with the plugin enabled<a class="headerlink" href="#start-an-extraction-with-the-plugin-enabled" title="Link to this heading"></a></h2>
<p>If everything went well, the list of available tools in Hansken should now feature your plugin. To run the plugin in an
extraction, be sure to select its checkbox in the extraction tools dialog.</p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../concepts.html" class="btn btn-neutral float-left" title="General concepts" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="anatomy_of_a_plugin.html" class="btn btn-neutral float-right" title="Anatomy of a plugin" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2020-2026 Netherlands Forensic Institute.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>