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


##########
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:
   @jason810496
   I've updated the implementation.
   The code now masks only the `value` field for sensitive fields in param spec 
structures, preserving schema.type, schema.title, and description.
   
   Could you please take another look when you have a chance?
   Thanks!



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