elasticsearch-net-aws icon indicating copy to clipboard operation
elasticsearch-net-aws copied to clipboard

Just updating from Elasticsearch.Net.Aws 7.2.1 to 7.2.2, causes 403 from AWS OpenSearch cluster

Open lorenh opened this issue 2 years ago • 6 comments

Just updating from Elasticsearch.Net.Aws 7.2.1 to 7.2.2 and we start receiving a 403 from our AWS OpenSearch cluster (running in elastisearch compatibility mode)

Elasticsearch.Net.ElasticsearchClientException: The remote server returned an error: (403) Forbidden. Call: Status code 403

Reverting to 7.2.1, and it starts working again. Any idea what could be going on?

lorenh avatar Mar 21 '23 21:03 lorenh

That's odd. Nothing changed related to signing. Here's the diff for 7.2.1 -> 7.2.2

https://github.com/bcuff/elasticsearch-net-aws/commit/1c71ad16e7aacddb43903cfae87197d45c624473

bcuff avatar Mar 21 '23 21:03 bcuff

That is strange. This happens to be running under an older WebAPI REST service with TargetFrameworkVersion=v4.7.2, I wonder if the framework target changes altered something? That and Newtonsoft is about it... really weird.

lorenh avatar Mar 22 '23 16:03 lorenh

Did the endpoint change? There's another reported issue related to the URL changing due to the open search service domain changing.

If it's not that, it could be .NET Framework. There are a few weird things the Uri class does to change certain characters. I've run into that in the past. My memory is fuzzy on exactly what the issue was around that though.

bcuff avatar Mar 22 '23 17:03 bcuff

To isolate the problem, the only thing I did was update this one single NuGet package 7.2.1 -> 7.2.2 and it broke, then rolled back to 7.2.1 and it started working (no changes to our AWS-side at all). I went back and forth a few times to make sure I was seeing it right. As a workaround for now we'll have to stick with Elasticsearch.Net.Aws 7.2.1 and just remember we can't update it, but I thought I'd ask to see what could be going on. Very strange indeed.

lorenh avatar Mar 23 '23 14:03 lorenh

Definitely strange. Maybe it was the target framework change from 461 to 481?

https://github.com/bcuff/elasticsearch-net-aws/commit/1c71ad16e7aacddb43903cfae87197d45c624473#diff-3625fd895652561b68373f0741d92727c2e6b1cc8302e8e4cda724e71e7d2536L4

That line is the only thing that changed in the released package. The rest of the changes were to tests.

bcuff avatar Mar 23 '23 15:03 bcuff

We are experiencing this issue as well. Downgrading to 7.2.1 worked.

mattbeatty avatar Jun 07 '23 17:06 mattbeatty