private-engines.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .. _private engines:
  2. ============================
  3. Private Engines (``tokens``)
  4. ============================
  5. Administrators might find themselves wanting to limit access to some of the
  6. enabled engines on their instances. It might be because they do not want to
  7. expose some private information through :ref:`offline engines`. Or they would
  8. rather share engines only with their trusted friends or colleagues.
  9. To solve this issue the concept of *private engines* exists.
  10. A new option was added to engines named `tokens`. It expects a list of
  11. strings. If the user making a request presents one of the tokens of an engine,
  12. they can access information about the engine and make search requests.
  13. Example configuration to restrict access to the Arch Linux Wiki engine:
  14. .. code:: yaml
  15. - name: arch linux wiki
  16. engine: archlinux
  17. shortcut: al
  18. tokens: [ 'my-secret-token' ]
  19. Unless a user has configured the right token, the engine is going
  20. to be hidden from him/her. It is not going to be included in the
  21. list of engines on the Preferences page and in the output of
  22. `/config` REST API call.
  23. Tokens can be added to one's configuration on the Preferences page
  24. under "Engine tokens". The input expects a comma separated list of
  25. strings.
  26. The distribution of the tokens from the administrator to the users
  27. is not carved in stone. As providing access to such engines
  28. implies that the admin knows and trusts the user, we do not see
  29. necessary to come up with a strict process. Instead,
  30. we would like to add guidelines to the documentation of the feature.
  31. Acknowledgment
  32. ==============
  33. This development was sponsored by `Search and Discovery Fund
  34. <https://nlnet.nl/discovery>`_ of `NLnet Foundation <https://nlnet.nl/>`_.