You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
If I use this approach within my kubernetes cluster just to test connectivity, I can curl the Elastic service from my application's container. First, I have to export the tls cert and copy the cert into my container. Then I can curl the service (per the link above):
How can I now update my dotnet logger configuration to handle the new https, username:password, and cert requirements? I've tried the following without success:
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
The text was updated successfully, but these errors were encountered:
mschaefer-gresham
changed the title
How do I update Dotnet Serilog Loggin Config to Deal with new Elastic 8 security (https, username, password, tls cert)?
How do I update Dotnet Serilog Logging Config to Deal with new Elastic 8 security (https, username, password, tls cert)?
Dec 11, 2023
I solved this issue by grabbing the Elastic CA secret (name-es-http-ca-internal) out of Kubernetes and adding it to my ca-certificates.crt file in my applications docker file:
# add ca cert
COPY docker/ca-certs/elastic.crt /app/elastic.crt
RUN cat /app/elastic.crt >> /etc/ssl/certs/ca-certificates.crt
crtBytes above was obtained from the public crt secret value (name-es-http-certs-public)
I've upgraded to Elastic 8.x from 7.x. Now my elastic endpoint requires connecting using https with a username, password and a tls cert.
See examples here.
If I use this approach within my kubernetes cluster just to test connectivity, I can curl the Elastic service from my application's container. First, I have to export the tls cert and copy the cert into my container. Then I can curl the service (per the link above):
curl --cacert tls.crt -u elastic:password https://elasticsearch-cluster-es-http.eck:9200
How can I now update my dotnet logger configuration to handle the new https, username:password, and cert requirements? I've tried the following without success:
I see the following errors in my app:
dotnet 8
serilog.sinks.elasticsearch: 9.0.3
elasticsearch eck: 8.11.2
The text was updated successfully, but these errors were encountered: