diff --git a/docs/changelog/115510.yaml b/docs/changelog/115510.yaml new file mode 100644 index 0000000000000..1e71270e18f97 --- /dev/null +++ b/docs/changelog/115510.yaml @@ -0,0 +1,6 @@ +pr: 115510 +summary: Fix lingering license warning header in IP filter +area: License +type: bug +issues: + - 114865 diff --git a/muted-tests.yml b/muted-tests.yml index bea1df99d94c0..e237f8e5346ac 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -330,8 +330,6 @@ tests: - class: org.elasticsearch.xpack.rank.rrf.RRFRankClientYamlTestSuiteIT method: test {yaml=rrf/800_rrf_with_text_similarity_reranker_retriever/explain using rrf retriever and text-similarity} issue: https://github.com/elastic/elasticsearch/issues/114757 -- class: org.elasticsearch.license.LicensingTests - issue: https://github.com/elastic/elasticsearch/issues/114865 - class: org.elasticsearch.xpack.security.authc.ldap.GroupMappingIT issue: https://github.com/elastic/elasticsearch/issues/115221 - class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT @@ -395,4 +393,4 @@ tests: # issue: "https://github.com/elastic/elasticsearch/..." # - class: "org.elasticsearch.xpack.esql.**" # method: "test {union_types.MultiIndexIpStringStatsInline *}" -# issue: "https://github.com/elastic/elasticsearch/..." +# issue: "https://github.com/elastic/elasticsearch/..." \ No newline at end of file diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/license/LicensingTests.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/license/LicensingTests.java index 42b807b5f045b..3a9194ee2eac1 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/license/LicensingTests.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/license/LicensingTests.java @@ -41,6 +41,7 @@ import org.elasticsearch.xpack.security.LocalStateSecurity; import org.hamcrest.Matchers; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import java.nio.file.Files; @@ -241,6 +242,7 @@ public void testNoWarningHeaderWhenAuthenticationFailed() throws Exception { Header[] headers = null; try { getRestClient().performRequest(request); + Assert.fail("expected response exception"); } catch (ResponseException e) { headers = e.getResponse().getHeaders(); List afterWarningHeaders = getWarningHeaders(headers); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java index 9a3c9c847d131..55a3dbcdfde95 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java @@ -10,6 +10,7 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.handler.ipfilter.AbstractRemoteAddressFilter; +import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.xpack.security.transport.filter.IPFilter; import java.net.InetSocketAddress; @@ -19,16 +20,21 @@ class IpFilterRemoteAddressFilter extends AbstractRemoteAddressFilter