mchades commented on code in PR #14963:
URL: https://github.com/apache/gravitino/pull/14963#discussion_r4561837928
##########
docs/kafka-catalog.md:
##########
@@ -20,8 +20,17 @@ 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/documentation.html#adminclientconfigs) for
more details) | (none) | No |
+
+The Kafka catalog does not accept the Kafka config provider properties
`gravitino.bypass.config.providers`
+and `gravitino.bypass.config.providers.*` (for example
`gravitino.bypass.config.providers.file.class`).
+They would let a catalog resolve `${env:...}`, `${file:...}`, or
`${directory:...}` references from the
+Gravitino server's own environment and files. A catalog that sets them,
whether in the create-catalog
+request or in `catalogs/kafka/conf/kafka.conf`, fails to connect and
`testConnection` returns an
+error naming the rejected properties. Put the literal value in the catalog
property instead.
Review Comment:
Please limit the literal-value advice here and in the migration guide to
non-sensitive settings. I verified that putting a SASL/PLAIN password in
`gravitino.bypass.sasl.jaas.config` makes the ordinary catalog GET return the
entire JAAS string, including the password. On 2.0 with a configured Gravitino
secret provider, `CatalogChange.setSecretBinding` on the whole JAAS property
kept the GET response masked and `testConnection` still authenticated to the
broker.
##########
docs/migration-guide.md:
##########
@@ -28,6 +28,26 @@ existing deployments. For database backup, schema scripts,
and rollback commands
whole 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/documentation.html#adminclientconfigs).
+- The Kafka catalog rejects `gravitino.bypass.config.providers` and
`gravitino.bypass.config.providers.*`
+ (for example `.class` and `.param.*`), including when they come from
+ `catalogs/kafka/conf/kafka.conf`. Kafka 3.9 adds an environment variable
provider, and any
+ provider can read the Gravitino server's own environment or files. A catalog
that still sets
+ them fails on schema and topic operations and on `testConnection`, with an
error that names the
+ rejected properties. In 1.3, the file and directory providers could be used
this way.
+- Before upgrading, find Kafka catalogs and `kafka.conf` entries that use
these properties or
+ `${file:...}`, `${directory:...}`, or `${env:...}` references. Remove the
provider properties and
+ set the resolved value directly, for example with `alterCatalog`. Direct
values in
+ `gravitino.bypass.` properties can be returned in plaintext by the REST API,
see
+ [Catalog properties](./gravitino-server-config.md#catalog-properties).
+- The Kafka 3.9 client rejects `com.sun.security.auth.module.JndiLoginModule`
and
+ `com.sun.security.auth.module.LdapLoginModule` in `sasl.jaas.config` by
default. Catalogs that
Review Comment:
Please include the Gravitino JVM’s `KafkaClient` entry in
`java.security.auth.login.config` in the upgrade check. I verified that with no
catalog `sasl.jaas.config`, 3.4.0 accepts `LdapLoginModule` from that file and
3.9.2 rejects it. `JndiLoginModule` was already blocked by default in 3.4.0. An
operator checking only catalog properties would miss the LDAP change.
##########
docs/migration-guide.md:
##########
@@ -28,6 +28,26 @@ existing deployments. For database backup, schema scripts,
and rollback commands
whole 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/documentation.html#adminclientconfigs).
+- The Kafka catalog rejects `gravitino.bypass.config.providers` and
`gravitino.bypass.config.providers.*`
+ (for example `.class` and `.param.*`), including when they come from
+ `catalogs/kafka/conf/kafka.conf`. Kafka 3.9 adds an environment variable
provider, and any
+ provider can read the Gravitino server's own environment or files. A catalog
that still sets
+ them fails on schema and topic operations and on `testConnection`, with an
error that names the
+ rejected properties. In 1.3, the file and directory providers could be used
this way.
+- Before upgrading, find Kafka catalogs and `kafka.conf` entries that use
these properties or
+ `${file:...}`, `${directory:...}`, or `${env:...}` references. Remove the
provider properties and
+ set the resolved value directly, for example with `alterCatalog`. Direct
values in
+ `gravitino.bypass.` properties can be returned in plaintext by the REST API,
see
+ [Catalog properties](./gravitino-server-config.md#catalog-properties).
+- The Kafka 3.9 client rejects `com.sun.security.auth.module.JndiLoginModule`
and
+ `com.sun.security.auth.module.LdapLoginModule` in `sasl.jaas.config` by
default. Catalogs that
+ use either module fail to connect after the upgrade. Switch to another login
module. If you
+ cannot, set the JVM system property
`org.apache.kafka.disallowed.login.modules` on the Gravitino
+ server to the modules you still want to block; see the Kafka documentation
for its semantics.
Review Comment:
This override replaces the default blocklist for every Kafka catalog in the
Gravitino JVM. Re-enabling `LdapLoginModule` for one catalog also lets other
users with `CREATE_CATALOG` select it through `testConnection` and supply an
LDAP URL. Please omit the override as a migration step or explain that it
requires trusting everyone who can supply Kafka JAAS settings. [Kafka security
advisory](https://kafka.apache.org/community/cve-list/#CVE-2025-27818)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]