sjyangkevin commented on code in PR #63161:
URL: https://github.com/apache/airflow/pull/63161#discussion_r2902741633
##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/connections.py:
##########
@@ -60,8 +60,7 @@ def redact_extra(cls, v: str | None) -> str | None:
redacted_dict = redact(extra_dict)
return json.dumps(redacted_dict)
except json.JSONDecodeError:
- # we can't redact fields in an unstructured `extra`
- return v
+ return "***"
Review Comment:
Thanks for proposing the fix. Just have some feedback about the approach.
The issue we are trying to solve is to redact credentials if it contains some
secrets. However, hard-code the return value might redact everything even that
is not a secret
I also wonder if we should have a deeper look on whether `extra` can be an
non-json serializable object; even if it is possible, if it just a string,
probably there is no way to distinguish what type of information is being set,
unlike can infer from key-value pair.
--
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]