Is there any way to make `Serilog.Sinks.Elasticsearch` work with `ApiKeyAuthentication`?

93 views Asked by At

I tried to make Serilog.Sinks.Elasticsearch work with ApiKeyAuthentication, however, it only worked with BasicAuthentication.

I tried with two overloads of the ApiKeyAuthentication method:

  • ApiKeyAuthentication(ApiKeyAuthenticationCredentials credentials)
  • ApiKeyAuthentication(string id, string apiKey)

but the sink doesn't work with ApiKeyAuthentication. enter image description here

However, when I use the BasicAuthentication(string username, string password) it works well.

I know that I need to use an apikey with index create e index pattern create authorization, so I created an apikey with these roles and beyond but still doesn't work.

Also, all the examples I found use BasicAuthentication.

Has anyone managed to make this sink work with apikey authentication?

0

There are 0 answers