Support JWK key_ops

Issue #78 closed
Daniel Wegener created an issue

Just an idea: https://tools.ietf.org/html/rfc7517#section-4.3 describes the JWK "key_ops" parameter that allows a more fine grained control over key usage than the "use" parameter (especially if a key is used for different purposes on the same application). It would be nice if the VerificationKeySelector and JsonWebKeySet#findJsonWebKeys could support filters for the use parameter (i.e. if the "use" parameter is present, VerificationKeySelector requires that the "use" array contains "verify").

Comments (5)

  1. Brian Campbell repo owner

    Haven't seen much demand for the "key_ops" parameter, which was added to JWK very late in the process of becoming an RFC. #64 added very limited support for key_ops by just exposing it on JsonWebKey.

    JsonWebKeySet#findJsonWebKey[s] was an early and less than ideal way to search though keys. It's kept there for API compatibly but I don't intend to make any enhancements to it.

    I can see adding support for key_ops to VerificationKeySelector and the SimpleJwkFilter that backs it. And I'll take a look at doing that. The DecryptionJwkSelector should probably be considered too, which might be a little more tricky.

  2. Brian Campbell repo owner
    • edited description
    • changed status to resolved

    f559e00 "address #78 - JWK key_ops can now be a SimpleJwkFilter criteria and will be considered (only if present) in VerificationKeySelector & DecryptionJwkSelector"

  3. Log in to comment