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
* If you've enabled SSL on elasticsearch with x-pack or through a proxy in front of elasticsearch and the Certificate Authority (CA)
19
+
* If you've enabled SSL on Elasticsearch with x-pack or through a proxy in front of elasticsearch and the Certificate Authority (CA)
20
20
* That generated the certificate is trusted by the machine running the client code there should be nothing you'll have to do to to talk
21
21
* to over https with the client. If you are using your own CA which is not trusted .NET won't allow you to make https calls to that endpoint.
22
22
*
23
-
* .NET allows you to preempt this though through a custom validation through the the global static `ServicePointManager.ServerCertificateValidationCallback`.
23
+
* In .NET, you can preempt this though through a custom validation through the the global static `ServicePointManager.ServerCertificateValidationCallback`.
24
24
* Most examples you will find on the .NET will simply return `true` from this delegate and call it quits. This is not advisable as this will allow any HTTPS
25
25
* traffic in the current AppDomain and not run any validations. Imagine you deploy a web app that talks to Elasticsearch over HTTPS but also some third party
26
-
* SOAP/WSDL endpoint setting `ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, errors) => true;` will skip validation of BOTH
27
-
* Elasticsearch and that external web service.
28
-
29
-
* .NET also allows you to set that callback per service endpoint and Elasticsearch.NET/NEST exposes this through connection settings.
30
-
* You can do your own validation in that handler or simply assign baked in handler that we ship with out of the box on the static
* If your client application however has access to the public CA certificate locally Elasticsearch.NET/NEST ships with handy helpers that assert
71
-
* that the certificate that the server presented was one that came from our local CA certificate. If you use x-pack's `certgen` tool to
72
-
* [generate SSL certificates](https://www.elastic.co/guide/en/x-pack/current/ssl-tls.html) the generated node certificate does not include the CA in the
77
+
/**
78
+
* If your client application however has access to the public CA certificate locally, Elasticsearch.NET/NEST ships with handy helpers that assert
79
+
* that the certificate that the server presented was one that came from our local CA certificate. If you use X-Pack's `certgen` tool to
80
+
* {xpack_current}/ssl-tls.html[generate SSL certificates], the generated node certificate does not include the CA in the
73
81
* certificate chain. This to cut back on SSL handshake size. In those case you can use `CertificateValidations.AuthorityIsRoot` and pass it your local copy
74
82
* of the CA public key to assert that the certificate the server presented was generated off that.
* If you go for a vendor generated SSL certificate its common practice for them to include the CA and any intermediary CA's in the certificate chain
119
127
* in those case use `CertificateValidations.AuthorityPartOfChain` which validates that the local CA certificate is part of that chain and was used to
120
128
* generate the servers key.
121
129
*/
122
130
123
131
#if !DOTNETCORE
124
-
/**
132
+
/**
125
133
* === Client Certificates
126
-
* X-Pack also allows you to configure a [PKI realm](https://www.elastic.co/guide/en/x-pack/current/pki-realm.html) to enable user authentication
134
+
*
135
+
* X-Pack also allows you to configure a {xpack_current}/pki-realm.html[PKI realm] to enable user authentication
127
136
* through client certificates. The `certgen` tool included with X-Pack allows you to
128
-
* [generate client certificates as well](https://www.elastic.co/guide/en/x-pack/current/ssl-tls.html#CO13-4) and assign the distinguished name (DN) of the
137
+
* {xpack_current}/ssl-tls.html#CO13-4[generate client certificates as well] and assign the distinguished name (DN) of the
129
138
* certificate as a user with a certain role.
130
139
*
131
140
* certgen by default only generates a public certificate (`.cer`) and a private key `.key`. To authenticate with client certificates you need to present both
0 commit comments