Package io.jans.fido2.service.readiness
Class ReachabilityChecker
java.lang.Object
io.jans.fido2.service.readiness.ReachabilityChecker
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 withwww.added, or another host. Neither platform follows redirects. TheLocationvalue 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 ascharsetare ignored): PASS forapplication/json. A missing header is FAIL. Any other type is FAIL forassetlinks.json, which Google documents as requiringapplication/json, and WARN forapple-app-site-association, where Apple documentsapplication/jsonbut 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.
WellKnownFetcher's defaults.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckAppleAppSiteAssociation(ValidatedRpId rpId, WellKnownFetcher withLimits) AscheckAppleAppSiteAssociation(ValidatedRpId), using a fetcher that carries the caller's limits.checkAssetLinks(ValidatedRpId rpId) checkAssetLinks(ValidatedRpId rpId, WellKnownFetcher withLimits) AscheckAssetLinks(ValidatedRpId), using a fetcher that carries the caller's size and time limits.
-
Constructor Details
-
ReachabilityChecker
public ReachabilityChecker()
-
-
Method Details
-
checkAssetLinks
-
checkAppleAppSiteAssociation
-
checkAssetLinks
AscheckAssetLinks(ValidatedRpId), using a fetcher that carries the caller's size and time limits. -
checkAppleAppSiteAssociation
public ReachabilityReport checkAppleAppSiteAssociation(ValidatedRpId rpId, WellKnownFetcher withLimits) AscheckAppleAppSiteAssociation(ValidatedRpId), using a fetcher that carries the caller's limits.
-