deepak4babu commented on issue #53103:
URL: https://github.com/apache/airflow/issues/53103#issuecomment-3297111634

   Facing same issue in 3.0.4. Not working with basic_auth also.
   
   sample code:
   ```python
   import requests
   import base64
   
   airflow_url = "*********"
   auth = base64.b64encode(b"admin:********").decode()
   a = requests.get(url=f"http://{airflow_url}/auth/fab/v1/roles";, 
headers={"Authorization": f"Basic {auth}"})
   ```
   Response is 
   ```
   {'_content': b'{\n  "detail": null,\n  "status": 401,\n  "title": 
"Unauthorized",\n  "type": 
"https://airflow.apache.org/docs/apache-airflow/3.0.4/stable-rest-api-ref.html#section/Errors/Unauthenticated"\n}\n',
 '_content_consumed': True, '_next': None, 'status_code': 401, 'headers': 
{'date': 'Tue, 16 Sep 2025 09:30:36 GMT', 'server': 'uvicorn', 'content-type': 
'application/problem+json', 'set-cookie': 'session=***************; 
Expires=Thu, 16 Oct 2025 09:30:37 GMT; HttpOnly; Path=/', 'vary': 
'Accept-Encoding', 'content-encoding': 'gzip', 'transfer-encoding': 'chunked'}, 
'raw': <urllib3.response.HTTPResponse object at 0x7f04e625a320>, 'url': 
'http://***********/auth/fab/v1/roles', 'encoding': None, 'history': [], 
'reason': 'Unauthorized', 'cookies': <RequestsCookieJar[Cookie(version=0, 
name='session', value='**************', port=None, port_specified=False, 
domain='**********', domain_specified=False, domain_initial_dot=False, 
path='/', path_specified=True, secure=False, expires=17
 60607037, discard=False, comment=None, comment_url=None, rest={'HttpOnly': 
None}, rfc2109=False)]>, 'elapsed': datetime.timedelta(microseconds=9239), 
'request': <PreparedRequest [GET]>, 'connection': 
<requests.adapters.HTTPAdapter object at 0x7f04e58271d0>}
   ```


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