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


##########
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:
   `CatalogChange.setSecretBinding` is unavailable in the 1.3 Java client and 
REST API. Please separate the pre-upgrade inventory from the 2.0 credential 
update. I verified that on 2.0, with a Gravitino secret provider configured, 
one `alterCatalog` call can remove the Kafka provider keys and bind the full 
`gravitino.bypass.sasl.jaas.config` value. `testConnection` then authenticated 
successfully. Catalogs still using those keys will be unavailable for Kafka 
operations between the upgrade and that update. [Gravitino 1.3.1 catalog update 
API](https://github.com/apache/gravitino/blob/v1.3.1/common/src/main/java/org/apache/gravitino/dto/requests/CatalogUpdateRequest.java#L36-L47)



##########
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:
   Please qualify “returns bypass properties unmasked” here and in the 
migration guide. On the same catalog with default settings, an ordinary GET 
returned a literal `gravitino.bypass.sasl.jaas.config` unchanged, but masked a 
literal `gravitino.bypass.ssl.truststore.password` as `******`. The warning can 
say that bypass properties **can** be returned in plaintext and keep the JAAS 
example.



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