We've set up Airflow 2.3.3 to authenticate users against Azure AD by means of OAuth-2.
So our webserver_config.py
holds AUTH_TYPE = AUTH_OAUTH
and an OAuth provider.
Authenticating users in Airflow's web GUI works perfectly fine.
Now we'd like to use Airflow's Rest-API (e.g. in order to schedule runs).
The official documentation is a bit unclear to me, though. It says:
Authentication for the API is handled separately to the Web Authentication. The default is to check the user session
I'd like to avoid using Basic Auth only for our API calls, but instead also use authentication via OAUTH for our API calls. So it's fine to have the API backend check the current user session.
But - how do we create this user session prior to our API calls?
Any examples for bash / cURL / python are appreciated.