Skip to content

suggested certification test for post quantum preparation - unparseable keys in server jwks #2147

Open

Description

@jogu

The certification team would appreciate feedback on a suggested new test - in thinking about the rollout of post quantum algorithms, it seems like we should ensure that clients cope okay with a server jwks that contains a key they can't parse. This would mean servers could start listing post quantum keys (in addition to the current keys) in their jwks knowing the clients would not stop working.

Not sure how to do this test in practice - having an unparseable key in the server jwks_uri all the time seems most reliable so is I think my recommendation - having a specific test that adds a key to the jwks just for that test could work unreliably if the client is caching the jwks and/or openid-configuration contents.

The slightly annoying this is that this is only a 'should' in the spec as far as I can see, https://www.rfc-editor.org/rfc/rfc7517#section-5 :

Implementations SHOULD ignore JWKs within a JWK Set that use "kty" (key type) values that are not understood by them, that are missing required members, or for which values are out of the supported ranges.

There's not really any practical way we can make this only a 'warning' in the test suite (we can't see that the client is aborting because it found an unsupported key) so in practice we would be treating it as a 'must'.

Activity

  1. jogu commented on Jun 5, 2026

    @jogu
    ContributorAuthor

    To be very clear - I propose adding two invalid entries to the server jwks that the tests expose:

      {
        "kty": "AKP",
        "alg": "ML-DSA-9999",
        "kid": "unusable-pq-sig-key",
        "use": "sig",
        "pub": "Z0FOY29uZm9ybWFuY2UtdGVzdC1wbGFjZWhvbGRlci1wdWJsaWMta2V5"
      }
      {
        "kty": "OIDF-CONFORMANCE-UNSUPPORTED",
        "alg": "OIDF-CONFORMANCE-UNSUPPORTED",
        "kid": "unusable-unknown-sig-key",
        "use": "sig"
      }
    

    with the expectation the client would ignore both of these and validate the RS256 id_token against the RSA key.

  2. transferred this issue fromon Jun 28, 2026
  3. RalphBragg commented on Jul 23, 2026

    @RalphBragg

    +1, and worth flagging that this is not a theoretical edge case. We (Raidiam) have measured how JOSE/JWKS libraries behave when a published JWK Set contains a key type they do not recognise, across a broad range of libraries and languages, and a large share fail the entire set rather than ignoring the unknown key as RFC 7517 §5 recommends. We have also seen it cause a real, externally triggered production outage in a federated deployment: one party introduced a new key type and downstream relying parties on non-tolerant libraries stopped verifying every signature, including the existing classical ones, until it was diagnosed and rolled back. So the incompatibility is widespread and the impact is major, and the RFC's SHOULD is clearly not enough on its own. Making this a certification requirement is exactly the right lever. Happy to contribute a reproduction harness and our findings if useful.

  4. jogu commented on Jul 29, 2026

    @jogu
    ContributorAuthor

    Filip pointed out that the DCR tests should also try including a similar key in the client's jwks_uri

    We should also cover unknown alg values I think.

  5. jogu commented on Aug 13, 2026

    @jogu
    ContributorAuthor
  6. fkj commented on Aug 27, 2026

    @fkj
    Member

    Consensus decision from Connect WG meeting on August 27th, 2026: This is approved.

  7. james-d-elliott commented on Aug 28, 2026

    @james-d-elliott

    To be very clear - I propose adding two invalid entries to the server jwks that the tests expose

    In addition to the unknown kty values it might be worth at the same time considering the additional MUST requirement in the spec regarding miscellaneous members inside each JWK from RFC 7517 section 4 which reads:

    Additional members can be present in the JWK; if not understood by implementations encountering them, they MUST be ignored.

    See below the below example expanding on the great example @jogu included.

      {
        "kty": "AKP",
        "not-part-of-AKP-member": true,
        "alg": "ML-DSA-9999",
        "kid": "unusable-pq-sig-key",
        "use": "sig",
        "pub": "Z0FOY29uZm9ybWFuY2UtdGVzdC1wbGFjZWhvbGRlci1wdWJsaWMta2V5"
      }
      {
        "kty": "OIDF-CONFORMANCE-UNSUPPORTED",
        "OIDF-CONFORMANCE-UNSUPPORTED": true,
        "alg": "OIDF-CONFORMANCE-UNSUPPORTED",
        "kid": "unusable-unknown-sig-key",
        "use": "sig"
      }
  8. selfissued commented on Sep 4, 2026

    @selfissued
    Member

    Note that Certification MR #2119 adding these key tests was merged following the working group's approval.

  9. fkj commented on Sep 16, 2026

    @fkj
    Member

    @jogu Since the tests have been added, is this issue ready to close?

    I realize that @james-d-elliott's suggestion of also adding a test with an unknown member in the JWK has not been added. But I think that should be moved into a separate issue with an appropriate title if we do want to track it.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions