Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Jetty12 + EE10 #2876

Draft
wants to merge 69 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
d1c5e55
Remove the hadoop-auth module from source
epugh Nov 2, 2024
af5a296
Remove build tooling integrations
epugh Nov 2, 2024
9b533ed
Remove from login screen.
epugh Nov 2, 2024
480f8f7
First path of removing related docs
epugh Nov 2, 2024
b5e6cff
Missed this core file
epugh Nov 2, 2024
72f4457
Light edits to get ref guide build to pass
epugh Nov 2, 2024
a86505e
Remove hadoop version
epugh Nov 2, 2024
b46987f
Precommit told me to regenerate versions.lock after removing hadoop-auth
epugh Nov 2, 2024
b7e33ca
Post 'checkUnusedConstraints' step
epugh Nov 2, 2024
e6ca759
Post updateLicenses step
epugh Nov 2, 2024
4bf733b
Remove no longer required libraries.
epugh Nov 2, 2024
9569b95
Respond to feedback
epugh Nov 5, 2024
fb3a0e0
One last eradication
epugh Nov 5, 2024
83a5d05
Proper way to change htaccess.
epugh Nov 5, 2024
760b0c9
Respond to warning from build
epugh Nov 6, 2024
029dc5b
Restore some permissions that are used by the HDFS module
epugh Nov 6, 2024
a2cba05
Back out change, we have another JIRA to cover this work.
epugh Nov 6, 2024
90316c3
Format fix
epugh Nov 6, 2024
59e28b0
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 16, 2024
d8fd76d
update from main
epugh Nov 16, 2024
0ce563e
Merge remote-tracking branch 'apache/main' into fork/epugh/SOLR-17540
malliaridis Nov 16, 2024
1b8894e
Update locks and sync commons-text version downgrade
malliaridis Nov 16, 2024
70754d8
Remove unused dependencies from catalogs
malliaridis Nov 16, 2024
4409b27
Jetty12 + EE8 \u1F680
iamsanjay Nov 19, 2024
336f0d3
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 20, 2024
0189004
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 21, 2024
d8b3d00
Strip out kerberous support in Auth tool.
epugh Nov 22, 2024
90853fc
Update Jetty deps for s3mock
iamsanjay Nov 22, 2024
a718562
Merge branch 'main' into jetty12_ee8
iamsanjay Nov 22, 2024
9f8f9c5
Strip kerberos out of the hdfs module
epugh Nov 22, 2024
fd24abc
Remove Kerberos specific functions from HttpSolrClient
epugh Nov 22, 2024
30f4bd6
Doc cleanups
epugh Nov 22, 2024
5e1bc75
add missing licenses
iamsanjay Nov 22, 2024
dbc0a08
adding permissions to solr test policy
iamsanjay Nov 22, 2024
930d17f
Strip out Kerberos
epugh Nov 22, 2024
a3a8acc
useShortName was only implemented in Kerberos, so remove it.
epugh Nov 22, 2024
3ed7ddf
No longer support Kerberos for Solr on HDFS
epugh Nov 22, 2024
b42274e
Track that Kerberos has been removed
epugh Nov 23, 2024
7de517b
Align changes to both files to reflect each other.
epugh Nov 24, 2024
66d5d1d
Revert "No longer support Kerberos for Solr on HDFS"
epugh Nov 24, 2024
716ee09
restore removed docs that are still relevant
epugh Nov 24, 2024
5425d73
Restore permissions needed by hdfs and crossdc
epugh Nov 24, 2024
a1e67bc
Fix TestHttpServletRequestGetter
iamsanjay Nov 25, 2024
d3594a4
tidy
iamsanjay Nov 25, 2024
7bd7259
jetty xml changes
iamsanjay Nov 25, 2024
31e58a1
versions.lock updated
iamsanjay Nov 25, 2024
dfe667f
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 27, 2024
a20d775
Simplify method signature
epugh Nov 27, 2024
69d5831
Update major-changes-in-solr-10.adoc
epugh Nov 27, 2024
6ca7d16
Track changes
epugh Nov 27, 2024
e3f30c6
Set DefaultSessionIdManager on Server
iamsanjay Nov 28, 2024
1413157
Merge branch 'main' into jetty12_ee8
iamsanjay Nov 28, 2024
9634c1c
removed extra logging annotation
iamsanjay Nov 28, 2024
fa2c41e
workaround for removing headers
iamsanjay Nov 28, 2024
8ba85f5
Backout changes to HDFS and kerberos security.
epugh Nov 30, 2024
52adc6f
Update usage to reflect Kerberos being gone.
epugh Dec 1, 2024
d4a905d
Attempt to clarify why we mention Kerberos and Hadoop Auth in comments
epugh Dec 2, 2024
ea09711
Remove dead logic. Tested locally using basic auth.
epugh Dec 2, 2024
bc20356
Highlight why we mention Kerberos....
epugh Dec 2, 2024
f0cfc42
merge
iamsanjay Dec 6, 2024
60308aa
adding versions.lock
iamsanjay Dec 6, 2024
35acabe
versions.lock
iamsanjay Dec 6, 2024
894b52f
ee10 switch
iamsanjay Dec 8, 2024
72c9cf9
Fix a metric test
iamsanjay Dec 9, 2024
be9b7fb
Merge main
iamsanjay Dec 9, 2024
62e1249
Fix JettyWebappTest
iamsanjay Dec 9, 2024
8fb561f
Merge main
iamsanjay Dec 10, 2024
c3c2f1c
Merge remove hadoop-auth changes
iamsanjay Dec 10, 2024
f7d900b
Upgrade to EE10
iamsanjay Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 27 additions & 17 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
[versions]
adobe-testing-s3mock = "2.17.0"
amazon-awssdk = "2.26.19"
adobe-testing-s3mock = "3.9.1"
amazon-awssdk = "2.28.11"
# @keep Antora version used in ref-guide
antora = "3.1.4"
# @keep Most recent commit as of 2022-06-24, this repo does not have tags
Expand Down Expand Up @@ -81,8 +81,9 @@ cybozulabs-langdetect = "1.1-20120112"
diffplug-spotless = "6.5.2"
dropwizard-metrics = "4.2.26"
eclipse-ecj = "3.39.0"
eclipse-jetty = "10.0.22"
eclipse-jettytoolchain = "4.0.6"
# eclipse-jetty = "10.0.22"
eclipse-jetty = "12.0.10"
eclipse-jettytoolchain = "5.0.2"
# @keep jgit version used by git-status.gradle
eclipse-jgit = "6.7.0.202309050840-r"
fasterxml = "2.18.0"
Expand Down Expand Up @@ -125,6 +126,7 @@ immutables-valueannotations = "2.10.1"
j256-simplemagic = "1.17"
jakarta-annotation = "2.1.1"
jakarta-inject = "2.0.1"
jakarta-servlet = "6.0.0"
jakarta-ws = "3.1.0"
# @keep This is the minimum required Java version for the project.
java-min = "21"
Expand All @@ -137,7 +139,7 @@ jayway-jsonpath = "2.9.0"
jctools = "4.0.5"
jersey = "3.1.9"
# TODO Sync with jersey versions
jersey-containers = "2.39.1"
jersey-containers = "3.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go with jersey version 3.1.9 if possible, so that we can remove this entry completely (see line above).

