Layer7 API Management

 View Only

Get JWK from public key in pem format

  • 1.  Get JWK from public key in pem format

    Posted Dec 08, 2022 11:10 AM

    Hello everyone,

    I have an issue about validating json web tokens. There is an jws signature in the request's header which is signed by the requestors.

    We are decoding this signature with "Decode Json Web Token Properties" assertion and have to validate this signature with public key of requestor due to regulations.
    We are getting these public keys, in a PEM format, from a remote service dynamically.
    I try to validate with this public keys which I set in a context variable but it did not work.


    As I read from some articles, it has to be in JWK format or must be in store.
    But we can not add it to the store, because there are tens of different public keys and these are changeable.

    The question is how can we transform this public key to JWK ?

    Thanks,

    Özgür Anıl Demir