...
Note: We have a dedicated page for more technical information on the aggregator.
Note |
---|
If you use Keycloak with the Search aggregator, go to this page : /wiki/spaces/DATAFARI/pages/1067712513 |
...
Enable/Disable results aggregation: Set to ‘On’ to dispatch search requests to external Datafari instances and aggregate results. Set to ‘Off’ to disable the requests dispatch (SearchProxy behavior). NOTE: This button must only be activated on the main search server, it must be set to OFF on all the external servers.
Renew ‘search-aggregator’ client’s password: As specified in the first section of this documentation, the SearchAggregator makes use of a client on the Search API to get access tokens. The client name is ‘search-aggregator’ and is hardcoded in Datafari (cannot be changed), but its secret password has to be generated at least one time. This button generates a new secret password for the search-aggregator client. Obvioulsy, this Renew button is to be used on the External Datafari servers. You will then insert this secret into the second part of this admin UI page (External Datafaris) presented further below.
Info |
---|
Use it only if you do not use an Identity Provider like Keycloak |
Note |
---|
The generated secret password is not saved in clear anywhere for security reasons ! Thus, once you click on the ‘renew’ button it will appear in clear just once so you will need to carefully keep it or you will need to renew it again ! |
...
Datafari name: The name you want to use to identify the external Datafari instance you are configuring (must be unique)
Search API URL: The URL of the Search API of the external Datafari instance. You MUST aim for the search API that disable the aggregator otherwise you will face two main problems in case the external Datafari has enabled the aggregator: first, the results of the external Datafari will contain results from other external Datafaris that should not be included, second, if the external Datafari is itself, then the request will end in an infinite loop !
In Datafari v5.4 upwards, the endpoint of the search API that does not trigger the aggregator in any case is/rest/v2.0/search/noaggregator
, so you MUST aim for the following URL: https://EXTERNAL_DATAFARI/Datafari/rest/v2.0/search/noaggregatorToken Request URL: The URL to request to get valid Oauth2 access tokens compatibles with the Search API.
If the external Datafari instance does not use an Identity Provider like Keycloak then the default URL is http://EXTERNAL_DATAFARI_HOST:PORT/Datafari/oauth/token
If the external Datafari instance uses an Identity Provider like Keycloak then you need to specify the URL of the Identity Provider that delivers access tokensPassword of ‘search-aggregator’ user: The secret password of the ‘search-aggregator’ client on the external Datafari instance (generated thanks to the ‘renew’ button but on the external Datafari instance)
Enabled: You can enable or disable the external Datafari to tell the SearchAggregator to either dispatch it or not the requests. It can be useful if for any reason the external Datafari instance is down or something.
...
If the path to the csv file is incorrect of the file is not readable, you should see an error message in the Datafari log
If the format of the file is incorrect, there is a great chance that no restriction will be applied to all users, although other behavior could be all users having access to only one external source or to nothing depending on the formatting error.
If the name of a user is not set correctly, no restriction will be applied to this user
If the name of an external Datafari for a user is not set properly, he won’t be able to access to the wrongly typed external source.
BE EXTREMELY CAREFUL WITH THE SPACES (see warning above)
...
Expand | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||
Note: We have a dedicated page for more technical information on the aggregator.
1. Configuration1.1 Admin UI for general parametersTo configure the SearchAggregator, a dedicated UI is available in the admin section of Datafari: 1.1.1 Activation and password:
1.1.2 Timeouts:
Once you set the wanted timeout, click on the ‘save’ button of this section 1.1.3 External Datafaris:In this section of the configuration, you can add or modify external Datafari instances which will receive dispatched requests from the SearchAggregator. To add a new external Datafari configuration, select “Add a new external Datafari configuration” in the dropdown list, to modify an existing one, select it in the dropdown list. Here is the description of the parameters:
Once you are done with the parameters, click on the ‘save’ button of this section.
1.1.4 Default DatafariIn this section of the configuration, you can select external Datafaris that will be used as the default, i.e. that will be used to perform the default search when landing on the search page. The dropdown only shows the external Datafari defined and activated. To add a Datafari to the list of default, select it in the dropdown and click on the save button. Note that if you remove or disable an external Datafari that is selected as default, it is removed from the list. The “Always use default” toggle switch allows you to choose between two behaviors for the default Datafaris when used together with user specific default Datafaris (explained below):
1.2 Configuring per user default Datafari and allowed remote Datafaris (requires terminal access to the Datafari web app server)It is possible to configure per user default and to restrict each user to access only to a subset of the defined external Datafaris. This section explains how to do this. 1.2.1 User specific default DatafariConfigurationTo set a default Datafari, you first need to build a csv file with the following format:
Where:
If there is an error in the name and / or the default Datafari name, the feature will not behave as expected. Then, you must drop the file on the Datafari web server and make it readable by the user running the Datafari web app (the user datafari by default). Once this is done, edit the file /opt/datafari/tomcat/conf/search-aggregator.properties (assuming a default installation), it should look something like the following:
Be careful to not modify anything except for the line “USERS_DEFAULT_SOURCE_FILE=” where you need to set the path to the file containing the default Datafari definitions (formatted as described above).
Once you saved this file, your user specific default Datafari is all setup and ready to work. No need to restart Datafari or anything, it should work right away.
Troubleshooting
1.2.2 Restrict user to a subset of external DatafarisYou can restrict for each user the set of external Datafaris it can search in.
Where:
Any external Datafari defined here is accessible to the corresponding user.
Then drop the file on the Datafari web app server and make it readable by the user running the Datafari webapp (user datafari by default). Once this is done, edit the file /opt/datafari/tomcat/conf/search-aggregator.properties (assuming a default installation), it should look something like the following:
Be careful to not modify anything except for the line “USERS_ALLOWED_SOURCES_FILE=” where you need to set the path to the file containing the list of Datafari servers available to each user (formatted as described above).
Once you saved this file, your user restrictions to external Datafaris is all setup and ready to work. No need to restart Datafari or anything, it should work right away.
Troubleshooting
|