Skip to content

Commit 5c2c72f

Browse files
committed
Regenerate docs
1 parent 6ba4603 commit 5c2c72f

14 files changed

+37
-96
lines changed

docs/aggregations.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
////
55
IMPORTANT NOTE
66
==============
7-
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/aggregations.asciidoc.
7+
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/6.x/src/Tests/Tests/aggregations.asciidoc.
88
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
99
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
1010
////

docs/breaking-changes.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
////
44
IMPORTANT NOTE
55
==============
6-
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/breaking-changes.asciidoc.
6+
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/6.x/src/Tests/Tests/breaking-changes.asciidoc.
77
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
88
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
99
////

docs/client-concepts/certificates/working-with-certificates.asciidoc

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ please modify the original csharp file found at the link and submit the PR with
1515
[[working-with-certificates]]
1616
=== Working with certificates
1717

18-
If you've enabled SSL on Elasticsearch with https://www.elastic.co/products/x-pack[X-Pack] or through a
18+
If you've enabled SSL on Elasticsearch with https://www.elastic.co/products/elastic-stack[Elastic Stack Security features], or through a
1919
proxy in front of Elasticsearch, and the Certificate Authority (CA)
20-
that generated the certificate is trusted by the machine running the client code, there should be nothing you'll have to do to talk
20+
that generated the certificate is trusted by the machine running the client code, there should be nothing for you to do to talk
2121
to the cluster over HTTPS with the client.
2222

23-
If you are using your own CA which is not trusted however, .NET won't allow you to make HTTPS calls to that endpoint by default. With .NET,
24-
you can pre-empt this though a custom validation callback on the global static
23+
If you are using your own CA which is not trusted however, .NET won't allow you to make HTTPS calls to that endpoint by default.
24+
With .NET Framework, you can pre-empt this though a custom validation callback on the global static
2525
`ServicePointManager.ServerCertificateValidationCallback`. Most examples you will find doing this this will simply return `true` from the
2626
validation callback and merrily whistle off into the sunset. **This is not advisable** as it allows *any* HTTPS traffic through in the
2727
current `AppDomain` *without* any validation. Here's a concrete example:
2828

29-
Imagine you deploy a web application that talks to Elasticsearch over HTTPS through NEST, and also uses some third party SOAP/WSDL endpoint;
30-
by setting
29+
Imagine you deploy a web application that talks to Elasticsearch over HTTPS using NEST, and also uses some third party SOAP/WSDL endpoint.
30+
By setting the following
3131

3232
[source,csharp]
3333
----
@@ -60,30 +60,9 @@ public class DenyAllCertificatesCluster : SslAndKpiXPackCluster
6060
.ServerCertificateValidationCallback(CertificateValidations.DenyAll); <1>
6161
}
6262
----
63-
<1> synonymous with the previous lambda expression
63+
<1> use a lambda expression or `CertificateValidations.DenyAll` to deny all validation
6464

65-
Or per request on `RequestConfiguration` which will take precedence over the ones defined on `ConnectionConfiguration`
66-
67-
==== Object Initializer syntax example
68-
69-
[source,csharp]
70-
----
71-
new RootNodeInfoRequest
72-
{
73-
RequestConfiguration = new RequestConfiguration
74-
{
75-
ClientCertificates = new X509Certificate2Collection { new X509Certificate2(this.Certificate) }
76-
}
77-
}
78-
----
79-
80-
==== Fluent DSL example
81-
82-
[source,csharp]
83-
----
84-
s => s
85-
.RequestConfiguration(r => r
86-
.ClientCertificate(this.Certificate)
87-
)
88-
----
65+
If you go for a vendor generated SSL certificate, it's common practice for the certificate to include the CA _and_ any intermediary CAs
66+
in the certificate chain. When using such a certificate, use `CertificateValidations.AuthorityPartOfChain` which validates that
67+
the local CA certificate is part of the chain that was used to generate the servers key.
8968

docs/client-concepts/connection/configuration-options.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Basic Authentication credentials to send with all requests to Elasticsearch
3232

3333
`ClientCertificate`::
3434

35-
Use a `X509Certificate` to authenticate all HTTP requests. You can also set them on individual request using `ClientCertificates`
35+
Use a `X509Certificate` to authenticate all HTTP requests. You can also set them on individual request using `ClientCertificates`
3636

3737
`ClientCertificate`::
3838

@@ -120,7 +120,7 @@ When not specified, defaults to `RequestTimeout` , which itself defaults to `60`
120120

121121
`NodePredicate`::
122122

123-
Register a predicate to select which nodes that you want to execute API calls on. Note that sniffing requests omit this predicate and always execute on all nodes. When using an `IConnectionPool` implementation that supports reseeding of nodes, this will default to omitting master only node from regular API calls. When using static or single node connection pooling it is assumed the list of node you instantiate the client with should be taken verbatim.
123+
Register a predicate to select which nodes that you want to execute API calls on. Note that sniffing requests omit this predicate and always execute on all nodes. When using an `IConnectionPool` implementation that supports reseeding of nodes, this will default to omitting master only node from regular API calls. When using static or single node connection pooling it is assumed the list of node you instantiate the client with should be taken verbatim.
124124

125125
`OnRequestCompleted`::
126126

@@ -158,7 +158,7 @@ Configure the client to skip deserialization of certain status codes e.g: you ru
158158

159159
`SniffLifeSpan`::
160160

