yuseok89 commented on code in PR #60392:
URL: https://github.com/apache/airflow/pull/60392#discussion_r2682533899


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_connections.py:
##########
@@ -58,6 +58,48 @@ def test_hook_meta_data(self, test_client):
                 },
                 {"secret_key": "***", "extra_fields": "test-extra_fields", 
"password": "***"},
             ),
+            (
+                {
+                    "auth_type": {
+                        "value": "oauth2",
+                        "schema": {
+                            "type": ["string", "null"],
+                            "title": "Auth Type",
+                        },
+                        "description": "Authentication type: 'basic' (default) 
| 'oauth2'",
+                        "source": None,
+                    },
+                    "access_token": {  # sensitive field
+                        "value": "oauth2-bearer-token",
+                        "schema": {
+                            "type": ["string", "null"],  # Optional field
+                            "title": "Access Token",
+                        },
+                        "description": "OAuth 2 bearer (one-hour).",
+                        "source": None,
+                    },
+                },
+                {
+                    "auth_type": {
+                        "value": "oauth2",
+                        "schema": {
+                            "type": ["string", "null"],
+                            "title": "Auth Type",
+                        },
+                        "description": "Authentication type: 'basic' (default) 
| 'oauth2'",
+                        "source": None,
+                    },
+                    "access_token": {  # sensitive field - masked but 
schema.type preserved
+                        "value": "***",
+                        "schema": {
+                            "type": ["string", "null"],  # Should be preserved
+                            "title": "***",
+                        },
+                        "description": "***",

Review Comment:
   Thanks for the review!
   
   I initially misunderstood the previous implementation - I thought it was 
intentionally masking everything (including schema.title and description) and 
accidentally masked schema.type as well. However, only the `value` field should 
be masked for sensitive fields.
   
   I'll update the code to mask only the `value` field.
   
   Thanks for catching this!



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