From 3d03fb305050a42661999b47597694616d532bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Fri, 28 Feb 2020 22:32:28 +0100 Subject: Add new post to blog about private engines --- docs/blog/index.rst | 1 + docs/blog/private-engines.rst | 63 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 docs/blog/private-engines.rst (limited to 'docs') diff --git a/docs/blog/index.rst b/docs/blog/index.rst index 52fa3f126..94847ad62 100644 --- a/docs/blog/index.rst +++ b/docs/blog/index.rst @@ -8,3 +8,4 @@ Blog python3 admin intro-offline + private-engines diff --git a/docs/blog/private-engines.rst b/docs/blog/private-engines.rst new file mode 100644 index 000000000..c26b3ed1c --- /dev/null +++ b/docs/blog/private-engines.rst @@ -0,0 +1,63 @@ +================================== +Limit access to your searx engines +================================== + +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. + +Private engines +=============== + +To solve this issue private engines were introduced in :pull:`1823`. +A new option was added to engines named `tokens`. It expects a list +of strings. If the user making a request presents one of the tokens +of an engine, he/she is able to access information about the engine +and make search requests. + +Example configuration to restrict access to the Arch Linux Wiki engine: + +.. code:: yaml + + - name : arch linux wiki + engine : archlinux + shortcut : al + tokens : [ 'my-secret-token' ] + + +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 +`/config` REST API call. + +Tokens can be added to one's configuration on the Preferences page +under "Engine tokens". The input expects a comma separated list of +strings. + +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. + +Next steps +========== + +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. + +Acknowledgement +=============== + +This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ . + +.. _Search and Discovery Fund: https://nlnet.nl/discovery +.. _NLnet Foundation: https://nlnet.nl/ + + +| Happy hacking. +| kvch // 2020.02.28 22:26 -- cgit v1.2.3 From e84fc94300750c41642bea97d2d9cc020f746c66 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 25 Mar 2020 11:51:03 +0100 Subject: [fix] brands: add variables from build env to sphinx-doc We have some variables in the build environment which are also needed in the sphinx-process. Theses variables are relavant if one creates a fork with its own branding. We treat these variables under the term 'brands'. Signed-off-by: Markus Heiser --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index ebcd102b2..03e977aba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,9 +4,9 @@ import sys, os from searx.version import VERSION_STRING from pallets_sphinx_themes import ProjectLink -GIT_URL = os.environ.get("GIT_URL", "https://github.com/asciimoo/searx") -SEARX_URL = os.environ.get("SEARX_URL", "https://searx.me") -DOCS_URL = os.environ.get("DOCS_URL", "https://asciimoo.github.io/searx/") +from searx.brand import GIT_URL +from searx.brand import SEARX_URL +from searx.brand import DOCS_URL # Project -------------------------------------------------------------- -- cgit v1.2.3 From 757ebb5d9fdc24757f199e52575f32f6faf091b3 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 25 Mar 2020 14:09:47 +0100 Subject: [fix] brands: add variables from build env to grunt process We have some variables in the build environment which are also needed in the grunt process when building themes. Theses variables are relavant if one creates a fork with its own branding. We treat these variables under the term 'brands'. Signed-off-by: Markus Heiser --- docs/dev/quickstart.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst index e40772b3b..cb079a753 100644 --- a/docs/dev/quickstart.rst +++ b/docs/dev/quickstart.rst @@ -87,8 +87,8 @@ After satisfying the requirements styles can be build using ``manage.sh`` ./manage.sh styles -How to build the source of the oscar theme -========================================== +How to build the source of the themes +===================================== .. _grunt: https://gruntjs.com/ @@ -104,7 +104,7 @@ After installing grunt, the files can be built using the following command: .. code:: sh - ./manage.sh grunt_build + make themes Tips for debugging/development -- cgit v1.2.3 From d471ec86dd72cfae80bdaf72b1ed266b1a8cada7 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 25 Mar 2020 16:38:52 +0100 Subject: Makefile: add target node.env - download & install npm dependencies Signed-off-by: Markus Heiser --- docs/dev/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst index cb079a753..a786eda63 100644 --- a/docs/dev/quickstart.rst +++ b/docs/dev/quickstart.rst @@ -98,7 +98,7 @@ NodeJS, so first Node has to be installed. .. code:: sh sudo -H apt-get install nodejs - sudo -H npm install -g grunt-cli + make node.env After installing grunt, the files can be built using the following command: -- cgit v1.2.3