Class ReachabilityChecker

java.lang.Object
io.jans.fido2.service.readiness.ReachabilityChecker

@ApplicationScoped public class ReachabilityChecker extends Object
Decides whether a relying party's association files are reachable the way Android and iOS need them: answered with 200 by the RP ID host itself, with a JSON content type, within the size and time limits.

One fetch is made per file, and every check is derived from that single result. Check ids and rules:

  • reachability.status: PASS for HTTP 200. FAIL for any other status (the code is stated), for a redirect ("not followed"), and for a failed fetch (fixed reason: not resolvable, address not allowed, TLS failure, connection failure).
  • reachability.redirect (3xx only): FAIL, stating whether the target is the same host, the same host with www. added, or another host. Neither platform follows redirects. The Location value itself is never reported.
  • reachability.host (any non-redirect response): PASS, naming the RP ID host that answered.
  • reachability.content-type (HTTP 200 only; the media type is compared, parameters such as charset are ignored): PASS for application/json. A missing header is FAIL. Any other type is FAIL for assetlinks.json, which Google documents as requiring application/json, and WARN for apple-app-site-association, where Apple documents application/json but does not document enforcing it.
  • reachability.limits: FAIL for a body over the size limit or a timeout, PASS for a response within the size limit.
The size and time limits are those of WellKnownFetcher's defaults.