World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#14962] improvement(deps): Update kafka-clients to 3.9.2 (#14963)
geyanggangb94c3066a987
diff --git a/.github/trivy/trivyignore.yaml b/.github/trivy/trivyignore.yamlindex d352c7adb3..80c8e0ddd2 100644--- a/.github/trivy/trivyignore.yaml+++ b/.github/trivy/trivyignore.yaml@@ -690,12 +690,6 @@ vulnerabilities:- pkg:maven/org.apache.avro/[email protected]expired_at: 2027-02-07statement: "Pre-existing finding, tracked in apache/gravitino#14777."- # org.apache.kafka/kafka-clients- - id: CVE-2026-35554- purls:- - pkg:maven/org.apache.kafka/[email protected]- expired_at: 2027-02-07- statement: "Pre-existing finding, tracked in apache/gravitino#14777."# org.apache.kerby/kerb-server- id: CVE-2026-57915purls:diff --git a/LICENSE.bin b/LICENSE.binindex f304880f09..4381653753 100644--- a/LICENSE.bin+++ b/LICENSE.bin@@ -389,6 +389,7 @@Jetty SSLEngineJJWTLZ4 and XxHash+ LZ4 Java (at.yawk.lz4 fork)Prometheus Java SimpleclientSnappy JavaXNIO API@@ -443,6 +444,9 @@ParaNamerRE2/JZSTD JNI+ LZ4 native library and xxHash (bundled in LZ4 Java, see licenses/lz4.txt)+ Zstandard native library (bundled in ZSTD JNI, see licenses/zstd-native.txt)+ Snappy native library (bundled in Snappy Java, see licenses/snappy.txt)fsspecGoogle auth HTTPGoogle auth Credentials@@ -471,6 +475,7 @@elarivie/pyReaderWriterLocktkem/cachetoolsgethostname4j+ Bitshuffle (bundled in Snappy Java, see licenses/bitshuffle.txt)This product bundles various third-party components also under theBoost Software License 1.0@@ -554,5 +559,13 @@For the BSD license of OGNL shaded in MyBatis, see licenses/mybatis-ognl.txt.+For the BSD licenses of the native LZ4 and xxHash code bundled in LZ4 Java, see licenses/lz4.txt.++For the BSD license of the native Snappy code and the MIT license of the Bitshuffle code bundled+ in Snappy Java, see licenses/snappy.txt and licenses/bitshuffle.txt.++For the BSD license of the ZSTD JNI wrapper, see licenses/zstd.txt. For the BSD license of the+ native Zstandard code it bundles, see licenses/zstd-native.txt.+For the license texts of code included in Apache Commons Math 3.1.1,see licenses/commons-math3.txt.diff --git a/NOTICE.bin b/NOTICE.binindex 66375a88a9..ecefae2213 100644--- a/NOTICE.bin+++ b/NOTICE.bin@@ -35,6 +35,11 @@ Copyright 2017-2026 The Apache Software FoundationApache KafkaCopyright 2011-2023 The Apache Software Foundation+Apache Kafka (kafka-clients)+Copyright 2026 The Apache Software Foundation.+This project contains the following code copied from Apache Hadoop:+clients/src/main/java/org/apache/kafka/common/utils/PureJavaCrc32C.java+Some portions of this file Copyright (c) 2004-2006 Intel Corporation and licensed under the BSD license.ObjenesisCopyright 2006-2022 Joe Walnes, Henri Tremblay, Leonardo Mesquita@@ -864,7 +869,7 @@ which has the following notices:granted provided that the copyright notice appears in all copies./The binary distribution of this product bundles binaries of-Snappy for Java 1.0.4.1,+Snappy for Java (snappy-java),which has the following notices:* This product includes software developed by GoogleSnappy: http://code.google.com/p/snappy/ (New BSD License)diff --git a/catalogs/catalog-kafka/build.gradle.kts b/catalogs/catalog-kafka/build.gradle.ktsindex 6a083153ab..2bba088c34 100644--- a/catalogs/catalog-kafka/build.gradle.kts+++ b/catalogs/catalog-kafka/build.gradle.kts@@ -33,6 +33,17 @@ dependencies {implementation(libs.kafka.clients)implementation(libs.slf4j.api)+ // kafka-clients pulls at.yawk.lz4:lz4-java 1.10.1, which is affected by GHSA-mcr4-qmvw-px4g+ // (CVE-2026-106451). Declare 1.11.4 as a direct dependency instead of a constraint, so it also+ // wins in the published POM: a constraint only becomes dependencyManagement there, and Maven+ // consumers of this artifact would still resolve 1.10.1 through kafka-clients.+ runtimeOnly(libs.yawk.lz4.java)++ // kafka-clients pulls snappy-java 1.1.10.5, which has known HIGH CVEs. The root build forces the+ // patched version for the binary distribution, but a force does not reach the published POM, so+ // declare it directly for Maven consumers as well.+ runtimeOnly(libs.snappy.java)+testImplementation(project(":api"))testImplementation(project(":clients:client-java"))testImplementation(project(":common"))diff --git a/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalog.java b/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalog.javaindex aa667c7ce3..f56162268b 100644--- a/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalog.java+++ b/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalog.java@@ -53,6 +53,18 @@ public class KafkaCatalog extends BaseCatalog<KafkaCatalog> {return ops;}+ /**+ * Rejects the Kafka config provider properties, so that a catalog using them cannot be created or+ * altered.+ *+ * @param configuration the complete proposed catalog configuration+ * @throws IllegalArgumentException if the configuration sets a config provider property+ */+ @Override+ public void validateConfiguration(Map<String, String> configuration) {+ KafkaCatalogOperations.checkNoConfigProviders(configuration);+ }+@Overrideprotected Capability newCapability() {return new KafkaCatalogCapability();diff --git a/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java b/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.javaindex d0a8e007f6..34b278aab0 100644--- a/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java+++ b/catalogs/catalog-kafka/src/main/java/org/apache/gravitino/catalog/kafka/KafkaCatalogOperations.java@@ -100,6 +100,11 @@ public class KafkaCatalogOperations implements CatalogOperations, SupportsSchemaprivate static final String DEFAULT_SCHEMA_NAME = "default";@VisibleForTesting static final String CLIENT_ID_TEMPLATE = "%s-%s.%s";+ // Kafka resolves "${provider:path:key}" placeholders in client configs through the providers+ // named by "config.providers". Those providers read the Gravitino server's own environment+ // variables and files, so they must not be selectable through catalog properties.+ @VisibleForTesting static final String CONFIG_PROVIDERS_KEY = "config.providers";+private final EntityStore store;private final IdGenerator idGenerator;@VisibleForTesting NameIdentifier defaultSchemaIdent;@@ -143,6 +148,7 @@ public class KafkaCatalogOperations implements CatalogOperations, SupportsSchemaCollectors.toMap(e -> e.getKey().substring(CATALOG_BYPASS_PREFIX.length()),Map.Entry::getValue));+ checkNoConfigProviders(config);adminClientConfig.putAll(bypassConfigs);adminClientConfig.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,@@ -640,4 +646,28 @@ public class KafkaCatalogOperations implements CatalogOperations, SupportsSchemathrow ExceptionMessages.wrap("Failed to create default schema for Kafka catalog", ioe);}}++ /**+ * Rejects Kafka config provider properties passed through the bypass prefix.+ *+ * @param config the catalog configuration+ * @throws IllegalArgumentException if any {@code gravitino.bypass.config.providers} property is+ * set+ */+ static void checkNoConfigProviders(Map<String, String> config) {+ String disallowedKeys =+ config.keySet().stream()+ .filter(KafkaCatalogOperations::isConfigProviderKey)+ .sorted()+ .collect(Collectors.joining(", "));+ Preconditions.checkArgument(+ disallowedKeys.isEmpty(),+ "Kafka config providers are not supported, please remove the properties: %s",+ disallowedKeys);+ }++ private static boolean isConfigProviderKey(String key) {+ String providersKey = CATALOG_BYPASS_PREFIX + CONFIG_PROVIDERS_KEY;+ return key.equals(providersKey) || key.startsWith(providersKey + ".");+ }}diff --git a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/TestKafkaCatalogOperations.java b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/TestKafkaCatalogOperations.javaindex 199d3f5093..8512434ffa 100644--- a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/TestKafkaCatalogOperations.java+++ b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/TestKafkaCatalogOperations.java@@ -53,6 +53,7 @@ import static org.apache.gravitino.catalog.kafka.KafkaTopicPropertiesMetadata.PAimport static org.apache.gravitino.catalog.kafka.KafkaTopicPropertiesMetadata.REPLICATION_FACTOR;import static org.mockito.Mockito.when;+import com.google.common.collect.ImmutableList;import com.google.common.collect.ImmutableMap;import java.io.File;import java.io.IOException;@@ -319,6 +320,115 @@ public class TestKafkaCatalogOperations extends KafkaClusterEmbedded {Assertions.assertEquals(DEFAULT_SCHEMA_NAME, schema.name());}+ @Test+ public void testInitializeRejectsConfigProviders() throws IllegalAccessException {+ CatalogEntity catalogEntity =+ CatalogEntity.builder()+ .withId(idGenerator.nextId())+ .withName("test_kafka_catalog_config_providers")+ .withNamespace(Namespace.of(METALAKE_NAME))+ .withType(MESSAGING)+ .withProvider("kafka")+ .withAuditInfo(+ AuditInfo.builder()+ .withCreator("testKafkaUser")+ .withCreateTime(Instant.now())+ .build())+ .withProperties(MOCK_CATALOG_PROPERTIES)+ .build();++ for (String key :+ ImmutableList.of(+ "config.providers",+ "config.providers.env.class",+ "config.providers.env.param.allowlist.pattern")) {+ Map<String, String> properties =+ ImmutableMap.<String, String>builder()+ .putAll(MOCK_CATALOG_PROPERTIES)+ .put("gravitino.bypass." + key, "env")+ .put("gravitino.bypass.request.timeout.ms", "${env:GRAVITINO_KAFKA_TEST_ENV_MARKER}")+ .build();+ KafkaCatalogOperations ops = new KafkaCatalogOperations(store, idGenerator);+ IllegalArgumentException exception =+ Assertions.assertThrows(+ IllegalArgumentException.class,+ () ->+ ops.initialize(+ properties, catalogEntity.toCatalogInfo(), KAFKA_PROPERTIES_METADATA));+ Assertions.assertTrue(+ exception.getMessage().contains("gravitino.bypass." + key), exception.getMessage());+ // The check must run before any bypass property is applied or the AdminClient is created.+ Assertions.assertNull(ops.adminClientConfig.get("request.timeout.ms"));+ Assertions.assertNull(FieldUtils.readField(ops, "adminClient", true));+ }+ }++ @Test+ public void testValidateConfigurationRejectsConfigProviders() {+ KafkaCatalog catalog = new KafkaCatalog();+ for (String key :+ ImmutableList.of(+ "config.providers",+ "config.providers.env.class",+ "config.providers.env.param.allowlist.pattern")) {+ Map<String, String> properties =+ ImmutableMap.<String, String>builder()+ .putAll(MOCK_CATALOG_PROPERTIES)+ .put("gravitino.bypass." + key, "env")+ .build();+ IllegalArgumentException exception =+ Assertions.assertThrows(+ IllegalArgumentException.class, () -> catalog.validateConfiguration(properties));+ Assertions.assertEquals(+ "Kafka config providers are not supported, please remove the properties: "+ + "gravitino.bypass."+ + key,+ exception.getMessage());+ }++ // Unprefixed keys are not forwarded to Kafka, and similar names are not provider keys.+ Assertions.assertDoesNotThrow(+ () ->+ catalog.validateConfiguration(+ ImmutableMap.<String, String>builder()+ .putAll(MOCK_CATALOG_PROPERTIES)+ .put("config.providers", "env")+ .put("gravitino.bypass.config.providersx", "ignored")+ .put("gravitino.bypass.request.timeout.ms", "30000")+ .build()));+ }++ @Test+ public void testInitializeKeepsOtherBypassConfigs() throws IOException {+ CatalogEntity catalogEntity =+ CatalogEntity.builder()+ .withId(idGenerator.nextId())+ .withName("test_kafka_catalog_bypass")+ .withNamespace(Namespace.of(METALAKE_NAME))+ .withType(MESSAGING)+ .withProvider("kafka")+ .withAuditInfo(+ AuditInfo.builder()+ .withCreator("testKafkaUser")+ .withCreateTime(Instant.now())+ .build())+ .withProperties(MOCK_CATALOG_PROPERTIES)+ .build();+ store.put(catalogEntity, false);++ // "config.providers" must only match whole keys and its sub-keys, not similar names.+ Map<String, String> properties =+ ImmutableMap.<String, String>builder()+ .putAll(MOCK_CATALOG_PROPERTIES)+ .put("gravitino.bypass.request.timeout.ms", "30000")+ .put("gravitino.bypass.config.providersx", "ignored")+ .build();+ try (KafkaCatalogOperations ops = new KafkaCatalogOperations(store, idGenerator)) {+ ops.initialize(properties, catalogEntity.toCatalogInfo(), KAFKA_PROPERTIES_METADATA);+ Assertions.assertEquals("30000", ops.adminClientConfig.get("request.timeout.ms"));+ }+ }+@Testpublic void testCreateSchema() {NameIdentifier ident = NameIdentifier.of(METALAKE_NAME, CATALOG_NAME, "test_schema");diff --git a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/BrokerConfigKeys.java b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/BrokerConfigKeys.javanew file mode 100644index 0000000000..fb441225d8--- /dev/null+++ b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/BrokerConfigKeys.java@@ -0,0 +1,47 @@+/*+ * 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.+ */++package org.apache.gravitino.catalog.kafka.embedded;++/**+ * Broker configuration keys used by the embedded Kafka cluster in tests.+ *+ * <p>Kafka no longer exposes the Scala {@code KafkaConfig} property accessors as a stable API, so+ * the plain configuration keys are centralized here.+ */+final class BrokerConfigKeys {++ static final String ZOOKEEPER_CONNECT = "zookeeper.connect";+ static final String ZOOKEEPER_SESSION_TIMEOUT_MS = "zookeeper.session.timeout.ms";+ static final String ZOOKEEPER_CONNECTION_TIMEOUT_MS = "zookeeper.connection.timeout.ms";+ static final String DELETE_TOPIC_ENABLE = "delete.topic.enable";+ static final String LOG_CLEANER_DEDUPE_BUFFER_SIZE = "log.cleaner.dedupe.buffer.size";+ static final String GROUP_MIN_SESSION_TIMEOUT_MS = "group.min.session.timeout.ms";+ static final String OFFSETS_TOPIC_REPLICATION_FACTOR = "offsets.topic.replication.factor";+ static final String OFFSETS_TOPIC_NUM_PARTITIONS = "offsets.topic.num.partitions";+ static final String AUTO_CREATE_TOPICS_ENABLE = "auto.create.topics.enable";+ static final String LISTENERS = "listeners";+ static final String BROKER_ID = "broker.id";+ static final String NUM_PARTITIONS = "num.partitions";+ static final String MESSAGE_MAX_BYTES = "message.max.bytes";+ static final String CONTROLLED_SHUTDOWN_ENABLE = "controlled.shutdown.enable";+ static final String LOG_DIR = "log.dir";++ private BrokerConfigKeys() {}+}diff --git a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaClusterEmbedded.java b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaClusterEmbedded.javaindex e13ae7e632..b5613f3560 100644--- a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaClusterEmbedded.java+++ b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaClusterEmbedded.java@@ -19,8 +19,6 @@ import java.io.IOException;import java.net.ServerSocket;import java.util.Properties;import java.util.UUID;-import kafka.server.KafkaConfig;-import kafka.server.KafkaConfig$;import org.junit.jupiter.api.AfterAll;import org.junit.jupiter.api.BeforeAll;import org.slf4j.Logger;@@ -46,7 +44,7 @@ public abstract class KafkaClusterEmbedded {Properties brokerConfig = initBrokerConfig();LOG.info("Starting a Kafka instance on port {} ...",- brokerConfig.getProperty(KafkaConfig.ListenersProp()));+ brokerConfig.getProperty(BrokerConfigKeys.LISTENERS));broker = new KafkaEmbedded(brokerConfig);LOG.info("Kafka instance is running at {}, connected to ZooKeeper at {}",@@ -83,20 +81,20 @@ public abstract class KafkaClusterEmbedded {private static Properties initBrokerConfig() {Properties configs = new Properties();- configs.put(KafkaConfig$.MODULE$.ZkConnectProp(), zookeeper.connectString());- configs.put(KafkaConfig$.MODULE$.ZkSessionTimeoutMsProp(), 30 * 1000);- configs.put(KafkaConfig$.MODULE$.ZkConnectionTimeoutMsProp(), 60 * 1000);- configs.put(KafkaConfig$.MODULE$.DeleteTopicEnableProp(), true);- configs.put(KafkaConfig$.MODULE$.LogCleanerDedupeBufferSizeProp(), 2 * 1024 * 1024L);- configs.put(KafkaConfig$.MODULE$.GroupMinSessionTimeoutMsProp(), 0);- configs.put(KafkaConfig$.MODULE$.OffsetsTopicReplicationFactorProp(), (short) 1);- configs.put(KafkaConfig$.MODULE$.OffsetsTopicPartitionsProp(), 1);- configs.put(KafkaConfig$.MODULE$.AutoCreateTopicsEnableProp(), true);+ configs.put(BrokerConfigKeys.ZOOKEEPER_CONNECT, zookeeper.connectString());+ configs.put(BrokerConfigKeys.ZOOKEEPER_SESSION_TIMEOUT_MS, 30 * 1000);+ configs.put(BrokerConfigKeys.ZOOKEEPER_CONNECTION_TIMEOUT_MS, 60 * 1000);+ configs.put(BrokerConfigKeys.DELETE_TOPIC_ENABLE, true);+ configs.put(BrokerConfigKeys.LOG_CLEANER_DEDUPE_BUFFER_SIZE, 2 * 1024 * 1024L);+ configs.put(BrokerConfigKeys.GROUP_MIN_SESSION_TIMEOUT_MS, 0);+ configs.put(BrokerConfigKeys.OFFSETS_TOPIC_REPLICATION_FACTOR, (short) 1);+ configs.put(BrokerConfigKeys.OFFSETS_TOPIC_NUM_PARTITIONS, 1);+ configs.put(BrokerConfigKeys.AUTO_CREATE_TOPICS_ENABLE, true);// Find a random porttry (ServerSocket socket = new ServerSocket(0)) {socket.setReuseAddress(true);configs.put(- KafkaConfig.ListenersProp(),+ BrokerConfigKeys.LISTENERS,String.format("PLAINTEXT://127.0.0.1:%s", socket.getLocalPort()));} catch (IOException e) {throw new RuntimeException("Can't find a port to start embedded Kafka broker", e);diff --git a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaEmbedded.java b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaEmbedded.javaindex f4cab873b9..8643b8b0bd 100644--- a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaEmbedded.java+++ b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaEmbedded.java@@ -21,7 +21,6 @@ import java.util.Properties;import java.util.concurrent.ExecutionException;import kafka.cluster.EndPoint;import kafka.server.KafkaConfig;-import kafka.server.KafkaConfig$;import kafka.server.KafkaServer;import org.apache.commons.io.FileUtils;import org.apache.kafka.clients.admin.AdminClient;@@ -86,7 +85,7 @@ public class KafkaEmbedded {/** The ZooKeeper connection string aka `zookeeper.connect`. */public String zookeeperConnect() {- return effectiveConfig.getProperty("zookeeper.connect");+ return effectiveConfig.getProperty(BrokerConfigKeys.ZOOKEEPER_CONNECT);}/** Stop the broker. */@@ -106,14 +105,14 @@ public class KafkaEmbedded {private Properties effectiveConfigFrom(final Properties initialConfig) {final Properties effectiveConfig = new Properties();- effectiveConfig.put(KafkaConfig$.MODULE$.BrokerIdProp(), 0);- effectiveConfig.put(KafkaConfig$.MODULE$.NumPartitionsProp(), 1);- effectiveConfig.put(KafkaConfig$.MODULE$.AutoCreateTopicsEnableProp(), true);- effectiveConfig.put(KafkaConfig$.MODULE$.MessageMaxBytesProp(), 1000000);- effectiveConfig.put(KafkaConfig$.MODULE$.ControlledShutdownEnableProp(), true);+ effectiveConfig.put(BrokerConfigKeys.BROKER_ID, 0);+ effectiveConfig.put(BrokerConfigKeys.NUM_PARTITIONS, 1);+ effectiveConfig.put(BrokerConfigKeys.AUTO_CREATE_TOPICS_ENABLE, true);+ effectiveConfig.put(BrokerConfigKeys.MESSAGE_MAX_BYTES, 1000000);+ effectiveConfig.put(BrokerConfigKeys.CONTROLLED_SHUTDOWN_ENABLE, true);effectiveConfig.putAll(initialConfig);- effectiveConfig.setProperty(KafkaConfig$.MODULE$.LogDirProp(), LOG_DIR);+ effectiveConfig.setProperty(BrokerConfigKeys.LOG_DIR, LOG_DIR);return effectiveConfig;}}diff --git a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/integration/test/CatalogKafkaIT.java b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/integration/test/CatalogKafkaIT.javaindex 76a870478f..397458a5d2 100644--- a/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/integration/test/CatalogKafkaIT.java+++ b/catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/integration/test/CatalogKafkaIT.java@@ -192,6 +192,72 @@ public class CatalogKafkaIT extends BaseIT {Assertions.assertFalse(adminClient.listTopics().names().get().isEmpty());}+ @Test+ public void testConnectionRejectsConfigProviders() {+ // A caller-selected Kafka config provider must not be able to read server environment values.+ String marker = "GRAVITINO_KAFKA_IT_ENV_MARKER";+ ImmutableMap<String, String> properties =+ ImmutableMap.<String, String>builder()+ .put(BOOTSTRAP_SERVERS, kafkaBootstrapServers)+ .put("gravitino.bypass.config.providers", "env")+ .put(+ "gravitino.bypass.config.providers.env.class",+ "org.apache.kafka.common.config.provider.EnvVarConfigProvider")+ .put("gravitino.bypass.request.timeout.ms", "${env:" + marker + "}")+ .build();++ Exception exception =+ Assertions.assertThrows(+ IllegalArgumentException.class,+ () ->+ metalake.testConnection(+ GravitinoITUtils.genRandomName("test_catalog"),+ Catalog.Type.MESSAGING,+ PROVIDER,+ "comment",+ properties));+ Assertions.assertTrue(+ exception.getMessage().contains("Kafka config providers are not supported"),+ exception.getMessage());+ Assertions.assertTrue(+ exception.getMessage().contains("gravitino.bypass.config.providers"),+ exception.getMessage());+ }++ @Test+ public void testCreateAndAlterCatalogRejectConfigProviders() {+ String catalogName = GravitinoITUtils.genRandomName("test_catalog");+ String providersKey = "gravitino.bypass.config.providers";+ Map<String, String> properties =+ ImmutableMap.of(BOOTSTRAP_SERVERS, kafkaBootstrapServers, providersKey, "env");++ Exception exception =+ Assertions.assertThrows(+ IllegalArgumentException.class,+ () -> createCatalog(catalogName, "comment", properties));+ Assertions.assertTrue(exception.getMessage().contains(providersKey), exception.getMessage());+ Assertions.assertFalse(metalake.catalogExists(catalogName));++ Catalog catalog =+ createCatalog(+ catalogName, "comment", ImmutableMap.of(BOOTSTRAP_SERVERS, kafkaBootstrapServers));+ try {+ exception =+ Assertions.assertThrows(+ IllegalArgumentException.class,+ () ->+ metalake.alterCatalog(+ catalogName, CatalogChange.setProperty(providersKey + ".env.class", "x")));+ Assertions.assertTrue(+ exception.getMessage().contains(providersKey + ".env.class"), exception.getMessage());+ Assertions.assertFalse(+ metalake.loadCatalog(catalogName).properties().containsKey(providersKey + ".env.class"));+ Assertions.assertDoesNotThrow(() -> metalake.testConnection(catalog.name()));+ } finally {+ metalake.dropCatalog(catalogName, true);+ }+ }+@Testpublic void testCatalogReregistrationLoadsExistingTopic()throws ExecutionException, InterruptedException {diff --git a/docs/gravitino-server-config.md b/docs/gravitino-server-config.mdindex 8b667c33a0..bde0078fc3 100644--- a/docs/gravitino-server-config.md+++ b/docs/gravitino-server-config.md@@ -740,8 +740,10 @@ catalog configuration file supplies defaults for every catalog of that provider,wins. Neither affects schema or table properties.A catalog property is one of three kinds. Gravitino defines some itself, as the settings a catalog-needs to work. Anything prefixed `gravitino.bypass.` passes straight through to the underlying-system untouched. Anything else Gravitino simply stores for you to use as you like.+needs to work. Gravitino forwards `gravitino.bypass.` properties to the underlying system unless+the catalog rejects them. Anything else Gravitino simply stores for you to use as you like. For+example, the Kafka catalog rejects the Kafka config provider properties, see+[Kafka catalog properties](kafka-catalog.md#catalog-properties).Passing credentials, tokens, or access keys through `gravitino.bypass.` exposes them: bypassedproperties are not managed by Gravitino and can come back in plaintext from the REST API. Where andiff --git a/docs/kafka-catalog.md b/docs/kafka-catalog.mdindex 862c19eb8c..ad0c17d4b7 100644--- a/docs/kafka-catalog.md+++ b/docs/kafka-catalog.md@@ -20,7 +20,35 @@ Besides the [common catalog properties](./gravitino-server-config.md#catalog-pro| Property Name | Description | Default Value | Required ||---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|----------|| `bootstrap.servers` | The Kafka broker(s) to connect to, allowing for multiple brokers by comma-separating them. | (none) | Yes |-| `gravitino.bypass.` | Property name with this prefix passed down to the underlying Kafka Admin client for use. (refer to [Kafka Admin Configs](https://kafka.apache.org/34/documentation.html#adminclientconfigs) for more details) | (none) | No |+| `gravitino.bypass.` | Property name with this prefix passed down to the underlying Kafka Admin client for use. (refer to [Kafka Admin Configs](https://kafka.apache.org/39/configuration/admin-configs/) for more details) | (none) | No |++The Kafka catalog rejects the Kafka config provider properties `gravitino.bypass.config.providers`+and `gravitino.bypass.config.providers.*` (for example `gravitino.bypass.config.providers.file.class`),+because a provider can read the Gravitino server's own environment and files. Creating a catalog,+testing a connection, or altering a catalog with these properties fails with an error naming them.+This includes properties that come from `kafka.conf` (`catalogs/kafka/conf/kafka.conf`, or+`<package>/conf/kafka.conf` for a catalog with a custom `package` property), so a provider property+in a `kafka.conf` file blocks the creation of every Kafka catalog that uses that file. A catalog+created before upgrading that still has them fails on schema and topic operations until they are+removed.++:::caution Credentials in bypass properties+Bypass properties can be returned in plaintext by the catalog REST API. Gravitino masks only keys+whose names match the+[sensitive key keywords](./gravitino-server-config.md#sensitive-property-key-matching). With the+default keywords, `gravitino.bypass.ssl.truststore.password` is masked but a password inside+`gravitino.bypass.sasl.jaas.config` is returned unchanged. Changing+`gravitino.secret.sensitiveKeyKeywords` replaces the default list, so what is masked depends on the+server configuration. Do not put credentials in such properties as plaintext, including in+`kafka.conf`: its values are copied into the properties of each catalog created with it. If a+Gravitino secret provider is configured, bind the whole property per catalog. Use+`CatalogChange.setSecretBinding` (REST update type `setSecretBinding`) with a provider that+supports versioned writes, or `CatalogChange.setSecretReference` (REST update type+`setSecretReference`) with an external secret that holds the whole property value.+:::++See [Kafka catalog client upgrade](./migration-guide.md#kafka-catalog-client-upgrade) for how to+migrate catalogs that used config providers or `LdapLoginModule`.### Catalog Operations@@ -76,7 +104,7 @@ workaround.| `partition-count` | The number of partitions for the topic. | if not specified, will use the `num.partitions` property in the broker. | No || `replication-factor` | The number of replications for the topic | if not specified, will use the `default.replication.factor` property in the broker. | No |-Pass other topic configurations to the topic properties. Refer to [Topic Configs](https://kafka.apache.org/34/documentation.html#topicconfigs) for more details.+Pass other topic configurations to the topic properties. Refer to [Topic-Level Configs](https://kafka.apache.org/39/configuration/topic-level-configs/) for more details.### Topic Operationsdiff --git a/docs/migration-guide.md b/docs/migration-guide.mdindex c499c61307..18c7e9b01f 100644--- a/docs/migration-guide.md+++ b/docs/migration-guide.md@@ -69,6 +69,79 @@ and shutdown steps in [Upgrade Gravitino](./how-to-upgrade.md) before applying twhole Kubernetes pod CIDR, lets those clients choose the recorded address again. See[HTTP Server](./gravitino-server-config.md#http-server).+### Kafka catalog client upgrade+- The Kafka catalog now ships the Kafka client 3.9.2 instead of 3.4.0. The `gravitino.bypass.`+ properties are passed to this client, so check them against the+ [Kafka Admin Configs](https://kafka.apache.org/39/configuration/admin-configs/).+- The Kafka catalog rejects `gravitino.bypass.config.providers` and every+ `gravitino.bypass.config.providers.*` property (for example `.class` and `.param.*`), each on its+ own. Kafka 3.5 added an environment variable config provider, and any provider can read the+ Gravitino server's own environment or files. In 1.3, the file and directory providers could be+ used through these properties. After the upgrade:+ - Creating, testing, or altering a catalog with any of them is rejected with an error that names+ them. This includes values from `kafka.conf` (`catalogs/kafka/conf/kafka.conf`, or+ `<package>/conf/kafka.conf` for a catalog with a custom `package` property), so one provider+ property in a `kafka.conf` file blocks the creation of every Kafka catalog that uses that file.+ - An existing catalog that still has any of them fails on schema and topic operations and on+ `testConnection` until they are removed.+- `kafka.conf` values are copied into the properties of each catalog when it is created. Editing+ or removing the file later does not change existing catalogs, which must be updated with+ `alterCatalog`.+- Before upgrading, while still on 1.3, take an inventory:+ 1. List every Kafka catalog and every `kafka.conf` file that has+ `gravitino.bypass.config.providers` or any `gravitino.bypass.config.providers.*` property.+ Check the default `catalogs/kafka/conf/kafka.conf` and the `<package>/conf/kafka.conf` of+ each Kafka catalog that sets a custom `package` property. Include catalogs that have only+ `gravitino.bypass.config.providers.*` keys: they must be removed even when nothing refers to+ them.+ 2. Read the provider aliases from `gravitino.bypass.config.providers`. Its value is a+ comma-separated list of aliases chosen by the operator, for example `file`, `env`, or+ `fileProvider`. For each alias, search the property values for `${<alias>:...}` references.+ Searching only for `${file:`, `${directory:`, or `${env:` misses custom aliases. See+ [Kafka configuration providers](https://kafka.apache.org/39/configuration/configuration-providers/).+ 3. For each reference, record the catalog property and whether it is a credential. For a+ non-sensitive setting, record the value it resolves to. For a credential, record the secret+ source or its locator (the provider and its attributes) instead of the value, so that no+ credential is copied into the inventory.+- Before starting the 2.0 server, update each `kafka.conf` file found in step 1:+ - Remove all provider properties.+ - Replace every non-sensitive `${<alias>:...}` reference with the value it resolved to, for+ example a timeout. Removing only the provider properties leaves the reference unresolved,+ and a new catalog inherits the literal `${...}` text. A numeric option such as+ `gravitino.bypass.request.timeout.ms` then fails to connect because the Kafka client cannot+ parse it. A string option such as `gravitino.bypass.metrics.context.region` is kept as the+ literal placeholder and a connection test can still succeed, so replace every reference even+ when the connection test passes.+ - Remove every credential-bearing setting from the file and bind it per catalog after the+ upgrade (see below). Keep only non-sensitive defaults in this file, because its values become+ catalog properties that can be returned by the REST API.+- After upgrading to 2.0, update each affected catalog with one `alterCatalog` call that removes+ all of its provider properties and replaces every reference. An `alterCatalog` call that leaves+ any provider property in place is rejected, including a comment-only change. Until this update,+ the catalog cannot run Kafka operations, so apply it right after the upgrade.+ - Set a non-sensitive value, such as a timeout, as a literal value.+ - Do not set a credential as a literal value. Bypass properties can be returned in plaintext by+ the REST API: Gravitino masks only keys that match the+ [sensitive key keywords](./gravitino-server-config.md#sensitive-property-key-matching). With+ the default keywords, a password inside `gravitino.bypass.sasl.jaas.config` is returned+ unchanged, while `gravitino.bypass.ssl.truststore.password` is masked. Changing+ `gravitino.secret.sensitiveKeyKeywords` replaces the default list, so check the server+ configuration. With a Gravitino secret provider configured, bind the whole property in the same+ call. Use `CatalogChange.setSecretBinding` (REST update type `setSecretBinding`) with a provider+ that supports versioned writes. With a provider that only builds external references, that call+ fails and leaves the catalog unable to run Kafka operations, so use+ `CatalogChange.setSecretReference` (REST update type `setSecretReference`) with an external+ secret that holds the whole property value. Use the locator recorded during the inventory.+ Neither `setSecretBinding` nor `setSecretReference` is available in the 1.3 client or REST API.+- The Kafka 3.9 client rejects `com.sun.security.auth.module.LdapLoginModule` in JAAS+ configurations by default. `JndiLoginModule` was already rejected by the 3.4 client. Check both+ the `sasl.jaas.config` of each Kafka catalog and the `KafkaClient` entry in the file named by the+ Gravitino JVM property `java.security.auth.login.config`, because a catalog without+ `sasl.jaas.config` falls back to that entry. Catalogs that use `LdapLoginModule` fail to connect+ after the upgrade, so switch them to another login module. Do not override the+ `org.apache.kafka.disallowed.login.modules` JVM property to re-enable it: the override replaces+ the default blocklist for every Kafka catalog in the Gravitino JVM, and everyone who can supply+ Kafka JAAS settings could then select the module.### Policies are selected through tags- Direct policy associations with metadata objects are no longer read or written at runtime.diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.tomlindex 706b064ab5..1b0e99f5d2 100644--- a/gradle/libs.versions.toml+++ b/gradle/libs.versions.toml@@ -113,6 +113,7 @@ metrics = "4.2.25"prometheus = "0.16.0"clickhouse = "0.7.1"lz4 = "1.8.0"+yawk-lz4-java = "1.11.4"snappy-java = "1.1.10.12"mysql = "8.0.33"postgresql = "42.7.14"@@ -121,7 +122,7 @@ selenium = "4.33.0"rauschig = "1.2.0"mybatis = "3.5.6"h2db = "2.2.224"-kafka = "3.4.0"+kafka = "3.9.2"curator = "2.12.0"awaitility = "4.2.1"servlet = "3.1.0"@@ -367,6 +368,7 @@ prometheus-dropwizard = { group = "io.prometheus", name = "simpleclient_dropwizaprometheus-servlet = { group = "io.prometheus", name = "simpleclient_servlet", version.ref = "prometheus" }clickhouse-driver = { group = "com.clickhouse", name = "clickhouse-jdbc", version.ref = "clickhouse" }lz4-java = { group = "org.lz4", name = "lz4-java", version.ref = "lz4" }+yawk-lz4-java = { group = "at.yawk.lz4", name = "lz4-java", version.ref = "yawk-lz4-java" }snappy-java = { group = "org.xerial.snappy", name = "snappy-java", version.ref = "snappy-java" }mysql-driver = { group = "mysql", name = "mysql-connector-java", version.ref = "mysql" }postgresql-driver = { group = "org.postgresql", name = "postgresql", version.ref = "postgresql" }diff --git a/licenses/bitshuffle.txt b/licenses/bitshuffle.txtnew file mode 100644index 0000000000..1365ed69b0--- /dev/null+++ b/licenses/bitshuffle.txt@@ -0,0 +1,21 @@+Bitshuffle - Filter for improving compression of typed binary data.++Copyright (c) 2014 Kiyoshi Masui ([email protected])++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.diff --git a/licenses/lz4.txt b/licenses/lz4.txtnew file mode 100644index 0000000000..88149ad881--- /dev/null+++ b/licenses/lz4.txt@@ -0,0 +1,56 @@+LZ4 native library and xxHash, bundled in lz4-java++LZ4 Library+Copyright (c) 2011-2020, Yann Collet+All rights reserved.++Redistribution and use in source and binary forms, with or without modification,+are permitted provided that the following conditions are met:++* Redistributions of source code must retain the above copyright notice, this+ list of conditions and the following disclaimer.++* Redistributions in binary form must reproduce the above copyright notice, this+ list of conditions and the following disclaimer in the documentation and/or+ other materials provided with the distribution.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++------------------------------------------------------------++xxHash - Fast Hash algorithm+Copyright (C) 2012-2016, Yann Collet++BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++* Redistributions of source code must retain the above copyright+notice, this list of conditions and the following disclaimer.+* Redistributions in binary form must reproduce the above+copyright notice, this list of conditions and the following disclaimer+in the documentation and/or other materials provided with the+distribution.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.diff --git a/licenses/snappy.txt b/licenses/snappy.txtnew file mode 100644index 0000000000..bd0e5971db--- /dev/null+++ b/licenses/snappy.txt@@ -0,0 +1,54 @@+Copyright 2011, Google Inc.+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++ * Redistributions of source code must retain the above copyright+notice, this list of conditions and the following disclaimer.+ * Redistributions in binary form must reproduce the above+copyright notice, this list of conditions and the following disclaimer+in the documentation and/or other materials provided with the+distribution.+ * Neither the name of Google Inc. nor the names of its+contributors may be used to endorse or promote products derived from+this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++===++Some of the benchmark data in testdata/ is licensed differently:++ - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and+ is licensed under the Creative Commons Attribution 3.0 license+ (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/+ for more information.++ - kppkn.gtb is taken from the Gaviota chess tablebase set, and+ is licensed under the MIT License. See+ https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1+ for more information.++ - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper+ “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA+ Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro,+ which is licensed under the CC-BY license. See+ http://www.ploscompbiol.org/static/license for more ifnormation.++ - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project+ Gutenberg. The first three have expired copyrights and are in the public+ domain; the latter does not have expired copyright, but is still in the+ public domain according to the license information+ (http://www.gutenberg.org/ebooks/53).diff --git a/licenses/zstd-native.txt b/licenses/zstd-native.txtnew file mode 100644index 0000000000..35df699ce8--- /dev/null+++ b/licenses/zstd-native.txt@@ -0,0 +1,32 @@+Zstandard native library, bundled in zstd-jni++BSD License++For Zstandard software++Copyright (c) 2016-present, Facebook, Inc. All rights reserved.++Redistribution and use in source and binary forms, with or without modification,+are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright notice, this+ list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above copyright notice,+ this list of conditions and the following disclaimer in the documentation+ and/or other materials provided with the distribution.++ * Neither the name Facebook nor the names of its contributors may be used to+ endorse or promote products derived from this software without specific+ prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.