OpenConext / OpenConext-myconext

A (guest) IdP for OpenConext
https://eduid.nl/
4 stars 7 forks source link

Handle oidcng being down #526

Closed phavekes closed 4 days ago

phavekes commented 4 days ago

This issue is imported from pivotal

If the oidcng tokens api is not avaiable, the mijn eduID website if not loading after login
2024-08-15T14:24:45.341424000Z 2024-08-15 14:24:45,340 ERROR [http-nio-8080-exec-9] myconext.api.DefaultErrorController:62 - Error occurred; class org.springframework.web.client.HttpServerErrorException$ServiceUnavailable org.springframework.web.client.HttpServerErrorException$ServiceUnavailable: 503 Service Unavailable: \'<html><body><h1>503 Service Unavailable</h1><EOL>No server is available to handle this request.<EOL></body></html><EOL>\'
2024-08-15T14:24:45.341538000Z org.springframework.web.client.HttpServerErrorException$ServiceUnavailable: 503 Service Unavailable: \'<html><body><h1>503 Service Unavailable</h1><EOL>No server is available to handle this request.<EOL></body></html><EOL>\'
2024-08-15T14:24:45.341591000Z  at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:112)
2024-08-15T14:24:45.341627000Z  at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:170)
2024-08-15T14:24:45.341661000Z  at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122)
2024-08-15T14:24:45.341694000Z  at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
2024-08-15T14:24:45.341735000Z  at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:825)
2024-08-15T14:24:45.341779000Z  at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:783)
2024-08-15T14:24:45.341818000Z  at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:717)
2024-08-15T14:24:45.341848000Z  at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:637)
2024-08-15T14:24:45.341882000Z  at myconext.oidcng.OpenIDConnectRemote.tokens(OpenIDConnectRemote.java:58)
2024-08-15T14:24:45.341914000Z  at myconext.api.UserController.tokens(UserController.java:691)
2024-08-15T14:24:45.341948000Z  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2024-08-15T14:24:45.341986000Z  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2024-08-15T14:24:45.342016000Z  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2024-08-15T14:24:45.342046000Z  at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Is the token endpoint is not available, log this as an ERROR, but display the UI as if no tokens were present

phavekes commented 4 days ago

(Peter Havekes - Aug 15, 2024)

phavekes commented 4 days ago

https://github.com/OpenConext/OpenConext-myconext/commit/6da9a924c3fa9eda265e1a60228a10fc4e7727df (inesduits - Aug 27, 2024)