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
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/guilhem/UPSILON/23038-TouIST/23038-API/venv/lib/python3.10/site-packages/keycloak/keycloak_openid.py", line 486, in certs
return raise_error_from_response(data_raw, KeycloakGetError)
File "/home/guilhem/UPSILON/23038-TouIST/23038-API/venv/lib/python3.10/site-packages/keycloak/exceptions.py", line 192, in raise_error_from_response
raise error(
keycloak.exceptions.KeycloakGetError: 404: b'404 page not found\n'
Steps to reproduce:
$ python3
Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license"for more information.
>>> from keycloak import KeycloakOpenID
>>> keycloak_ = KeycloakOpenID(server_url = "http://localhost/auth", realm_name = "realm", client_id = "client", client_secret_key = "TheSecret")
>>> config_well_known = keycloak_.well_known()
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/home/guilhem/UPSILON/23038-TouIST/23038-API/venv/lib/python3.10/site-packages/keycloak/keycloak_openid.py", line 252, in well_known
return raise_error_from_response(data_raw, KeycloakGetError)
File "/home/guilhem/UPSILON/23038-TouIST/23038-API/venv/lib/python3.10/site-packages/keycloak/exceptions.py", line 192, in raise_error_from_response
raise error(
keycloak.exceptions.KeycloakGetError: 404: b'404 page not found\n'
>>> certs = keycloak_.certs()
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/home/guilhem/UPSILON/23038-TouIST/23038-API/venv/lib/python3.10/site-packages/keycloak/keycloak_openid.py", line 486, in certs
return raise_error_from_response(data_raw, KeycloakGetError)
File "/home/guilhem/UPSILON/23038-TouIST/23038-API/venv/lib/python3.10/site-packages/keycloak/exceptions.py", line 192, in raise_error_from_response
raise error(
keycloak.exceptions.KeycloakGetError: 404: b'404 page not found\n'
>>>
I've done some code digging and it seems it's the urljoin that causes the relative path to be stripped. What I've done is suffixed the server_url with /. Here is an example:
Architecture :
I have a keycloak configured behind a reverse proxy (traefik) to the path /auth
requirements.txt
I'm trying to follow the docs: https://python-keycloak.readthedocs.io/en/latest/modules/openid_client.html#get-certs
I got this error:
Steps to reproduce:
compose.yaml
keycloak.env
The text was updated successfully, but these errors were encountered: