phanikumv commented on issue #31873:
URL: https://github.com/apache/airflow/issues/31873#issuecomment-1590919316

   @NikitasB 
   
   Though you are using the same variable, you are using it differently in both 
the operators.
   
   The reason it is masked in `HttpSensor` is because of the word 
`access_token` which is a sensitive field as per Airflow.
   Please refer to below docs
   
   
https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/security/secrets/mask-sensitive-values.html#sensitive-field-names
   
   If you want to do the same for arguments field in KPO use case, then we can 
do it in 2 ways. Either at DAG level or deployment level.
   
   1.You can mask at DAG level by using a `mask_secret` method. Refer to 
   
   ```
   @task
   def my_func():
       from airflow.utils.log.secrets_masker import mask_secret
   
       mask_secret("custom_value")
   
       ...
   ```
   
   2.include it in the airflow config as below. (But then this change is 
applied across your deployment, ) 
   
   ```
   [core]
   sensitive_var_conn_names = arguments
   
   
   ```


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