-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Open
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIarea:authkind:featureFeature RequestsFeature Requestsneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
Description
Description
The Execution API has authentication but no authorization - tasks can access ANY variable, connection, or XCom. Three TODO placeholders need implementation to enforce team-based access control.
Use case/motivation
Security Problem: Any authenticated task can currently access resources from any team because has_variable_access(), has_connection_access(), and has_xcom_access() always return True.
What I want to achieve:
- Tasks should only access variables/connections from their DAG's team
- Tasks should only access XComs from their own DAG run
- Proper authorization checks in Execution API (similar to Core API)
Affected files:
airflow/api_fastapi/execution_api/routes/variables.py:40airflow/api_fastapi/execution_api/routes/connections.py:35airflow/api_fastapi/execution_api/routes/xcoms.py:50
Proposed solution:
- Extract task's DAG from JWT token
- Verify resource's team matches DAG's team
- Allow global resources (no team)
- Backward compatible with feature flag
Benefits:
- Security: Resource isolation
- Multi-team: Team boundaries enforced
- Compliance: Audit trail for access
Related issues
No
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIarea:authkind:featureFeature RequestsFeature Requestsneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet