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

SOLR-17540: Remove Hadoop Auth Module #2835

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 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
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
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
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
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
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
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ module:gcs-repository:
- any-glob-to-any-file:
- solr/modules/gcs-repository/**

module:hadoop-auth:
- changed-files:
- any-glob-to-any-file:
- solr/modules/hadoop-auth/**

module:hdfs:
- changed-files:
- any-glob-to-any-file:
Expand Down
7 changes: 0 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ apache-httpcomponents-httpclient = "4.5.14"
apache-httpcomponents-httpcore = "4.4.16"
apache-httpcomponents-httpmime = "4.5.14"
apache-kafka = "3.7.1"
apache-kerby = "2.0.3"
apache-log4j = "2.21.0"
apache-lucene = "9.11.1"
apache-opennlp = "1.9.4"
Expand Down Expand Up @@ -228,14 +227,10 @@ apache-curator-client = { module = "org.apache.curator:curator-client", version.
apache-curator-framework = { module = "org.apache.curator:curator-framework", version.ref = "apache-curator" }
apache-curator-recipes = { module = "org.apache.curator:curator-recipes", version.ref = "apache-curator" }
apache-curator-test = { module = "org.apache.curator:curator-test", version.ref = "apache-curator" }
apache-hadoop-annotations = { module = "org.apache.hadoop:hadoop-annotations", version.ref = "apache-hadoop" }
apache-hadoop-auth = { module = "org.apache.hadoop:hadoop-auth", version.ref = "apache-hadoop" }
apache-hadoop-client-api = { module = "org.apache.hadoop:hadoop-client-api", version.ref = "apache-hadoop" }
apache-hadoop-client-minicluster = { module = "org.apache.hadoop:hadoop-client-minicluster", version.ref = "apache-hadoop" }
apache-hadoop-client-runtime = { module = "org.apache.hadoop:hadoop-client-runtime", version.ref = "apache-hadoop" }
apache-hadoop-common = { module = "org.apache.hadoop:hadoop-common", version.ref = "apache-hadoop" }
apache-hadoop-hdfs = { module = "org.apache.hadoop:hadoop-hdfs", version.ref = "apache-hadoop" }
apache-hadoop-minikdc = { module = "org.apache.hadoop:hadoop-minikdc", version.ref = "apache-hadoop" }
apache-hadoop-thirdparty-shadedguava = { module = "org.apache.hadoop.thirdparty:hadoop-shaded-guava", version.ref = "apache-hadoop-thirdparty" }
apache-httpcomponents-httpclient = { module = "org.apache.httpcomponents:httpclient", version.ref = "apache-httpcomponents-httpclient" }
apache-httpcomponents-httpcore = { module = "org.apache.httpcomponents:httpcore", version.ref = "apache-httpcomponents-httpcore" }
Expand All @@ -244,8 +239,6 @@ apache-kafka-clients = { module = "org.apache.kafka:kafka-clients", version.ref
apache-kafka-kafka213 = { module = "org.apache.kafka:kafka_2.13", version.ref = "apache-kafka" }
apache-kafka-server-common = { module = "org.apache.kafka:kafka-server-common", version.ref = "apache-kafka" }
apache-kafka-streams = { module = "org.apache.kafka:kafka-streams", version.ref = "apache-kafka" }
apache-kerby-core = { module = "org.apache.kerby:kerb-core", version.ref = "apache-kerby" }
apache-kerby-util = { module = "org.apache.kerby:kerb-util", version.ref = "apache-kerby" }
apache-log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "apache-log4j" }
apache-log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "apache-log4j" }
apache-log4j-jul = { module = "org.apache.logging.log4j:log4j-jul", version.ref = "apache-log4j" }
Expand Down
12 changes: 7 additions & 5 deletions gradle/testing/randomization/policies/solr-tests.policy
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ grant {
permission java.lang.RuntimePermission "closeClassLoader";
// needed by HttpSolrClient
permission java.lang.RuntimePermission "getFileSystemAttributes";
// needed by hadoop auth (TODO: there is a cleaner way to handle this)
// needed by hadoop hdfs (TODO: there is a cleaner way to handle this)
permission java.lang.RuntimePermission "loadLibrary.jaas";
permission java.lang.RuntimePermission "loadLibrary.jaas_unix";
permission java.lang.RuntimePermission "loadLibrary.jaas_nt";
Expand Down Expand Up @@ -135,17 +135,19 @@ grant {
permission javax.management.MBeanServerPermission "findMBeanServer";
permission javax.management.MBeanServerPermission "releaseMBeanServer";
permission javax.management.MBeanTrustPermission "register";

// needed by hadoop auth
// needed by hadoop hdfs
permission javax.security.auth.AuthPermission "getSubject";
permission javax.security.auth.AuthPermission "modifyPrincipals";
permission javax.security.auth.AuthPermission "doAs";
permission javax.security.auth.AuthPermission "getLoginConfiguration";
permission javax.security.auth.AuthPermission "setLoginConfiguration";
permission javax.security.auth.AuthPermission "modifyPrivateCredentials";
permission javax.security.auth.AuthPermission "modifyPublicCredentials";
permission javax.security.auth.PrivateCredentialPermission "org.apache.hadoop.security.Credentials * \"*\"", "read";

// needed by crossdc
permission javax.security.auth.AuthPermission "getLoginConfiguration";
permission javax.security.auth.AuthPermission "setLoginConfiguration";

// needed by hadoop security
permission java.security.SecurityPermission "putProviderProperty.SaslPlainServer";
permission java.security.SecurityPermission "insertProvider";
Expand Down
3 changes: 0 additions & 3 deletions gradle/validation/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ allprojects {
handler.add(conf.name, libs.apache.httpcomponents.httpmime, {
because 'version alignment for consistency across project'
})
handler.add(conf.name, libs.apache.kerby.core, {
because 'version alignment for consistency across project'
})
handler.add(conf.name, libs.apache.zookeeper.zookeeper, {
because 'version alignment for consistency across project'
})
Expand Down
4 changes: 0 additions & 4 deletions gradle/validation/rat-sources.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ allprojects {
exclude "src/test-files/META-INF/services/*"
break

case ":solr:modules:hadoop-auth":
exclude "src/test-files/**/*.conf"
break

