Authentication failure with Helmholtz AAI in Cat4KIT-UI
We are experiencing an issue where authentication via Helmholtz AAI in the Cat4KIT-UI is failing regardless of whether the user is a member of Cat4KIT-VO. This issue prevents all users from accessing the system using Helmholtz AAI credentials.
Error message:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
response = get_response(request)
File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 55, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 103, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/django/contrib/auth/mixins.py", line 107, in dispatch
if not self.has_permission():
File "/usr/local/lib/python3.10/site-packages/django_helmholtz_aai/views.py", line 252, in has_permission
userinfo = self.userinfo
File "/usr/local/lib/python3.10/site-packages/django/utils/functional.py", line 57, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/app/cat4kit-ui-backend-dashboard/account/api.py", line 184, in userinfo
request=self.request, token=self.token
File "/usr/local/lib/python3.10/site-packages/django/utils/functional.py", line 57, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/app/cat4kit-ui-backend-dashboard/account/api.py", line 178, in token
return self.oauth.helmholtz.authorize_access_token(self.request)
File "/usr/local/lib/python3.10/site-packages/authlib/integrations/django_client/apps.py", line 82, in authorize_access_token
token = self.fetch_access_token(**params, **kwargs)
File "/usr/local/lib/python3.10/site-packages/authlib/integrations/base_client/sync_app.py", line 342, in fetch_access_token
token = client.fetch_token(token_endpoint, **params)
File "/usr/local/lib/python3.10/site-packages/authlib/oauth2/client.py", line 211, in fetch_token
return self._fetch_token(
File "/usr/local/lib/python3.10/site-packages/authlib/oauth2/client.py", line 368, in _fetch_token
return self.parse_response_token(resp)
File "/usr/local/lib/python3.10/site-packages/authlib/oauth2/client.py", line 344, in parse_response_token
raise self.oauth_error_class(
Exception Type: OAuthError at /api/helmholtz-aai/auth/
Exception Value: invalid_client: Client authentication failed; not authenticated
This issue has been verified with multiple user accounts to ensure it's not isolated to a single account. Configuration settings for OAuth and relevant logs can be provided upon request for further analysis.