kaxil commented on code in PR #43767:
URL: https://github.com/apache/airflow/pull/43767#discussion_r1831858501


##########
airflow/api_fastapi/execution_api/schemas.py:
##########
@@ -119,3 +119,30 @@ class TIHeartbeatInfo(BaseModel):
 
     hostname: str
     pid: int
+
+
+class ConnectionResponse(BaseModel):
+    """Connection serializer for responses."""
+
+    conn_id: str
+    conn_type: str
+    description: str | None
+    host: str | None
+    schema_: str | None = Field(alias="schema")
+    login: str | None
+    password: str | None
+    port: int | None
+    extra: str | None
+
+    # Ignoring is_encrypted & is_extra_encrypted for now -- don't think we 
need them
+    # is_encrypted: bool
+    # is_extra_encrypted: bool
+
+
+class TIToken(BaseModel):
+    """Task Identity Token."""
+
+    task_id: str
+    dag_id: str
+    allowed_connections: list[str]
+    """List of allowed connection IDs for the task"""

Review Comment:
   This is just temporary, the final version of how what will be encoded in the 
JWT token might look different when we add authz (future work) but putting this 
right now allows minimizing changes for Connection, Variable and XCom access 
code later on!



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