private-engines.rst 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ==================================
  2. Limit access to your searx engines
  3. ==================================
  4. Administrators might find themselves wanting to limit access to some of the
  5. enabled engines on their instances. It might be because they do not want to
  6. expose some private information through an offline engine. Or they
  7. would rather share engines only with their trusted friends or colleagues.
  8. Private engines
  9. ===============
  10. To solve this issue private engines were introduced in :pull:`1823`.
  11. A new option was added to engines named `tokens`. It expects a list
  12. of strings. If the user making a request presents one of the tokens
  13. of an engine, he/she is able to access information about the engine
  14. and make search requests.
  15. Example configuration to restrict access to the Arch Linux Wiki engine:
  16. .. code:: yaml
  17. - name : arch linux wiki
  18. engine : archlinux
  19. shortcut : al
  20. tokens : [ 'my-secret-token' ]
  21. Unless a user has configured the right token, the engine is going
  22. to be hidden from him/her. It is not going to be included in the
  23. list of engines on the Preferences page and in the output of
  24. `/config` REST API call.
  25. Tokens can be added to one's configuration on the Preferences page
  26. under "Engine tokens". The input expects a comma separated list of
  27. strings.
  28. The distribution of the tokens from the administrator to the users
  29. is not carved in stone. As providing access to such engines
  30. implies that the admin knows and trusts the user, we do not see
  31. necessary to come up with a strict process. Instead,
  32. we would like to add guidelines to the documentation of the feature.
  33. Next steps
  34. ==========
  35. Now that searx has support for both offline engines and private engines,
  36. it is possible to add concrete engines which benefit from these features.
  37. For example engines which search on the local host running the instance.
  38. Be it searching your file system or querying a private database. Be creative
  39. and come up with new solutions which fit your use case.
  40. Acknowledgement
  41. ===============
  42. This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
  43. .. _Search and Discovery Fund: https://nlnet.nl/discovery
  44. .. _NLnet Foundation: https://nlnet.nl/
  45. | Happy hacking.
  46. | kvch // 2020.02.28 22:26