Skip to content

Commit f430c15

Browse files
committed
[DOCS] Adds CA Fingerprint docs
1 parent bb7a545 commit f430c15

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/connecting.asciidoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,23 @@ Elasticsearch::Client.new(
124124
)
125125
------------------------------------
126126

127+
[discrete]
128+
[[ca-fingerprint]]
129+
==== CA fingerprint
130+
131+
You can configure the client to only trust certificates that are signed by a specific CA certificate (CA certificate pinning) by providing a `ca_fingerprint` option. This will verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied value:
132+
133+
[source,ruby]
134+
------------------------------------
135+
ca_fingerprint = '64F2593F...'
136+
client = Elasticsearch::Client.new(
137+
host: 'https://elastic:changeme@localhost:9200',
138+
transport_options: { ssl: { verify: false } },
139+
ca_fingerprint: ca_fingerprint
140+
)
141+
------------------------------------
142+
143+
The verification will be run once per connection.
127144

128145
[discrete]
129146
[[client-usage]]

0 commit comments

Comments
 (0)