Repository navigation
Mask XCom values in the audit log - #73791
Conversation
cc33bdc to
fba6f3e
Compare
The audit log masks the value of Variable and Connection writes unconditionally, because it records that something was written rather than what. XCom create and update requests fell through to per-key name redaction, so their values were stored in the audit log as sent. Mask the XCom value the same way; the key and map index are kept. Generated-by: Claude Opus 5
Generated-by: Claude Opus 5
Replacing the path/query context with the request body dropped xcom_key, so an update_xcom_entry row no longer said which XCom was changed. Generated-by: Claude Opus 5
fba6f3e to
375103c
Compare
|
@amoghrajesh @pierrejeambrun Rebased on main to resolve a conflict. Could one of you review it for 3.4.0 (cut 2026-10-19)? |
There was a problem hiding this comment.
The change looks correct to me. The earlier concern about the XCom branch dropping the path/query context is fixed, since the masked body is now merged into extra_fields, and the PATCH test asserts xcom_key is kept. GET and DELETE have no body and no value key, so their audit entries are unchanged. Could use reviews from @amoghrajesh @pierrejeambrun before merging.
Backport successfully created: v3-4-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
* Mask XCom values in the audit log The audit log masks the value of Variable and Connection writes unconditionally, because it records that something was written rather than what. XCom create and update requests fell through to per-key name redaction, so their values were stored in the audit log as sent. Mask the XCom value the same way; the key and map index are kept. Generated-by: Claude Opus 5 * Add newsfragment Generated-by: Claude Opus 5 * Keep the targeted XCom in the audit log when an update has a body Replacing the path/query context with the request body dropped xcom_key, so an update_xcom_entry row no longer said which XCom was changed. (cherry picked from commit a26eb12) Generated-by: Claude Opus 5 Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
* Mask XCom values in the audit log The audit log masks the value of Variable and Connection writes unconditionally, because it records that something was written rather than what. XCom create and update requests fell through to per-key name redaction, so their values were stored in the audit log as sent. Mask the XCom value the same way; the key and map index are kept. Generated-by: Claude Opus 5 * Add newsfragment Generated-by: Claude Opus 5 * Keep the targeted XCom in the audit log when an update has a body Replacing the path/query context with the request body dropped xcom_key, so an update_xcom_entry row no longer said which XCom was changed. (cherry picked from commit a26eb12) Generated-by: Claude Opus 5 Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
The audit log masks the value of Variable and Connection writes unconditionally, because it records that something was written rather than what. XCom create and update requests fell through to per-key name redaction, so their values were stored in the audit log as sent. This masks the XCom value the same way; the key and map index are kept. Adds unit tests for the masker and route tests asserting the stored audit entry for create and update carries
"value": "***".🤖 Generated with Claude Code