This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit b29576fa60e4f5dec3a013f46cdaea4e341dc35b
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Mon Sep 14 22:33:26 2026 +0000
Bump org.apache.zookeeper:zookeeper from 3.9.5 to 3.9.6
Bumps org.apache.zookeeper:zookeeper from 3.9.5 to 3.9.6.
---
updated-dependencies:
- dependency-name: org.apache.zookeeper:zookeeper
dependency-version: 3.9.6
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
---
common/keymaster/client-zookeeper/pom.xml | 11 ++-----
.../zookeeper/ZookeeperKeymasterClientContext.java | 35 ++++------------------
.../src/main/resources/client-jaas.conf | 23 --------------
.../client-zookeeper/src/main/resources/java.env | 18 -----------
.../src/main/resources/server-jaas.conf | 22 --------------
.../client-zookeeper/src/main/resources/zoo.cfg | 27 -----------------
.../client/zookeeper/ZookeeperTestingServer.java | 28 ++++-------------
fit/core-reference/pom.xml | 11 ++-----
pom.xml | 2 +-
.../apache/syncope/sra/ZookeeperTestingServer.java | 29 ++++--------------
.../syncope/wa/starter/ZookeeperTestingServer.java | 29 ++++--------------
11 files changed, 28 insertions(+), 207 deletions(-)
diff --git a/common/keymaster/client-zookeeper/pom.xml
b/common/keymaster/client-zookeeper/pom.xml
index ae49d60354..d07c27ee4d 100644
--- a/common/keymaster/client-zookeeper/pom.xml
+++ b/common/keymaster/client-zookeeper/pom.xml
@@ -123,14 +123,9 @@ under the License.
<ports>
<port>2181:2181</port>
</ports>
- <volumes>
- <bind>
-
<volume>${project.build.outputDirectory}/zoo.cfg:/conf/zoo.cfg</volume>
-
<volume>${project.build.outputDirectory}/java.env:/conf/java.env</volume>
-
<volume>${project.build.outputDirectory}/server-jaas.conf:/conf/server-jaas.conf</volume>
-
<volume>${project.build.outputDirectory}/client-jaas.conf:/conf/client-jaas.conf</volume>
- </bind>
- </volumes>
+ <env>
+
<JVMFLAGS>-Dzookeeper.DigestAuthenticationProvider.superDigest=anonymous:NgPlLv4rbtJEAlVQcVR4CYocoRo=</JVMFLAGS>
+ </env>
</run>
</image>
</images>
diff --git
a/common/keymaster/client-zookeeper/src/main/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperKeymasterClientContext.java
b/common/keymaster/client-zookeeper/src/main/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperKeymasterClientContext.java
index 4af3cf53ef..1ad112f7e1 100644
---
a/common/keymaster/client-zookeeper/src/main/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperKeymasterClientContext.java
+++
b/common/keymaster/client-zookeeper/src/main/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperKeymasterClientContext.java
@@ -19,10 +19,8 @@
package org.apache.syncope.common.keymaster.client.zookeeper;
import java.util.List;
-import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
-import javax.security.auth.login.AppConfigurationEntry;
import org.apache.commons.lang3.StringUtils;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -34,9 +32,7 @@ import
org.apache.syncope.common.keymaster.client.api.KeymasterProperties;
import org.apache.syncope.common.keymaster.client.api.ServiceOps;
import org.apache.zookeeper.ZooDefs;
import org.apache.zookeeper.client.ZKClientConfig;
-import org.apache.zookeeper.common.X509Util;
import org.apache.zookeeper.data.ACL;
-import org.apache.zookeeper.server.auth.DigestLoginModule;
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
@@ -69,9 +65,7 @@ public class ZookeeperKeymasterClientContext {
@ConditionalOnMissingBean
@Bean
public ZKClientConfig zkClientConfig() {
- ZKClientConfig zkClientConfig = new ZKClientConfig();
- zkClientConfig.setProperty(X509Util.FIPS_MODE_PROPERTY, "false");
- return zkClientConfig;
+ return new ZKClientConfig();
}
@Conditional(ZookeeperCondition.class)
@@ -80,31 +74,13 @@ public class ZookeeperKeymasterClientContext {
final ZKClientConfig zkClientConfig,
final KeymasterProperties props) throws InterruptedException {
- if (StringUtils.isNotBlank(props.getUsername()) &&
StringUtils.isNotBlank(props.getPassword())) {
- javax.security.auth.login.Configuration.setConfiguration(new
javax.security.auth.login.Configuration() {
-
- private final AppConfigurationEntry[] entries = {
- new AppConfigurationEntry(
- DigestLoginModule.class.getName(),
- AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
- Map.of(
- "username", props.getUsername(),
- "password", props.getPassword()
- ))
- };
-
- @Override
- public AppConfigurationEntry[] getAppConfigurationEntry(final
String name) {
- return entries;
- }
- });
- }
-
CuratorFrameworkFactory.Builder clientBuilder =
CuratorFrameworkFactory.builder().
connectString(props.getAddress()).
retryPolicy(new
ExponentialBackoffRetry(props.getBaseSleepTimeMs(), props.getMaxRetries()));
- if (StringUtils.isNotBlank(props.getUsername())) {
- clientBuilder.authorization("digest",
props.getUsername().getBytes()).aclProvider(new ACLProvider() {
+
+ if (StringUtils.isNotBlank(props.getUsername()) &&
StringUtils.isNotBlank(props.getPassword())) {
+ String authString = props.getUsername() + ":" +
props.getPassword();
+ clientBuilder.authorization("digest",
authString.getBytes()).aclProvider(new ACLProvider() {
@Override
public List<ACL> getDefaultAcl() {
@@ -117,6 +93,7 @@ public class ZookeeperKeymasterClientContext {
}
});
}
+
CuratorFramework client =
clientBuilder.zkClientConfig(zkClientConfig).build();
client.start();
client.blockUntilConnected(3, TimeUnit.SECONDS);
diff --git
a/common/keymaster/client-zookeeper/src/main/resources/client-jaas.conf
b/common/keymaster/client-zookeeper/src/main/resources/client-jaas.conf
deleted file mode 100644
index c7e79c2f66..0000000000
--- a/common/keymaster/client-zookeeper/src/main/resources/client-jaas.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-Client {
- org.apache.zookeeper.server.auth.DigestLoginModule required
- username="${anonymousUser}"
- password="${anonymousKey}";
-};
diff --git a/common/keymaster/client-zookeeper/src/main/resources/java.env
b/common/keymaster/client-zookeeper/src/main/resources/java.env
deleted file mode 100644
index 4dca1d34f6..0000000000
--- a/common/keymaster/client-zookeeper/src/main/resources/java.env
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-export
CLIENT_JVMFLAGS="-Djava.security.auth.login.config=/conf/client-jaas.conf"
-export
SERVER_JVMFLAGS="-Djava.security.auth.login.config=/conf/server-jaas.conf"
\ No newline at end of file
diff --git
a/common/keymaster/client-zookeeper/src/main/resources/server-jaas.conf
b/common/keymaster/client-zookeeper/src/main/resources/server-jaas.conf
deleted file mode 100644
index f65c52aed5..0000000000
--- a/common/keymaster/client-zookeeper/src/main/resources/server-jaas.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-Server {
- org.apache.zookeeper.server.auth.DigestLoginModule required
- user_${anonymousUser}="${anonymousKey}";
-};
diff --git a/common/keymaster/client-zookeeper/src/main/resources/zoo.cfg
b/common/keymaster/client-zookeeper/src/main/resources/zoo.cfg
deleted file mode 100644
index 2be7d4fc0a..0000000000
--- a/common/keymaster/client-zookeeper/src/main/resources/zoo.cfg
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-clientPort=2181
-dataDir=/data
-dataLogDir=/datalog
-tickTime=2000
-initLimit=5
-syncLimit=2
-autopurge.snapRetainCount=3
-autopurge.purgeInterval=0
-maxClientCnxns=60
-requireClientAuthScheme=sasl
-authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider
diff --git
a/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperTestingServer.java
b/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperTestingServer.java
index 6e77b14889..dbbfed0df6 100644
---
a/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperTestingServer.java
+++
b/common/keymaster/client-zookeeper/src/test/java/org/apache/syncope/common/keymaster/client/zookeeper/ZookeeperTestingServer.java
@@ -21,15 +21,13 @@ package
org.apache.syncope.common.keymaster.client.zookeeper;
import static org.junit.jupiter.api.Assertions.fail;
import java.io.InputStream;
-import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
import org.apache.commons.lang3.mutable.Mutable;
import org.apache.commons.lang3.mutable.MutableObject;
import org.apache.curator.test.InstanceSpec;
import org.apache.curator.test.TestingServer;
+import org.apache.zookeeper.server.auth.DigestAuthenticationProvider;
public final class ZookeeperTestingServer {
@@ -49,26 +47,10 @@ public final class ZookeeperTestingServer {
fail("Could not load /test.properties", e);
}
- Configuration.setConfiguration(new Configuration() {
-
- private final AppConfigurationEntry[] entries = {
- new AppConfigurationEntry(
- "org.apache.zookeeper.server.auth.DigestLoginModule",
- AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
- Map.of(
- "user_" + username.get(), password.get()
- ))
- };
-
- @Override
- public AppConfigurationEntry[] getAppConfigurationEntry(final
String name) {
- return entries;
- }
- });
-
- Map<String, Object> customProperties = new HashMap<>();
- customProperties.put("authProvider.1",
"org.apache.zookeeper.server.auth.SASLAuthenticationProvider");
- InstanceSpec spec = new InstanceSpec(null, 2181, -1, -1, true, 1,
-1, -1, customProperties);
+ System.setProperty(
+ "zookeeper.DigestAuthenticationProvider.superDigest",
+ DigestAuthenticationProvider.generateDigest(username.get()
+ ":" + password.get()));
+ InstanceSpec spec = new InstanceSpec(null, 2181, -1, -1, true, 1,
-1, -1, Map.of());
ZK_SERVER = new TestingServer(spec, true);
}
}
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index 6525cf5be8..a5d5c32600 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -472,14 +472,9 @@ under the License.
<ports>
<port>2181:2181</port>
</ports>
- <volumes>
- <bind>
-
<volume>${project.build.directory}/test-classes/zoo.cfg:/conf/zoo.cfg</volume>
-
<volume>${project.build.directory}/test-classes/java.env:/conf/java.env</volume>
-
<volume>${project.build.directory}/test-classes/server-jaas.conf:/conf/server-jaas.conf</volume>
-
<volume>${project.build.directory}/test-classes/client-jaas.conf:/conf/client-jaas.conf</volume>
- </bind>
- </volumes>
+ <env>
+
<JVMFLAGS>-Dzookeeper.DigestAuthenticationProvider.superDigest=anonymous:NgPlLv4rbtJEAlVQcVR4CYocoRo=</JVMFLAGS>
+ </env>
</run>
</image>
</images>
diff --git a/pom.xml b/pom.xml
index 35c0d29c55..d535844a11 100644
--- a/pom.xml
+++ b/pom.xml
@@ -492,7 +492,7 @@ under the License.
<antlr4.version>4.13.2</antlr4.version>
<curator.version>5.9.0</curator.version>
- <zookeeper.version>3.9.5</zookeeper.version>
+ <zookeeper.version>3.9.6</zookeeper.version>
<testcontainers.version>2.0.5</testcontainers.version>
diff --git
a/sra/src/test/java/org/apache/syncope/sra/ZookeeperTestingServer.java
b/sra/src/test/java/org/apache/syncope/sra/ZookeeperTestingServer.java
index 958453d3cc..9562cc6145 100644
--- a/sra/src/test/java/org/apache/syncope/sra/ZookeeperTestingServer.java
+++ b/sra/src/test/java/org/apache/syncope/sra/ZookeeperTestingServer.java
@@ -21,18 +21,14 @@ package org.apache.syncope.sra;
import static org.junit.jupiter.api.Assertions.fail;
import java.io.InputStream;
-import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.mutable.Mutable;
import org.apache.commons.lang3.mutable.MutableObject;
import org.apache.curator.test.InstanceSpec;
import org.apache.curator.test.TestingServer;
-import org.apache.zookeeper.server.auth.DigestLoginModule;
-import org.apache.zookeeper.server.auth.SASLAuthenticationProvider;
+import org.apache.zookeeper.server.auth.DigestAuthenticationProvider;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
@@ -55,26 +51,11 @@ public class ZookeeperTestingServer implements
ApplicationContextInitializer<Con
}
if (AbstractTest.available(port.get())) {
- Configuration.setConfiguration(new Configuration() {
-
- private final AppConfigurationEntry[] entries = {
- new AppConfigurationEntry(
- DigestLoginModule.class.getName(),
- AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
- Map.of("user_" + username.get(), password.get()))
- };
-
- @Override
- public AppConfigurationEntry[] getAppConfigurationEntry(final
String name) {
- return entries;
- }
- });
-
- Map<String, Object> customProperties = new HashMap<>();
- customProperties.put("authProvider.1",
SASLAuthenticationProvider.class.getName());
- InstanceSpec spec = new InstanceSpec(null, port.get(), -1, -1,
true, 1, -1, -1, customProperties);
-
try {
+ System.setProperty(
+ "zookeeper.DigestAuthenticationProvider.superDigest",
+
DigestAuthenticationProvider.generateDigest(username.get() + ":" +
password.get()));
+ InstanceSpec spec = new InstanceSpec(null, 2181, -1, -1, true,
1, -1, -1, Map.of());
new TestingServer(spec, true);
} catch (Exception e) {
fail(e);
diff --git
a/wa/starter/src/test/java/org/apache/syncope/wa/starter/ZookeeperTestingServer.java
b/wa/starter/src/test/java/org/apache/syncope/wa/starter/ZookeeperTestingServer.java
index b6e5c996fc..f6f82000b1 100644
---
a/wa/starter/src/test/java/org/apache/syncope/wa/starter/ZookeeperTestingServer.java
+++
b/wa/starter/src/test/java/org/apache/syncope/wa/starter/ZookeeperTestingServer.java
@@ -21,18 +21,14 @@ package org.apache.syncope.wa.starter;
import static org.junit.jupiter.api.Assertions.fail;
import java.io.InputStream;
-import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import javax.security.auth.login.AppConfigurationEntry;
-import javax.security.auth.login.Configuration;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.mutable.Mutable;
import org.apache.commons.lang3.mutable.MutableObject;
import org.apache.curator.test.InstanceSpec;
import org.apache.curator.test.TestingServer;
-import org.apache.zookeeper.server.auth.DigestLoginModule;
-import org.apache.zookeeper.server.auth.SASLAuthenticationProvider;
+import org.apache.zookeeper.server.auth.DigestAuthenticationProvider;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
@@ -54,26 +50,11 @@ public class ZookeeperTestingServer implements
ApplicationContextInitializer<Con
throw new IllegalStateException("Could not load /test.properties",
e);
}
- Configuration.setConfiguration(new Configuration() {
-
- private final AppConfigurationEntry[] entries = {
- new AppConfigurationEntry(
- DigestLoginModule.class.getName(),
- AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
- Map.of("user_" + username.get(), password.get()))
- };
-
- @Override
- public AppConfigurationEntry[] getAppConfigurationEntry(final
String name) {
- return entries;
- }
- });
-
- Map<String, Object> customProperties = new HashMap<>();
- customProperties.put("authProvider.1",
SASLAuthenticationProvider.class.getName());
- InstanceSpec spec = new InstanceSpec(null, port.get(), -1, -1, true,
1, -1, -1, customProperties);
-
try {
+ System.setProperty(
+ "zookeeper.DigestAuthenticationProvider.superDigest",
+ DigestAuthenticationProvider.generateDigest(username.get()
+ ":" + password.get()));
+ InstanceSpec spec = new InstanceSpec(null, 2181, -1, -1, true, 1,
-1, -1, Map.of());
new TestingServer(spec, true);
} catch (Exception e) {
fail(e);