geyanggang commented on code in PR #14963:
URL: https://github.com/apache/gravitino/pull/14963#discussion_r4563323987


##########
docs/migration-guide.md:
##########
@@ -28,6 +28,32 @@ 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.5 added an environment variable 
config 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`. This is 
only suitable for
+  non-sensitive settings: the REST API returns `gravitino.bypass.` properties 
unmasked, so do not
+  put a password, such as in `gravitino.bypass.sasl.jaas.config`, in as 
plaintext. If a Gravitino
+  secret provider is configured, bind such a property with 
`CatalogChange.setSecretBinding`. See

Review Comment:
   Agreed. The migration guide now separates the 1.3 inventory (read the 
aliases, find the references, record the resolved values) from the 2.0 update: 
one `alterCatalog` call that removes the provider keys and replaces the 
references, using `setSecretBinding` (not in the 1.3 client or REST API) for 
credentials. It also states that the catalog cannot run Kafka operations until 
that update, so it should be applied right after the upgrade.



##########
docs/kafka-catalog.md:
##########
@@ -20,8 +20,21 @@ 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. For non-sensitive settings, put the 
literal value in the
+catalog property instead. Do not put credentials, such as a SASL password in
+`gravitino.bypass.sasl.jaas.config`, as plaintext: the catalog REST API 
returns bypass properties
+unmasked. If a Gravitino secret provider is configured, bind such a property 
with

Review Comment:
   Qualified in both places. I checked the code: `properties()` masks only keys 
matching `gravitino.secret.sensitiveKeyKeywords` (default includes `password`), 
which is why `ssl.truststore.password` is masked and `sasl.jaas.config` is not. 
The docs now say bypass properties **can** be returned in plaintext, link the 
sensitive key matching section, and keep the JAAS example.



##########
docs/kafka-catalog.md:
##########
@@ -20,8 +20,21 @@ 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. For non-sensitive settings, put the 
literal value in the

Review Comment:
   Split as suggested: a short paragraph for the rejected keys and failure 
behavior, a titled `:::caution Credentials in bypass properties` block, and the 
migration link on its own.



##########
docs/migration-guide.md:
##########
@@ -28,6 +28,32 @@ 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.5 added an environment variable 
config 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

Review Comment:
   Updated. The inventory step now tells operators to read the aliases from 
`gravitino.bypass.config.providers` and search for `${<alias>:...}`, and notes 
that searching only for `file`, `directory` or `env` misses custom aliases, 
with the Kafka config providers link.



##########
docs/gravitino-server-config.md:
##########
@@ -741,7 +741,8 @@ 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.
+system untouched, except where a catalog documents rejected properties, such 
as the Kafka config

Review Comment:
   Reworded to "Gravitino forwards `gravitino.bypass.` properties to the 
underlying system unless the catalog rejects them." and moved the Kafka example 
after the sentence about stored properties.



-- 
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]

Reply via email to