case ":solr:modules:hdfs":
exclude "src/test-files/**/*.aff"
exclude "src/test-files/**/*.dic"
Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ include "solr:modules:cross-dc"
include "solr:modules:opentelemetry"
include "solr:modules:extraction"
include "solr:modules:gcs-repository"
include "solr:modules:hadoop-auth"
include "solr:modules:hdfs"
include "solr:modules:jwt-auth"
include "solr:modules:langid"
Expand Down
2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Deprecation Removals

* SOLR-17564: Remove code in Assign used for backwards compatibility with Collections created prior to 7.0 (Paul McArthur)

* SOLR-17540: Removed the Hadoop Auth module, and thus Kerberos authentication and other exotic options. (Eric Pugh)

Dependency Upgrades
---------------------
(No changes)
Expand Down
7 changes: 2 additions & 5 deletions solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ fi
if [ -z "${SOLR_AUTH_TYPE:-}" ] && [ -n "${SOLR_AUTHENTICATION_OPTS:-}" ]; then
echo "WARNING: SOLR_AUTHENTICATION_OPTS environment variable configured without associated SOLR_AUTH_TYPE variable"
echo " Please configure SOLR_AUTH_TYPE environment variable with the authentication type to be used."
echo " Currently supported authentication types are [kerberos, basic]"
echo " Currently supported authentication types are [basic]"
fi

if [ -n "${SOLR_AUTH_TYPE:-}" ] && [ -n "${SOLR_AUTHENTICATION_CLIENT_BUILDER:-}" ]; then
echo "WARNING: SOLR_AUTHENTICATION_CLIENT_BUILDER and SOLR_AUTH_TYPE environment variables are configured together."
echo " Use SOLR_AUTH_TYPE environment variable to configure authentication type to be used. "
echo " Currently supported authentication types are [kerberos, basic]"
echo " Currently supported authentication types are [basic]"
echo " The value of SOLR_AUTHENTICATION_CLIENT_BUILDER environment variable will be ignored"
fi

Expand All @@ -333,9 +333,6 @@ if [ -n "${SOLR_AUTH_TYPE:-}" ]; then
basic)
SOLR_AUTHENTICATION_CLIENT_BUILDER="org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory"
;;
kerberos)
SOLR_AUTHENTICATION_CLIENT_BUILDER="org.apache.solr.client.solrj.impl.Krb5HttpClientBuilder"
;;
*)
echo "ERROR: Value specified for SOLR_AUTH_TYPE environment variable is invalid."
exit 1
Expand Down
12 changes: 4 additions & 8 deletions solr/bin/solr.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ IF NOT DEFINED SOLR_AUTH_TYPE (
IF DEFINED SOLR_AUTHENTICATION_OPTS (
echo WARNING: SOLR_AUTHENTICATION_OPTS variable configured without associated SOLR_AUTH_TYPE variable
echo Please configure SOLR_AUTH_TYPE variable with the authentication type to be used.
echo Currently supported authentication types are [kerberos, basic]
echo Currently supported authentication types are [basic]
)
)

IF DEFINED SOLR_AUTH_TYPE (
IF DEFINED SOLR_AUTHENTICATION_CLIENT_BUILDER (
echo WARNING: SOLR_AUTHENTICATION_CLIENT_BUILDER and SOLR_AUTH_TYPE variables are configured together
echo Use SOLR_AUTH_TYPE variable to configure authentication type to be used
echo Currently supported authentication types are [kerberos, basic]
echo Currently supported authentication types are [basic]
echo The value of SOLR_AUTHENTICATION_CLIENT_BUILDER configuration variable will be ignored
)
)
Expand All @@ -220,12 +220,8 @@ IF DEFINED SOLR_AUTH_TYPE (
IF /I "%SOLR_AUTH_TYPE%" == "basic" (
set SOLR_AUTHENTICATION_CLIENT_BUILDER="org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory"
) ELSE (
IF /I "%SOLR_AUTH_TYPE%" == "kerberos" (
set SOLR_AUTHENTICATION_CLIENT_BUILDER="org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory"
) ELSE (
echo ERROR: Value specified for SOLR_AUTH_TYPE configuration variable is invalid.
goto err
)
echo ERROR: Value specified for SOLR_AUTH_TYPE configuration variable is invalid.
goto err
)
)

Expand Down
Loading
Loading