Trouble authenticating with API Keys and the .Net Client Elasticsearch.Extensions.Logging

Hi,

I'm having a hard time getting log data from an aspnet core application into an elastic cloud instance. I created an API Key in Kibana and passed the Base64 encoded variant of the API Key and the Cloud ID to the .AddElasticCloud method.

Since neither logs appeared in ES nor any error is displayed in the aspnet core application, I used fiddler to debug the issue. It shows the error "missing authentication credentials for REST request" and returns a 401 error.

I'd be glad for any hints!

Best regards, Andreas

Hi @ajuch,

This looks like a bug; Elastic.Transport is incorrectly sending the Bearer scheme when the scheme should be ApiKey

I'll open an issue for this. In the meantime, as a workaround, you'd be able to username and password with the logging extension.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.