- Issue created by @vijaycs85
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Thanks for reporting @vijaycs85
Can you please confirm the versions of
search_api_opensearch
andopensearch-project/opensearch-php
you are using? - π¬π§United Kingdom vijaycs85 London, UK
Can you please confirm the versions of search_api_opensearch and opensearch-project/opensearch-php you are using?
drupal/search_api_opensearch: 2.x-dev opensearch-project/opensearch-php: 2.4.2
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I think this is due to not checking for empty strings when passing the credentials options.
I'm going to postpone this one on π Use \OpenSearch\Aws\SigningClientFactory Active which changes how we create the signing client.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
@vijaycs85 would be great if you could test out π Use \OpenSearch\Aws\SigningClientFactory Active and see if it fixes your issues before we commit it.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
π Use \OpenSearch\Aws\SigningClientFactory Active is in so this is unblocked.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I think this was fixed in π Use \OpenSearch\Aws\SigningClientFactory Active with this code:
// Set credentials if provided, otherwise fall back to defaults. if ('' !== $this->configuration['api_key'] && '' !== $this->configuration['api_secret']) { $options['auth_aws']['credentials'] = [ 'access_key' => $this->configuration['api_key'], 'secret_key' => $this->configuration['api_secret'], ]; }
Because this uses logic in the library, we can only check to see if the 'credentials' array key gets set. See https://github.com/opensearch-project/opensearch-php/blob/main/src/OpenS...
// Check for provided access key and secret. if (isset($options['credentials'])) { return CredentialProvider::fromCredentials( new Credentials( $options['credentials']['access_key'] ?? '', $options['credentials']['secret_key'] ?? '', $options['credentials']['session_token'] ?? null, ) ); } // Fallback to the default provider. return CredentialProvider::defaultProvider();
Are you able to manually test this now? If there are issues with the opensearch-php library, feel free to create an issue there too.