# @keep for version alignment
joda-time = "2.8.1"
junit = "4.13.2"
Expand Down Expand Up @@ -288,7 +290,7 @@ bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk18on", version.ref
carrot2-core = { module = "org.carrot2:carrot2-core", version.ref = "carrot2-core" }
carrotsearch-hppc = { module = "com.carrotsearch:hppc", version.ref = "carrotsearch-hppc" }
carrotsearch-randomizedtesting-runner = { module = "com.carrotsearch.randomizedtesting:randomizedtesting-runner", version.ref = "carrotsearch-randomizedtesting" }
# @keep transitive dependency for version alignment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why this changed

# @keep transitive depenxdency for version alignment
checkerframework-qual = { module = "org.checkerframework:checker-qual", version.ref = "checkerframework" }
codehaus-woodstox-stax2api = { module = "org.codehaus.woodstox:stax2-api", version.ref = "codehaus-woodstox" }
commonscli-commonscli = { module = "commons-cli:commons-cli", version.ref = "commons-cli" }
Expand All @@ -298,33 +300,40 @@ commonsio-commonsio = { module = "commons-io:commons-io", version.ref = "commons
cybozulabs-langdetect = { module = "com.cybozu.labs:langdetect", version.ref = "cybozulabs-langdetect" }
dropwizard-metrics-core = { module = "io.dropwizard.metrics:metrics-core", version.ref = "dropwizard-metrics" }
dropwizard-metrics-graphite = { module = "io.dropwizard.metrics:metrics-graphite", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jetty10 = { module = "io.dropwizard.metrics:metrics-jetty10", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jetty12 = { module = "io.dropwizard.metrics:metrics-jetty12", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jetty12-ee10 = { module = "io.dropwizard.metrics:metrics-jetty12-ee10", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jmx = { module = "io.dropwizard.metrics:metrics-jmx", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jvm = { module = "io.dropwizard.metrics:metrics-jvm", version.ref = "dropwizard-metrics" }
dropwizard-metrics-servlets = { module = "io.dropwizard.metrics:metrics-servlets", version.ref = "dropwizard-metrics" }
dropwizard-metrics-servlets = { module = "io.dropwizard.metrics:metrics-jakarta-servlets", version.ref = "dropwizard-metrics" }
eclipse-jdt-ecj = { module = "org.eclipse.jdt:ecj", version.ref = "eclipse-ecj" }
eclipse-jetty-alpnjavaclient = { module = "org.eclipse.jetty:jetty-alpn-java-client", version.ref = "eclipse-jetty" }
eclipse-jetty-alpnjavaserver = { module = "org.eclipse.jetty:jetty-alpn-java-server", version.ref = "eclipse-jetty" }
eclipse-jetty-alpnserver = { module = "org.eclipse.jetty:jetty-alpn-server", version.ref = "eclipse-jetty" }
eclipse-jetty-client = { module = "org.eclipse.jetty:jetty-client", version.ref = "eclipse-jetty" }
eclipse-jetty-deploy = { module = "org.eclipse.jetty:jetty-deploy", version.ref = "eclipse-jetty" }
eclipse-jetty-ee = { module = "org.eclipse.jetty:jetty-ee", version.ref = "eclipse-jetty" }
# clipse-jetty-ee10-nested = { module = "org.eclipse.jetty.ee10:jetty-ee10-nested", version.ref = "eclipse-jetty" }
eclipse-jetty-ee10-servlet = { module = "org.eclipse.jetty.ee10:jetty-ee10-servlet", version.ref = "eclipse-jetty" }
eclipse-jetty-ee10-servlets = { module = "org.eclipse.jetty.ee10:jetty-ee10-servlets", version.ref = "eclipse-jetty" }
eclipse-jetty-ee10-webapp = { module = "org.eclipse.jetty.ee10:jetty-ee10-webapp", version.ref = "eclipse-jetty" }
# eclipse-jetty-ee8-webapp = { module = "org.eclipse.jetty.ee8:jetty-ee8-webapp", version.ref = "eclipse-jetty" }
eclipse-jetty-http = { module = "org.eclipse.jetty:jetty-http", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-client = { module = "org.eclipse.jetty.http2:http2-client", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-common = { module = "org.eclipse.jetty.http2:http2-common", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-hpack = { module = "org.eclipse.jetty.http2:http2-hpack", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-httpclienttransport = { module = "org.eclipse.jetty.http2:http2-http-client-transport", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-server = { module = "org.eclipse.jetty.http2:http2-server", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-client = { module = "org.eclipse.jetty.http2:jetty-http2-client", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-common = { module = "org.eclipse.jetty.http2:jetty-http2-common", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-hpack = { module = "org.eclipse.jetty.http2:jetty-http2-hpack", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-httpclienttransport = { module = "org.eclipse.jetty.http2:jetty-http2-client-transport", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-server = { module = "org.eclipse.jetty.http2:jetty-http2-server", version.ref = "eclipse-jetty" }
eclipse-jetty-io = { module = "org.eclipse.jetty:jetty-io", version.ref = "eclipse-jetty" }
eclipse-jetty-jmx = { module = "org.eclipse.jetty:jetty-jmx", version.ref = "eclipse-jetty" }
eclipse-jetty-jndi = { module = "org.eclipse.jetty:jetty-jndi", version.ref = "eclipse-jetty" }
eclipse-jetty-plus = { module = "org.eclipse.jetty:jetty-plus", version.ref = "eclipse-jetty" }
eclipse-jetty-rewrite = { module = "org.eclipse.jetty:jetty-rewrite", version.ref = "eclipse-jetty" }
eclipse-jetty-security = { module = "org.eclipse.jetty:jetty-security", version.ref = "eclipse-jetty" }
eclipse-jetty-server = { module = "org.eclipse.jetty:jetty-server", version.ref = "eclipse-jetty" }
eclipse-jetty-servlet = { module = "org.eclipse.jetty:jetty-servlet", version.ref = "eclipse-jetty" }
eclipse-jetty-servlets = { module = "org.eclipse.jetty:jetty-servlets", version.ref = "eclipse-jetty" }
eclipse-jetty-session = { module = "org.eclipse.jetty:jetty-session", version.ref = "eclipse-jetty" }
eclipse-jetty-start = { module = "org.eclipse.jetty:jetty-start", version.ref = "eclipse-jetty" }
eclipse-jetty-toolchain-servletapi = { module = "org.eclipse.jetty.toolchain:jetty-servlet-api", version.ref = "eclipse-jettytoolchain" }
eclipse-jetty-toolchain-servletapi = { module = "org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api", version.ref = "eclipse-jettytoolchain" }
eclipse-jetty-util = { module = "org.eclipse.jetty:jetty-util", version.ref = "eclipse-jetty" }
eclipse-jetty-webapp = { module = "org.eclipse.jetty:jetty-webapp", version.ref = "eclipse-jetty" }
eclipse-jetty-xml = { module = "org.eclipse.jetty:jetty-xml", version.ref = "eclipse-jetty" }
eclipse-jgit-jgit = { module = "org.eclipse.jgit:org.eclipse.jgit", version.ref = "eclipse-jgit" }
fasterxml-jackson-bom = { module = "com.fasterxml.jackson:jackson-bom", version.ref = "fasterxml" }
Expand Down Expand Up @@ -386,6 +395,7 @@ immutables-valueannotations = { module = "org.immutables:value-annotations", ver
j256-simplemagic = { module = "com.j256.simplemagic:simplemagic", version.ref = "j256-simplemagic" }
jakarta-annotation-api = { module = "jakarta.annotation:jakarta.annotation-api", version.ref = "jakarta-annotation" }
jakarta-inject-api = { module = "jakarta.inject:jakarta.inject-api", version.ref = "jakarta-inject" }
jakarta-servlet-api = { module = "jakarta.servlet:jakarta.servlet-api", version.ref = "jakarta-servlet" }
jakarta-ws-rsapi = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version.ref = "jakarta-ws" }
javacc-javacc = { module = "net.java.dev.javacc:javacc", version.ref = "javacc" }
# @keep transitive dependency for version alignment
Expand Down
8 changes: 8 additions & 0 deletions gradle/testing/randomization/policies/solr-tests.policy
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ grant {

// needed by s3mock
permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.fs";
permission java.lang.RuntimePermission "accessSystemModules";

// needed for kafka mockito
permission java.lang.RuntimePermission "manageProcess";
Expand Down Expand Up @@ -254,8 +255,15 @@ grant {
permission java.io.FilePermission "${aws.configFile}", "read,readlink";
permission java.io.FilePermission "${user.home}${/}.aws${/}-", "read,readlink";

// GCS
permission java.io.FilePermission "${user.home}${/}.config${/}gcloud${/}properties", "read,readlink";
permission java.io.FilePermission "${user.home}${/}.config${/}gcloud${/}active_config", "read,readlink";
permission java.io.FilePermission "${user.home}${/}.config${/}gcloud${/}configurations${/}config_default", "read,readlink";


// expanded to a wildcard if set, allows all networking everywhere
permission java.net.SocketPermission "${solr.internal.network.permission}", "accept,listen,connect,resolve";
permission java.net.SocketPermission "metadata.google.internal:80", "connect,resolve";

// Run java
permission java.io.FilePermission "${java.home}${/}-", "execute";
Expand Down
5 changes: 3 additions & 2 deletions solr/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ dependencies {
testImplementation libs.apache.lucene.testframework

testImplementation libs.eclipse.jetty.server
testImplementation libs.eclipse.jetty.servlet

testImplementation libs.eclipse.jetty.ee10.servlet
testImplementation libs.eclipse.jetty.util
testImplementation libs.jakarta.servlet.api
testImplementation libs.carrotsearch.randomizedtesting.runner
testImplementation libs.junit.junit
testImplementation libs.hamcrest.hamcrest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package org.apache.solr.api;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.core.SolrCore;
import org.apache.solr.servlet.CoordinatorHttpSolrCall;
Expand Down
11 changes: 8 additions & 3 deletions solr/core/src/java/org/apache/solr/api/V2HttpCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import static org.apache.solr.servlet.SolrDispatchFilter.Action.REMOTEQUERY;

import io.opentelemetry.api.trace.Span;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
Expand All @@ -35,8 +37,6 @@
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.jcip.annotations.ThreadSafe;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.common.SolrException;
Expand Down Expand Up @@ -434,7 +434,12 @@ protected void executeCoreRequest(SolrQueryResponse rsp) {
// SolrCore counter
core.close();
core = null;
response.getHeaderNames().stream().forEach(name -> response.setHeader(name, null));
// Skip specific headers
// workaround for response.setHeader(name, null)
response.getHeaderNames().stream()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good for now IMO.

Longer term I'd love to see this code go away in favor of having the v2 API stuff get handled by its own servlet, but we're pretty far from that being workable for now. It is a little hacky in the interim though 😦

.filter(name -> !name.equalsIgnoreCase("Content-Length"))
.forEach(name -> response.setHeader(name, ""));
response.setContentLength(-1);
invokeJerseyRequest(
cores, null, cores.getJerseyApplicationHandler(), cores.getRequestHandlers(), rsp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,14 @@ public class ShowFileRequestHandler extends RequestHandlerBase implements Permis
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

static {
KNOWN_MIME_TYPES = new HashSet<>(MimeTypes.getKnownMimeTypes());
KNOWN_MIME_TYPES = new HashSet<>();
for (MimeTypes.Type type : MimeTypes.Type.values()) {
KNOWN_MIME_TYPES.add(type.toString());
}
KNOWN_MIME_TYPES.add("text/xml");
KNOWN_MIME_TYPES.add("text/javascript");
KNOWN_MIME_TYPES.add("text/csv");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did csv/xhtml get added?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting from Jetty 11 these two mime types are not included in MimeTypes.Type, but we have tests that check if they are supported. Not sure if this could cause any issues with jetty though.

KNOWN_MIME_TYPES.add("application/xhtml+xml");
}

public ShowFileRequestHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
package org.apache.solr.jersey;

import com.codahale.metrics.Timer;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.ws.rs.container.ContainerRequestContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.solr.client.api.model.SolrJerseyResponse;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.core.CoreContainer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.solr.jersey;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.ws.rs.container.ContainerRequestContext;
import jakarta.ws.rs.container.ContainerRequestFilter;
import jakarta.ws.rs.container.ResourceInfo;
Expand All @@ -26,8 +28,6 @@
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.security.AuthorizationContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

package org.apache.solr.jersey.container;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.SecurityContext;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.Principal;
import java.util.Enumeration;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.glassfish.jersey.internal.MapPropertiesDelegate;
import org.glassfish.jersey.server.ContainerRequest;
import org.glassfish.jersey.server.internal.ContainerUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.solr.jersey.container;

import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.invoke.MethodHandles;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.servlet.http.HttpServletResponse;
import org.glassfish.jersey.server.ContainerException;
import org.glassfish.jersey.server.ContainerResponse;
import org.glassfish.jersey.server.spi.ContainerResponseWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.solr.request;

import jakarta.servlet.http.HttpServletRequest;
import java.io.Closeable;
import java.lang.invoke.MethodHandles;
import java.security.Principal;
Expand All @@ -27,7 +28,6 @@
import java.util.Optional;
import java.util.TimeZone;
import java.util.concurrent.atomic.AtomicReference;
import javax.servlet.http.HttpServletRequest;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.handler.component.ResponseBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

import static org.apache.solr.request.SolrQueryRequest.disallowPartialResults;

import jakarta.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import javax.servlet.http.HttpServletResponse;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.apache.solr.security.AuditEvent.EventType.ERROR;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.servlet.http.HttpServletRequest;
import java.lang.invoke.MethodHandles;
import java.security.Principal;
import java.util.Arrays;
Expand All @@ -31,7 +32,6 @@
import java.util.Map;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.servlet.ServletUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
import com.codahale.metrics.Counter;
import com.codahale.metrics.Meter;
import com.codahale.metrics.Timer;
import jakarta.servlet.FilterChain;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import jakarta.servlet.http.HttpServletResponse;
import java.security.Principal;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.FilterChain;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpRequest;
import org.apache.http.protocol.HttpContext;
import org.apache.solr.core.SolrInfoBean;
import org.apache.solr.metrics.SolrMetricsContext;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.Request;

/**
* @lucene.experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
import static org.apache.solr.common.params.CollectionParams.CollectionAction.RELOAD;
import static org.apache.solr.servlet.HttpSolrCall.shouldAudit;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpStatus;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.core.CoreContainer;
Expand Down
11 changes: 6 additions & 5 deletions solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
package org.apache.solr.security;

import jakarta.servlet.FilterChain;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
Expand All @@ -30,9 +33,6 @@
import java.util.Set;
import java.util.StringTokenizer;
import javax.security.auth.Subject;
import javax.servlet.FilterChain;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.Header;
import org.apache.http.HttpHeaders;
import org.apache.http.HttpRequest;
Expand All @@ -47,7 +47,7 @@
import org.apache.solr.common.SpecProvider;
import org.apache.solr.common.util.CommandOperation;
import org.apache.solr.common.util.ValidatingJsonMap;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.Request;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -247,7 +247,8 @@ protected boolean interceptInternodeRequest(Request request) {
.encodeToString(
(principal.getName() + ":" + principal.getPassword())
.getBytes(StandardCharsets.UTF_8));
request.header(HttpHeaders.AUTHORIZATION, "Basic " + userPassBase64);
request.headers(
httpFields -> httpFields.add(HttpHeaders.AUTHORIZATION, "Basic " + userPassBase64));
return true;
}
}
Expand Down
Loading
Loading