File tree 1 file changed +26
-3
lines changed
1 file changed +26
-3
lines changed Original file line number Diff line number Diff line change 157
157
}
158
158
end
159
159
it_behaves_like ( "an indexer" , true )
160
-
161
- describe "with a password requiring escaping" do
160
+
161
+ context 'with enforced TLSv1.3 protocol' do
162
+ let ( :config ) { super ( ) . merge 'ssl_enabled_protocols' => [ 'TLSv1.3' ] }
163
+
164
+ it_behaves_like ( "an indexer" , true )
165
+ end
166
+
167
+ context 'with enforced TLSv1.2 protocol (while ES only enabled TLSv1.3)' do
168
+ let ( :config ) { super ( ) . merge 'ssl_enabled_protocols' => [ 'TLSv1.2' ] }
169
+
170
+ it "does not ship events" do
171
+ subject . multi_receive ( events )
172
+
173
+ http_client . post ( "#{ es_url } /_refresh" ) . call
174
+
175
+ response = http_client . get ( "#{ index_url } /_count?q=*" )
176
+ result = LogStash ::Json . load ( response . body )
177
+ cur_count = result [ "count" ]
178
+ expect ( cur_count ) . to eq ( 0 ) # ES output keeps re-trying but ends up with a
179
+ # [Manticore::ClientProtocolException] Received fatal alert: protocol_version
180
+ end
181
+
182
+ end if ENV [ 'ES_SSL_SUPPORTED_PROTOCOLS' ] == 'TLSv1.3'
183
+
184
+ context "with a password requiring escaping" do
162
185
let ( :user ) { "f@ncyuser" }
163
186
let ( :password ) { "ab%12#" }
164
187
165
188
include_examples ( "an indexer" , true )
166
189
end
167
190
168
- describe "with a user/password requiring escaping in the URL" do
191
+ context "with a user/password requiring escaping in the URL" do
169
192
let ( :config ) do
170
193
{
171
194
"hosts" => [ "https://#{ CGI . escape ( user ) } :#{ CGI . escape ( password ) } @elasticsearch:9200" ] ,
You can’t perform that action at this time.
0 commit comments