You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dstandish (via GitHub)" <gi...@apache.org> on 2025/04/19 09:01:00 UTC
[I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
dstandish opened a new issue, #49453:
URL: https://github.com/apache/airflow/issues/49453
### Body
API swagger gives you 401 not authenticated with this combination...
```
export AIRFLOW__CORE__AUTH_MANAGER=airflow.api_fastapi.auth.managers.simple.simple_auth_manager.SimpleAuthManager
export AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_ALL_ADMINS=True
```
### Committer
- [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
--
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on issue #49453:
URL: https://github.com/apache/airflow/issues/49453#issuecomment-2822935802
reference comment that I found useful to add token to header in a middleware - https://github.com/fastapi/fastapi/issues/2727#issuecomment-770202019
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on issue #49453:
URL: https://github.com/apache/airflow/issues/49453#issuecomment-2820103492
@dstandish , including jwt token is mandatory even when AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_ALL_ADMINS is set to True. In this case, we need to get the token from `/auth/token` and use it
@pierrejeambrun , what do you think of extending `OAuth2PasswordBearer` to include additional case where we allow users to make API calls without auth header only when using SAM with AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_ALL_ADMINS=True?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on issue #49453:
URL: https://github.com/apache/airflow/issues/49453#issuecomment-2819733823
Ah, I think you were talking about the API calls. I can see that API calls are returning 401.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed issue #49453: Swagger gives 401 unauthenticated with SimpleAuthManager
URL: https://github.com/apache/airflow/issues/49453
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #49453:
URL: https://github.com/apache/airflow/issues/49453#issuecomment-2820679117
Why not, we can always extend the auth scheme to add handle this.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on issue #49453:
URL: https://github.com/apache/airflow/issues/49453#issuecomment-2819729978
@dstandish , I am unable to replicate this issue. I've used breeze and have set the env vars you mentioned, and I can still access it:


--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on issue #49453:
URL: https://github.com/apache/airflow/issues/49453#issuecomment-2820807415
We already have a open issue for this https://github.com/apache/airflow/issues/47582
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Swagger gives 401 unauthenticated with SimpleAuthManager [airflow]
Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on issue #49453:
URL: https://github.com/apache/airflow/issues/49453#issuecomment-2822925837
After thinking this through, Easy way seems to be to just add a middleware that's going to generate the token for the anonymous user we created when simple_auth_manager_all_admins is set to True
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org