searx/blog/private-engines.html

161 lines
7.7 KiB
HTML
Raw Normal View History

2020-03-05 22:30:31 +01:00
<!DOCTYPE html>
2020-06-19 11:15:15 +02:00
<html>
2020-03-05 22:30:31 +01:00
<head>
<meta charset="utf-8" />
2020-09-30 10:35:05 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2020-03-05 22:30:31 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Limit access to your searx engines &#8212; Searx Documentation (Searx-1.0.0.tex)</title>
2020-03-05 22:30:31 +01:00
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
2020-03-05 22:30:31 +01:00
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
2020-10-08 14:19:38 +02:00
<link rel="next" title="Running shell commands to fetch results" href="command-line-engines.html" />
2020-03-05 22:30:31 +01:00
<link rel="prev" title="Preparation for offline engines" href="intro-offline.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
2020-10-08 14:19:38 +02:00
<li class="right" >
<a href="command-line-engines.html" title="Running shell commands to fetch results"
accesskey="N">next</a> |</li>
2020-03-05 22:30:31 +01:00
<li class="right" >
<a href="intro-offline.html" title="Preparation for offline engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li>
2020-09-30 10:35:05 +02:00
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Limit access to your searx engines</a></li>
2020-03-05 22:30:31 +01:00
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="limit-access-to-your-searx-engines">
2020-03-05 22:30:31 +01:00
<h1>Limit access to your searx engines<a class="headerlink" href="#limit-access-to-your-searx-engines" title="Permalink to this headline"></a></h1>
<p>Administrators might find themselves wanting to limit access to some of the
enabled engines on their instances. It might be because they do not want to
expose some private information through an offline engine. Or they
would rather share engines only with their trusted friends or colleagues.</p>
<div class="section" id="private-engines">
<span id="id1"></span><h2>Private engines<a class="headerlink" href="#private-engines" title="Permalink to this headline"></a></h2>
2020-09-30 10:35:05 +02:00
<p>To solve this issue private engines were introduced in <a class="reference external" href="https://github.com/searx/searx/pull/1823">PR 1823</a>.
2020-03-05 22:30:31 +01:00
A new option was added to engines named <cite>tokens</cite>. It expects a list
of strings. If the user making a request presents one of the tokens
2020-06-29 08:26:27 +02:00
of an engine, they can access information about the engine
2020-03-05 22:30:31 +01:00
and make search requests.</p>
<p>Example configuration to restrict access to the Arch Linux Wiki engine:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span> <span class="nt">name </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">arch linux wiki</span>
<span class="nt">engine </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">archlinux</span>
<span class="nt">shortcut </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">al</span>
<span class="nt">tokens </span><span class="p">:</span> <span class="p p-Indicator">[</span> <span class="s">&#39;my-secret-token&#39;</span> <span class="p p-Indicator">]</span>
2020-03-05 22:30:31 +01:00
</pre></div>
</div>
<p>Unless a user has configured the right token, the engine is going
to be hidden from him/her. It is not going to be included in the
list of engines on the Preferences page and in the output of
<cite>/config</cite> REST API call.</p>
<p>Tokens can be added to ones configuration on the Preferences page
under “Engine tokens”. The input expects a comma separated list of
strings.</p>
<p>The distribution of the tokens from the administrator to the users
is not carved in stone. As providing access to such engines
implies that the admin knows and trusts the user, we do not see
necessary to come up with a strict process. Instead,
we would like to add guidelines to the documentation of the feature.</p>
</div>
<div class="section" id="next-steps">
2020-03-05 22:30:31 +01:00
<h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this headline"></a></h2>
<p>Now that searx has support for both offline engines and private engines,
it is possible to add concrete engines which benefit from these features.
For example engines which search on the local host running the instance.
Be it searching your file system or querying a private database. Be creative
and come up with new solutions which fit your use case.</p>
</div>
<div class="section" id="acknowledgement">
2020-03-05 22:30:31 +01:00
<h2>Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permalink to this headline"></a></h2>
<p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a> .</p>
<div class="line-block">
<div class="line">Happy hacking.</div>
<div class="line">kvch // 2020.02.28 22:26</div>
</div>
</div>
</div>
2020-03-05 22:30:31 +01:00
2020-09-30 10:35:05 +02:00
<div class="clearer"></div>
2020-03-05 22:30:31 +01:00
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
2020-09-30 10:35:05 +02:00
<li><a href="https://github.com/searx/searx">Source</a>
2020-03-05 22:30:31 +01:00
2020-09-30 10:35:05 +02:00
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
2020-03-05 22:30:31 +01:00
<li><a href="https://searx.space">Public instances</a>
2020-03-05 22:30:31 +01:00
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
<li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
2020-03-05 22:30:31 +01:00
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Blog</a>
<ul>
<li>Previous: <a href="intro-offline.html" title="previous chapter">Preparation for offline engines</a>
2020-10-08 14:19:38 +02:00
<li>Next: <a href="command-line-engines.html" title="next chapter">Running shell commands to fetch results</a></ul>
2020-03-05 22:30:31 +01:00
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.5.3.
2020-03-05 22:30:31 +01:00
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>