Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add elasticsearch connector plugin #189

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Add elasticsearch connector plugin #189

merged 3 commits into from
Nov 21, 2024

Conversation

hyrsky
Copy link
Contributor

@hyrsky hyrsky commented Nov 20, 2024

Related to https://helsinkisolutionoffice.atlassian.net/browse/UHF-10549.

Service addresses use self signed sertificate. To use them, we need to configure elasticsearch_connector module such that it accepts these sertificates.

How to test:

Run: composer require drupal/helfi_api_base:dev-UHF-10990.

In infofinland, add

$config['search_api.server.default']['backend_config']['connector'] = 'basicauth';
$config['search_api.server.default']['backend_config']['connector_config']['url'] = 'https://self-signed.badssl.com/';
$config['search_api.server.default']['backend_config']['connector_config']['username'] = '123';
$config['search_api.server.default']['backend_config']['connector_config']['password'] = '456';

to local.settings.php.

https://drupal-infofinland.docker.so/admin/config/search/search-api/server/default should die to certificate errors.

Change to

$config['search_api.server.default']['backend_config']['connector'] = 'helfi_connector';
$config['search_api.server.default']['backend_config']['connector_config']['url'] = 'https://self-signed.badssl.com/';
$config['search_api.server.default']['backend_config']['connector_config']['username'] = '123';
$config['search_api.server.default']['backend_config']['connector_config']['password'] = '456';

https://drupal-infofinland.docker.so/admin/config/search/search-api/server/default should not die. Should give error "The ElasticSearch cluster could not be reached. Further data is therefore unavailable." because 'https://self-signed.badssl.com/' is not elasticsearch server.

@hyrsky hyrsky force-pushed the UHF-10990 branch 2 times, most recently from 62e9042 to 5324788 Compare November 20, 2024 17:07
@hyrsky hyrsky changed the title Add HelfiConnector plugin Add elasticsearch connector plugin Nov 20, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.14%. Comparing base (bfada1e) to head (343f0eb).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #189      +/-   ##
============================================
+ Coverage     89.11%   89.14%   +0.03%     
- Complexity      522      523       +1     
============================================
  Files            77       78       +1     
  Lines          2085     2091       +6     
============================================
+ Hits           1858     1864       +6     
  Misses          227      227              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@hyrsky hyrsky marked this pull request as ready for review November 21, 2024 07:19
@hyrsky hyrsky marked this pull request as draft November 21, 2024 08:42
@hyrsky hyrsky marked this pull request as ready for review November 21, 2024 10:32
Copy link

sonarcloud bot commented Nov 21, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants