Class NativeReadinessService
The only input that reaches the network layer is the RP ID stored in the configuration, validated by
RpIdValidator. The caller supplies an id to select a configured entry, never a host, URL, port or
path, so an id that is not configured is answered with NativeReadinessService.NotFound and no outbound work.
Limits. The configured response size and timeout are clamped to MAX_RESPONSE_BYTES_LIMIT
and TIMEOUT_MS_LIMIT; a value that is not positive falls back to its default. A mis-set property
therefore cannot remove the cap.
Cache. In memory, per node, one entry per configured RP, so its size is bounded by the
configuration. Entries live for nativeReadinessCacheTtlSeconds, but never less than
ReadinessRateLimiter.MIN_RECHECK_INTERVAL_MS. In a cluster that means up to one fetch per node per
TTL, which ReadinessRateLimiter keeps bounded.
Audit. One log line per executed check with rpId, check, requestedBy,
timestamp, result and resolvedIpClass; a cache hit is one line and no fetch. The
IP class is a coarse label (never the address). requestedBy is whatever the caller forwarded: the
FIDO2 server does not authenticate callers, so the value can be forged by anything that reaches it
directly, and is informational until the Config API hop that sets it is trusted.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe requested relying party is not configured.static final classA rate limit refused the request;NativeReadinessService.RateLimited.retryAfterSeconds()says when to ask again. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe fixed upper bound fornativeReadinessMaxResponseBytes.static final intThe fixed upper bound fornativeReadinessTimeoutMs. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription
-
Field Details
-
MAX_RESPONSE_BYTES_LIMIT
public static final int MAX_RESPONSE_BYTES_LIMITThe fixed upper bound fornativeReadinessMaxResponseBytes.- See Also:
-
TIMEOUT_MS_LIMIT
public static final int TIMEOUT_MS_LIMITThe fixed upper bound fornativeReadinessTimeoutMs.- See Also:
-
-
Constructor Details
-
NativeReadinessService
public NativeReadinessService()
-
-
Method Details
-
check
- Parameters:
rpConfigId- the RP id exactly as configured inrequestedPartiesrecheck- skip the cache (still rate limited)requestedBy- who asked, as forwarded by the caller; null when not known- Throws:
NativeReadinessService.NotFound- when no configured RP has that idNativeReadinessService.RateLimited- when a rate limit refuses a check that would fetch
-