Skip to main content

classify

Function classify 

Source
pub fn classify(
    observed: &ObservedSdkIdentity,
    verified: &VerifiedSdkIdentity,
    min_supported_version: Option<&str>,
) -> SdkIdentityVerdict
Expand description

Recompute the SDK-identity verdict from inputs the server controls.

Precedence (most severe first):

  1. Missing — the agent presented no SDK identity at all.
  2. Forged — a verified version reference exists and the observed version contradicts it.
  3. VersionDowngraded — the observed version is below min_supported_version (or is unparseable while a minimum is required).
  4. Unverifiable — an identity was presented but there is no verified reference and no minimum to clear.
  5. Ok — otherwise.

min_supported_version is None when the operator imposes no floor.