You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The health checks for our container calls the /docs endpoint. But because we setup FastAPI with oauth2 backend, the checks fail with the following log entries:
INFO: [25-04-2024 16:17:34] 127.0.0.1:54476 - "GET /docs HTTP/1.1" 200 OK
ERROR [regtech_api_commons.oauth2.oauth2_backend] failed to get claims
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/regtech_api_commons/oauth2/oauth2_backend.py", line 27, in authenticate
token = await self.token_bearer(conn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/fastapi/security/oauth2.py", line 588, in __call__
raise HTTPException(
fastapi.exceptions.HTTPException: 401: Not authenticated
Figure out a way to allow the check to continue to respond so the container knows it's healthy, but not spam the logs with these 401 errors.
The text was updated successfully, but these errors were encountered:
Can we just not have /docs require auth? Doesn't seem like it should anyway.
The odd thing is the call to /docs gets a 200, so it seems like it isn't authenticating on that url. And the /docs in the cluster doesn't require you to be authenticated. However, after every call to it, you get that oauth2_backend exception, and I'm not sure why. Those exceptions always go hand in hand with the /docs, every 10 seconds.
The health checks for our container calls the /docs endpoint. But because we setup FastAPI with oauth2 backend, the checks fail with the following log entries:
Figure out a way to allow the check to continue to respond so the container knows it's healthy, but not spam the logs with these 401 errors.
The text was updated successfully, but these errors were encountered: