Skip to content

auth: cache empty HIBP ranges and JWKS key sets #15703

Closed

Description

@ArnabChatterjee20k

Part of #15702.

Once utopia-php/cache stores empty values, two callers in appwrite/appwrite cache an empty answer that is refetched today:

  • src/Appwrite/Auth/Validator/PasswordPwned.php:115: a HIBP range with no breached hashes is [], so every password check with that prefix calls HIBP. After: cached for CACHE_TTL (1h).
  • src/Appwrite/Auth/OIDC/Jwks.php:46: a JWKS with no usable RSA keys is [], so every ID-token login fetches it again. After: cached for 6h. An unknown kid still forces a refetch, at most once per 60s (:53-60).

No code change is needed. Add regression tests showing each empty answer is fetched once for two lookups.

Activity

  1. added
    product / auth
    on Nov 17, 2026
  2. ArnabChatterjee20k commented on Nov 17, 2026

    @ArnabChatterjee20k
    MemberAuthor

    #15705 also fixes HIBP::range(): a 200 response with no SUFFIX:COUNT entry now throws GENERAL_PWNED_PASSWORDS_UNAVAILABLE instead of being read, and cached, as "no breaches".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    product / auth

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions