damansingh1313 commented on issue #17802: URL: https://github.com/apache/iceberg/issues/17802#issuecomment-5444682366
Thanks for the guidance — since you mentioned a straight allowlist in the reader, here's what I'm thinking: a hardcoded list of allowed class names inside GenericAvroReader itself, checked before the DynClasses lookup. The one snag is Kafka Connect's classes (Event, StartCommit, etc.) live in a module core can't depend on, so those entries would have to be plain strings rather than real Class references — I'd add a comment cross-referencing Kafka Connect's existing FIELD_ID_TO_CLASS so the two don't silently drift apart if something gets renamed. The alternative would be threading the allowlist in as a parameter from each caller instead (ManifestFiles, Kafka Connect's AvroUtil) — no duplicated strings, but it touches those production call sites, which is exactly what you flagged as unnecessary if we can avoid it. I did look for a third way — e.g. Kafka Connect registering its own trusted classes into core at startup, so nobody has to hand-maintain a duplicate list — but couldn't find any existing pattern like that anywhere in the repo to build on, and inventing one felt like a bigger, more novel change than the fix itself deserves. Does the hardcoded-list approach sound right to you, or would you suggest a better way to implement this? -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
