Repository navigation
Conversation
…tables; add denied_deserialization_classes Airflow's built-in serde deserializers were allowed implicitly on top of [core] allowed_deserialization_classes, with no way to switch any of them off. DeltaTable and Iceberg Table deserialization opens the table or loads the catalog from the serialized values, so they are now opt-in and must be listed in allowed_deserialization_classes. The new [core] denied_deserialization_classes (glob list, default empty) rejects a class even when it is otherwise allowed, including the built-in serializers. Generated-by: Claude Code (Claude Opus 5)
…t change Generated-by: Claude Code (Claude Opus 5)
ashb
left a comment
There was a problem hiding this comment.
I'm unsure if this is the right/best fix.
I thought we used to have two forms of deserialization, one which was used on the worker, called simply deserialize, and then another one that was what the UI/API server used called orm_deserialize, the default impl of which was much simpler.
I.e. the full serde shouldn't run on the API server ever?
| stringifiers = serializers | ||
| # Deserializing loads the catalog from the serialized properties, so the class must be | ||
| # listed in ``[core] allowed_deserialization_classes`` rather than allowed implicitly. | ||
| allow_by_default = False |
There was a problem hiding this comment.
Nit: this is a constant, so should be treated as such?
| allow_by_default = False | |
| ALLOW_BY_DEFAULT = False |
|
You're partially right, thanks for pushing on this. The API server doesn't run the full serde for XCom any more: the XCom read path uses With those in, Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Airflow's built-in serde deserializers are allowed implicitly, on top of
[core] allowed_deserialization_classes, and there was no way to switch any of them off. This change:deltalake.table.DeltaTableandpyiceberg.table.Table. Deserializing them opens the table or loads the catalog from the serialized values, so they should be opt-in. Deployments that pass these objects through XCom add them to[core] allowed_deserialization_classes;[core] denied_deserialization_classes(glob list, default empty). A match is rejected even when the class is otherwise allowed, including the built-in serializers, so a deployment can disable any of them.Test plan:
task-sdk/tests/task_sdk/serde/test_serde.pycovering the default allow set, the two opt-in classes, deny-over-allow precedence and an empty deny listtest_serializers.pynow allow-list their classuv run --project task-sdk pytest task-sdk/tests/task_sdk/serdepasses locally (the k8s tests need the cncf provider installed)Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5) following the guidelines at
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions