Skip to content

Add pytest coverage for broker auth/token/attestation/limits #87

Description

@adamcohenhillel

services/model-broker/ has no Python unit tests. scripts/smoke-test-model-broker.sh covers only happy-path HTTP against pre-provider paths.

Coverage gaps to close

  • Token expiry (validate_signed_token).
  • Tampered signatures (bit-flipped payload, wrong HMAC key version).
  • Device-HMAC attestation with clock skew (accept vs reject window).
  • Rate limiter concurrency (once #broker-rate-limit lands).
  • Admin-token compare_digest paths.
  • Privacy check (count_input_images) on adversarial payloads.

Add services/model-broker/tests/ with pytest, run in ci.yml (broker code changes only).

Size: M

Metadata

Metadata

Assignees

No one assigned

    Labels

    M4-runtimeM4: Provider & Runtime MaturityenhancementNew feature or requesthelp wantedExtra attention is needed

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions