JanssenProject / JanssenProject/jans

fix(jans-fido2): pod fails to start when https://mds.fidoalliance.org/ is down or having rate-limits

Open
#14,329 0 comments 0 reactions 1 assignee Claimed by @moabu View on GitHub
comp-jans-fido2 kind-bug
Dominant language
Java
Stars
648
Forks
174
Avg merge
1d 18h
Merged PRs (30d)
110

Description

**Describe the bug**
The Pod does not start properly. All the endpoints give 503 response and the pod goes into restart mode.

**Expected behavior**
The pod should at least start up or give a proper message as to why the pod does not start up.

**Screenshots**

``` curl
curl -k https://mds.fidoalliance.org/ -v
* Host mds.fidoalliance.org:443 was resolved.
* IPv6: 2606:4700:20::681a:ad4, 2606:4700:20::ac43:44d5, 2606:4700:20::681a:bd4
* IPv4: 172.67.68.213, 104.26.11.212, 104.26.10.212
* Trying 172.67.68.213:443...
* Connected to mds.fidoalliance.org (172.67.68.213) port 443
* using HTTP/1.x
> GET / HTTP/1.1
> Host: mds.fidoalliance.org
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 429 Too Many Requests
< Date: Tue, 16 Jun 2026 09:15:48 GMT
< Content-Type: text/plain; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Server: cloudflare
< Cache-Control: public,max-age=300
< ETag: 259
< Set-Cookie: ARRAffinity=7bba8ff75d917e04579ec0c572755b5f34ebcf565d04592f367d277648232dd6;Path=/;HttpOnly;Secure;Domain=mds.fidoalliance.org
< Set-Cookie: ARRAffinitySameSite=7bba8ff75d917e04579ec0c572755b5f34ebcf565d04592f367d277648232dd6;Path=/;HttpOnly;SameSite=None;Secure;Domain=mds.fidoalliance.org
< Strict-Transport-Security: max-age=2592000
< X-Powered-By: ASP.NET
< cf-cache-status: DYNAMIC
< Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
< Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=HNvF9Yy7vRuSzPxbv7AvXYzu%2BN1ehrkp0AZyPmO4ZCytYR3ZFTjK9gV%2FNljwfpqYP%2ByalMqu133iJiZBVhhngnN2%2FnIc9hh1Ieyp24HkQ1hspPmYf4K697AUua0FyZrLxJ2BxWYq"}]}
< CF-RAY: a0c8b6499f1398f6-ARN
<
* Connection #0 to host mds.fidoalliance.org left intact
Too many requests. Try again later.

```
**Additional context**
Logs from the fido2 pods are below.

```
jans-fido2 - 16-06 09:01:33.971 INFO [main] [io.jans.fido2.service.mds.LocalMdsService] (LocalMdsService.java:65) - Populating metadata from /etc/jans/conf/fido2/server_metadata
jans-fido2 - 16-06 09:01:35.767 INFO [main] [io.jans.fido2.service.mds.TocService] (TocService.java:125) - Downloading the latest TOC from https://mds.fidoalliance.org/
jans-fido2 - 16-06 09:01:35.768 WARN [main] [org.eclipse.jetty.ee9.webapp.WebAppContext] (WebAppContext.java:538) - Failed startup of context oeje9w.WebAppContext@1290c49{jans-fido2,/jans-fido2,file:///opt/jetty/temp/jetty-0_0_0_0-8080-jans-fido2_war-_jans-fido2-any-9642497615679306268/webapp/,false}{/opt/jans/jetty/jans-fido2/webapps/jans-fido2.war}
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at io.jans.fido2.service.mds.TocService.fetchMetadata(TocService.java:127)
at io.jans.fido2.service.mds.TocService.init(TocService.java:103)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:168)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
at jakarta.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:125)

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.