geyanggang commented on code in PR #14963: URL: https://github.com/apache/gravitino/pull/14963#discussion_r4582761892
########## docs/migration-guide.md: ########## @@ -28,6 +28,50 @@ 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. In 1.3, the file and + directory providers could be used through these properties. After the upgrade, creating or + altering a catalog with them is rejected, and an existing catalog that still has them fails on + schema and topic operations and on `testConnection`, with an error that names the rejected + properties, until it is updated. +- Before upgrading, while still on 1.3, take an inventory: + 1. List the Kafka catalogs and the `kafka.conf` entries that set `gravitino.bypass.config.providers`. + Its value is a comma-separated list of provider aliases chosen by the operator, for example + `file`, `env`, or `fileProvider`. + 2. For each alias, search the property values of that catalog 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. Record the value each reference resolves to, and whether it is a credential. +- After upgrading to 2.0, update each affected catalog with one `alterCatalog` call that removes + the 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 + [sensitive key keywords](./gravitino-server-config.md#sensitive-property-key-matching), so a + password inside `gravitino.bypass.sasl.jaas.config` is returned unchanged. With a Gravitino + secret provider configured, bind the whole property with `CatalogChange.setSecretBinding` + (REST update type `setSecretBinding`) in the same call. `setSecretBinding` is not available in + the 1.3 client or REST API. + - In `kafka.conf`, remove the provider properties and write the resolved values before starting + the 2.0 server. Values from this file are not stored as catalog properties, so restrict access Review Comment: You're right, and my earlier statement that `kafka.conf` values are not stored was wrong. `CatalogManager.createCatalog` stores the result of `buildCatalogConf`, which merges `kafka.conf` into the request properties, and later loads do not read the file again. The migration guide no longer suggests writing resolved credentials into `kafka.conf`. It now says the file is copied into each catalog at creation, that editing it does not change existing catalogs, to keep only non-sensitive defaults there, and to bind credentials per catalog. The caution block in `kafka-catalog.md` says the same. ########## docs/migration-guide.md: ########## @@ -28,6 +28,50 @@ 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. In 1.3, the file and + directory providers could be used through these properties. After the upgrade, creating or + altering a catalog with them is rejected, and an existing catalog that still has them fails on + schema and topic operations and on `testConnection`, with an error that names the rejected + properties, until it is updated. +- Before upgrading, while still on 1.3, take an inventory: + 1. List the Kafka catalogs and the `kafka.conf` entries that set `gravitino.bypass.config.providers`. Review Comment: Updated. The inventory now covers any `gravitino.bypass.config.providers.*` key on its own, says such keys must be removed even when no aliases or references exist, and notes that one provider key in `kafka.conf` blocks creating every Kafka catalog. This matches the code: each key is checked independently. ########## docs/kafka-catalog.md: ########## @@ -76,7 +95,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 Configs](https://kafka.apache.org/39/documentation.html#topicconfigs) for more details. Review Comment: Fixed. Both Kafka links now point directly to the 3.9 pages: [Topic-Level Configs](https://kafka.apache.org/39/configuration/topic-level-configs/) and [Admin Configs](https://kafka.apache.org/39/configuration/admin-configs/), the latter in both `kafka-catalog.md` and the migration guide. Both return 200. -- 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]
