mtsadler-branch opened a new issue, #40704:
URL: https://github.com/apache/airflow/issues/40704

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   v2.8.4
   
   ### What happened?
   
   My task was decorated with `@task(multiple_outputs=True)` and had `return 
{"password": "abc"}`.
   
   `password`'s value is exposed in clear-text in the XCOM tab of Airflow UI.
   
   ### What you think should happen instead?
   
   XCOM Keys matching `core.sensitive_var_conn_names` should mask their 
associated Values in `XCOM Tab` of Airflow Task
   
   ### How to reproduce
   
   ```
   from datetime import datetime
   
   from airflow.decorators import dag, task
   from airflow.operators.empty import EmptyOperator
   
   
   @dag(
       dag_id="test_xcom_output",
       description="Test XCOM Output from Airflow Task",
       schedule_interval=None,
       start_date=datetime(2023, 4, 19),
       tags=["type_adhoc"],
       catchup=False,
   )
   def test_xcom_output():
       start_task = EmptyOperator(
           task_id="start_task",
       )
       end_task = EmptyOperator(
           task_id="end_task",
       )
       @task(multiple_outputs=True)
       def verify_dag_run_params(
           conn_id: str,
       ):
           """
           Parse password from Airflow Connection.
   
           Args:
               conn_id: The SFTP Connection ID to use.
           Returns:
               A dictionary containing SFTP connection details.
           """
           from airflow.exceptions import AirflowException
           from airflow.models import Connection
   
           sftp_conn = Connection.get_connection_from_secrets(conn_id=conn_id)
           password = sftp_conn.password
           return {
               "conn_id": conn_id,
               "password": password,
           }
       verify_dag_run_params_task = verify_dag_run_params(
           conn_id="sftp_conn",
       )
   
       start_task >> verify_dag_run_params_task >> end_task
   
   
   dag = test_xcom_output()
   ```
   
   ### Operating System
   
   Mac OS Sonoma
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   `docker compose` built `FROM 
apache/airflow@sha256:64e58748b6b970400d097d9e8a47dd4a3470cfe3c210edde466a15cfd22a70c0`
   
   ### Anything else?
   
   Appears that all XCOM values are cleartext
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]

Reply via email to