@@ -70,7 +70,7 @@ def docker_compose_up(env={}) = docker_compose_invoke("up --detach", env)
7070
7171 def docker_compose_down ( env = { } ) = docker_compose_invoke ( "down --volumes" , env )
7272
73- context "when running with FIPS-compliant configuration" do
73+ context "when running LS to ES with FIPS-compliant configuration" do
7474 before ( :all ) do
7575 docker_compose_up
7676 wait_for_elasticsearch
@@ -98,7 +98,7 @@ def docker_compose_down(env={}) = docker_compose_invoke("down --volumes", env)
9898 end
9999 end
100100
101- context "when running with non-FIPS compliant configuration" do
101+ context "when running LS to ES with non-FIPS compliant configuration" do
102102 before ( :all ) do
103103 docker_compose_up ( { "LOGSTASH_PIPELINE" => "logstash-to-elasticsearch-weak.conf" } )
104104 wait_for_elasticsearch
@@ -127,7 +127,7 @@ def docker_compose_down(env={}) = docker_compose_invoke("down --volumes", env)
127127 end
128128 end
129129
130- context "When running in a FIPS compliant configuration" do
130+ context "When running Filebeat through LS to ES in a FIPS compliant configuration" do
131131 before ( :all ) do
132132 docker_compose_up ( { "LOGSTASH_PIPELINE" => "filebeat-to-ls-to-es.conf" } )
133133 wait_for_elasticsearch
@@ -154,4 +154,33 @@ def docker_compose_down(env={}) = docker_compose_invoke("down --volumes", env)
154154 expect ( result [ "hits" ] [ "hits" ] . first [ "_source" ] [ "tags" ] ) . to include ( "filebeat" )
155155 end
156156 end
157+
158+ context "when running Filebeat through LS to ES with non-FIPS compliant configuration" do
159+ before ( :all ) do
160+ docker_compose_up ( { "LOGSTASH_PIPELINE" => "filebeat-to-ls-weak.conf" } )
161+ wait_for_elasticsearch
162+ end
163+
164+ after ( :all ) do
165+ docker_compose_down
166+ end
167+
168+ it "prevents data flow when using TLSv1.1 which is not FIPS-compliant" do
169+ # Allow time for Logstash to attempt connections (and fail)
170+ sleep 15
171+
172+ # Verify that no index has been created that would indicate successful data flow
173+ response = es_request ( "/_cat/indices?v" )
174+ today_pattern = "filebeat-weak-ssl-test"
175+ expect ( response . body ) . not_to include ( today_pattern )
176+
177+ # Check logs for the specific BouncyCastle FIPS error we expect
178+ logs = `docker logs fips_test_logstash 2>&1`
179+
180+ # Verify the logs contain the FIPS-mode TLS protocol error
181+ expect ( logs ) . to include ( "No usable protocols enabled" )
182+ expect ( logs ) . to include ( "IllegalStateException" )
183+ expect ( logs ) . to include ( "org.bouncycastle" )
184+ end
185+ end
157186end
0 commit comments