161-
Set the duration after which a cluster state is considered stale and a sniff should be performed again. An `IConnectionPool` has to signal it supports reseeding, otherwise sniffing will never happen. Defaults to 1 hour. Set to null to disable completely. Sniffing will only ever happen on ConnectionPools that return true for SupportsReseeding
161+
Set the duration after which a cluster state is considered stale and a sniff should be performed again. An `IConnectionPool` has to signal it supports reseeding, otherwise sniffing will never happen. Defaults to 1 hour. Set to null to disable completely. Sniffing will only ever happen on ConnectionPools that return true for SupportsReseeding
162162

163163
`SniffOnConnectionFault`::
164164

docs/client-concepts/connection/modifying-default-connection.asciidoc

Lines changed: 12 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -114,66 +114,26 @@ to the request, change the maximum number of connections allowed to an endpoint,
114114
By deriving from `HttpConnection`, it is possible to change the behaviour of the connection. The following
115115
provides some examples
116116

117-
[[servicepoint-behaviour]]
118-
===== ServicePoint behaviour
117+
[[kerberos-authentication]]
118+
===== Kerberos Authentication
119119

120-
If you are running on the Desktop CLR you can override specific properties for the current `ServicePoint` easily
121-
by overriding `AlterServicePoint` on an `IConnection` implementation deriving from `HttpConnection`
120+
For a lot of use cases, deriving from `HttpConnection` is a great way to customize the connection for your needs.
121+
If you want to authenticate with Kerberos for example, creating a custom `HttpConnection` as follows
122+
allows you to set the right HTTP headers
122123

123-
[source,csharp]
124-
----
125-
public class MyCustomHttpConnection : HttpConnection
126-
{
127-
protected override void AlterServicePoint(ServicePoint requestServicePoint, RequestData requestData)
128-
{
129-
base.AlterServicePoint(requestServicePoint, requestData);
130-
requestServicePoint.ConnectionLimit = 10000;
131-
requestServicePoint.UseNagleAlgorithm = true;
132-
}
133-
}
134-
135-
var connection = new MyCustomHttpConnection();
136-
var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));
137-
var settings = new ConnectionSettings(connectionPool, connection);
138-
var client = new ElasticClient(settings);
139-
----
140-
141-
The Connection limit has been increased from the default 80 to much higher and
142-
https://en.wikipedia.org/wiki/Nagle's_algorithm[nagling] has been enabled, which is disabled by default in the client.
143-
144-
NOTE: The client reuses TCP connections through .NET's internal connection pooling,
145-
so changing the connection limit to something really high should only be done with careful
146-
consideration and testing. It's demonstrated here only as an example.
147-
148-
[[x509-certificates]]
149-
===== X.509 Certificates
150-
151-
It is possible to add X509 certificates to each request from the client by overriding the `CreateHttpWebRequest`
152-
method in an `IConnection` implementation deriving from `HttpConnection`
124+
TIP: use something like https://www.nuget.org/packages/Kerberos.NET/ to fill in the actual blanks of this implementation
153125

154126
[source,csharp]
155127
----
156-
public class X509CertificateHttpConnection : HttpConnection
128+
public class KerberosConnection : HttpConnection
157129
{
158-
protected override HttpWebRequest CreateHttpWebRequest(RequestData requestData)
130+
protected override HttpRequestMessage CreateRequestMessage(RequestData requestData)
159131
{
160-
var request = base.CreateHttpWebRequest(requestData);
161-
request.ClientCertificates.Add(new X509Certificate("file_path_to_cert"));
162-
return request;
132+
var message = base.CreateRequestMessage(requestData);
133+
var header = string.Empty;
134+
message.Headers.Authorization = new AuthenticationHeaderValue("Negotiate", header);
135+
return message;
163136
}
164137
}
165138
----
166139

167-
As before, a new instance of the custom connection is passed to `ConnectionSettings` in order to
168-
use
169-
170-
[source,csharp]
171-
----
172-
var connection = new X509CertificateHttpConnection();
173-
var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));
174-
var settings = new ConnectionSettings(connectionPool, connection);
175-
var client = new ElasticClient(settings);
176-
----
177-
178-
See <<working-with-certificates, Working with certificates>> for further details.
179-

docs/code-standards/naming-conventions.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ var elasticsearchNetAssembly = typeof(IElasticLowLevelClient).Assembly;
174174
175175
var exceptions = new List<Type>
176176
{
177+
elasticsearchNetAssembly.GetType("Microsoft.CodeAnalysis.EmbeddedAttribute"),
178+
elasticsearchNetAssembly.GetType("System.Runtime.CompilerServices.IsReadOnlyAttribute"),
177179
elasticsearchNetAssembly.GetType("System.AssemblyVersionInformation"),
178180
elasticsearchNetAssembly.GetType("System.FormattableString"),
179181
elasticsearchNetAssembly.GetType("System.Runtime.CompilerServices.FormattableStringFactory"),

docs/conventions.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
////
2121
IMPORTANT NOTE
2222
==============
23-
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/conventions.asciidoc.
23+
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/6.x/src/Tests/Tests/conventions.asciidoc.
2424
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
2525
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
2626
////

docs/high-level.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
////
77
IMPORTANT NOTE
88
==============
9-
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/high-level.asciidoc.
9+
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/6.x/src/Tests/Tests/high-level.asciidoc.
1010
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
1111
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
1212
////

docs/index.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
////
77
IMPORTANT NOTE
88
==============
9-
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/index.asciidoc.
9+
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/6.x/src/Tests/Tests/index.asciidoc.
1010
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
1111
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
1212
////

docs/intro.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////
66
IMPORTANT NOTE
77
==============
8-
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/intro.asciidoc.
8+
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/6.x/src/Tests/Tests/intro.asciidoc.
99
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
1010
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
1111
////

0 commit comments

Comments
 (0)