apache / apache/airflow

Enhance impersonation on Restful API

Open
#16,398 3 comments 0 reactions 0 assignees View on GitHub
area:API area:core kind:feature
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

**Description**
I would like one parameter in the REST API configuration object (we can reuse the existing `run_as_user` maybe) to allow me trigger a DAG as an authenticated as long as this "superuser" has a role/policy that allows to impersonate other users.

**Use case / motivation**
I want to build a task system that submits tasks to Airflow (along with other tools we use, in a SSO way). Users will be authenticated previously when logging to this tasks system and should be able to trigger DAGs. This DAGs have to run AS the user. WEBHDFS (Apache HDFS restful api) achieves something [similar](https://hadoop.apache.org/docs/r1.0.4/webhdfs.html#ProxyUsers).

**Are you willing to submit a PR?**
I would indeed! It might just take some time since I am fairly new to Airflow

**Related Issues**
Yes: https://github.com/apache/airflow/issues/982

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the REST API configuration object and the existing run_as_user behavior, then read related issue #982. Define how an authenticated superuser's impersonation policy should authorize DAG triggers and how the target user's identity should be applied. Done means the configuration and permission behavior are specified and covered by appropriate API tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.