bugraoz93 commented on code in PR #64219:
URL: https://github.com/apache/airflow/pull/64219#discussion_r2996809243


##########
airflow-core/src/airflow/api_fastapi/core_api/security.py:
##########
@@ -140,6 +140,13 @@ async def get_user(
         token_str = bearer_credentials.credentials
     elif oauth_token:
         token_str = oauth_token
+    elif request.headers.get("authorization"):

Review Comment:
   Shouldn't this be checking the value if it contains the `bearer` prefix 🤔 
   ```
   ENDPOINT_URL="http://localhost:8080";
   curl -X GET ${ENDPOINT_URL}/api/v2/dags \
     -H "Authorization: Bearer <JWT-TOKEN>"
   ```
   
https://airflow.apache.org/docs/apache-airflow/stable/security/api.html#example
   
   I think this only checks whether the `authorization` header has a value. If 
so, go into the conditional.



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