private-engines.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Limit access to your searx engines &#8212; Searx Documentation (Searx-1.1.0.tex)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
  10. <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
  11. <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
  12. <script src="../_static/jquery.js"></script>
  13. <script src="../_static/underscore.js"></script>
  14. <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
  15. <script src="../_static/doctools.js"></script>
  16. <script src="../_static/sphinx_highlight.js"></script>
  17. <link rel="index" title="Index" href="../genindex.html" />
  18. <link rel="search" title="Search" href="../search.html" />
  19. <link rel="next" title="Preparation for offline engines" href="intro-offline.html" />
  20. <link rel="prev" title="Developing in Linux containers [202006]" href="lxcdev-202006.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="../genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="../py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="intro-offline.html" title="Preparation for offline engines"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="lxcdev-202006.html" title="Developing in Linux containers [202006]"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.1.0.tex)</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
  39. <li class="nav-item nav-item-this"><a href="">Limit access to your searx engines</a></li>
  40. </ul>
  41. </div>
  42. <div class="document">
  43. <div class="documentwrapper">
  44. <div class="bodywrapper">
  45. <div class="body" role="main">
  46. <section id="limit-access-to-your-searx-engines">
  47. <h1>Limit access to your searx engines<a class="headerlink" href="#limit-access-to-your-searx-engines" title="Permalink to this heading">¶</a></h1>
  48. <p>Administrators might find themselves wanting to limit access to some of the
  49. enabled engines on their instances. It might be because they do not want to
  50. expose some private information through an offline engine. Or they
  51. would rather share engines only with their trusted friends or colleagues.</p>
  52. <section id="private-engines">
  53. <span id="id1"></span><h2>Private engines<a class="headerlink" href="#private-engines" title="Permalink to this heading">¶</a></h2>
  54. <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>.
  55. A new option was added to engines named <cite>tokens</cite>. It expects a list
  56. of strings. If the user making a request presents one of the tokens
  57. of an engine, they can access information about the engine
  58. and make search requests.</p>
  59. <p>Example configuration to restrict access to the Arch Linux Wiki engine:</p>
  60. <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>
  61. <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>
  62. <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>
  63. <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">&#39;my-secret-token&#39;</span><span class="w"> </span><span class="p p-Indicator">]</span><span class="w"></span>
  64. </pre></div>
  65. </div>
  66. <p>Unless a user has configured the right token, the engine is going
  67. to be hidden from him/her. It is not going to be included in the
  68. list of engines on the Preferences page and in the output of
  69. <cite>/config</cite> REST API call.</p>
  70. <p>Tokens can be added to one’s configuration on the Preferences page
  71. under “Engine tokens”. The input expects a comma separated list of
  72. strings.</p>
  73. <p>The distribution of the tokens from the administrator to the users
  74. is not carved in stone. As providing access to such engines
  75. implies that the admin knows and trusts the user, we do not see
  76. necessary to come up with a strict process. Instead,
  77. we would like to add guidelines to the documentation of the feature.</p>
  78. </section>
  79. <section id="next-steps">
  80. <h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this heading">¶</a></h2>
  81. <p>Now that searx has support for both offline engines and private engines,
  82. it is possible to add concrete engines which benefit from these features.
  83. For example engines which search on the local host running the instance.
  84. Be it searching your file system or querying a private database. Be creative
  85. and come up with new solutions which fit your use case.</p>
  86. </section>
  87. <section id="acknowledgement">
  88. <h2>Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permalink to this heading">¶</a></h2>
  89. <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>
  90. <div class="line-block">
  91. <div class="line">Happy hacking.</div>
  92. <div class="line">kvch // 2020.02.28 22:26</div>
  93. </div>
  94. </section>
  95. </section>
  96. <div class="clearer"></div>
  97. </div>
  98. </div>
  99. </div>
  100. <span id="sidebar-top"></span>
  101. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  102. <div class="sphinxsidebarwrapper">
  103. <p class="logo"><a href="../index.html">
  104. <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
  105. </a></p>
  106. <h3>Project Links</h3>
  107. <ul>
  108. <li><a href="https://searx.github.io/searx/blog/index.html">Blog</a>
  109. <li><a href="https://github.com/searx/searx">Source</a>
  110. <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
  111. <li><a href="https://twitter.com/Searx_engine">Twitter</a>
  112. <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
  113. </ul><h3>Navigation</h3>
  114. <ul>
  115. <li><a href="../index.html">Overview</a>
  116. <ul>
  117. <li><a href="index.html">Blog</a>
  118. <ul>
  119. <li>Previous: <a href="lxcdev-202006.html" title="previous chapter">Developing in Linux containers [202006]</a>
  120. <li>Next: <a href="intro-offline.html" title="next chapter">Preparation for offline engines</a></ul>
  121. </li>
  122. </ul>
  123. </li>
  124. </ul>
  125. <div id="searchbox" style="display: none" role="search">
  126. <h3 id="searchlabel">Quick search</h3>
  127. <div class="searchformwrapper">
  128. <form class="search" action="../search.html" method="get">
  129. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  130. <input type="submit" value="Go" />
  131. </form>
  132. </div>
  133. </div>
  134. <script>document.getElementById('searchbox').style.display = "block"</script>
  135. </div>
  136. </div>
  137. <div class="clearer"></div>
  138. </div>
  139. <div class="footer" role="contentinfo">
  140. &#169; Copyright 2015-2022, Adam Tauber, Noémi Ványi.
  141. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  142. </div>
  143. <script src="../_static/version_warning_offset.js"></script>
  144. </body>
  145. </html>