123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Limit access to your searx engines — Searx Documentation (Searx-1.1.0.tex)</title>
- <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
- <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
- <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
- <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
- <script src="../_static/jquery.js"></script>
- <script src="../_static/underscore.js"></script>
- <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
- <script src="../_static/doctools.js"></script>
- <script src="../_static/sphinx_highlight.js"></script>
- <link rel="index" title="Index" href="../genindex.html" />
- <link rel="search" title="Search" href="../search.html" />
- <link rel="next" title="Preparation for offline engines" href="intro-offline.html" />
- <link rel="prev" title="Developing in Linux containers [202006]" href="lxcdev-202006.html" />
- </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>
- <li class="right" >
- <a href="intro-offline.html" title="Preparation for offline engines"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="lxcdev-202006.html" title="Developing in Linux containers [202006]"
- accesskey="P">previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.1.0.tex)</a> »</li>
- <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> »</li>
- <li class="nav-item nav-item-this"><a href="">Limit access to your searx engines</a></li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body" role="main">
-
- <section id="limit-access-to-your-searx-engines">
- <h1>Limit access to your searx engines<a class="headerlink" href="#limit-access-to-your-searx-engines" title="Permalink to this heading">¶</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>
- <section id="private-engines">
- <span id="id1"></span><h2>Private engines<a class="headerlink" href="#private-engines" title="Permalink to this heading">¶</a></h2>
- <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>.
- 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
- of an engine, they can access information about the engine
- 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="w"> </span><span class="nt">name </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">arch linux wiki</span><span class="w"></span>
- <span class="w"> </span><span class="nt">engine </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">archlinux</span><span class="w"></span>
- <span class="w"> </span><span class="nt">shortcut </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">al</span><span class="w"></span>
- <span class="w"> </span><span class="nt">tokens </span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="w"> </span><span class="s">'my-secret-token'</span><span class="w"> </span><span class="p p-Indicator">]</span><span class="w"></span>
- </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 one’s 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>
- </section>
- <section id="next-steps">
- <h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this heading">¶</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>
- </section>
- <section id="acknowledgement">
- <h2>Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permalink to this heading">¶</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>
- </section>
- </section>
- <div class="clearer"></div>
- </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>
- <li><a href="https://searx.github.io/searx/blog/index.html">Blog</a>
-
- <li><a href="https://github.com/searx/searx">Source</a>
-
- <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
-
- <li><a href="https://twitter.com/Searx_engine">Twitter</a>
-
- <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
- </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="lxcdev-202006.html" title="previous chapter">Developing in Linux containers [202006]</a>
- <li>Next: <a href="intro-offline.html" title="next chapter">Preparation for offline engines</a></ul>
- </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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
- <input type="submit" value="Go" />
- </form>
- </div>
- </div>
- <script>document.getElementById('searchbox').style.display = "block"</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
-
- <div class="footer" role="contentinfo">
- © Copyright 2015-2022, Adam Tauber, Noémi Ványi.
- Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
- </div>
- <script src="../_static/version_warning_offset.js"></script>
- </body>
- </html>
|