How to present jwks from a private key stored in KVM?

We are using Apigee as our internal security token service to translate jwt from multiple authentication provider. We are minting new JWT tokens in Apigee. To make the consumption easier we would like to expose a jwks endpoint. To make it easy to maintain I am trying to generate the JWK in Apigee from the private key stored in the encrypted KVM. Anyone has done something similar ?

0 1 84
1 REPLY 1

Maybe this will help? https://github.com/DinoChiesa/Apigee-JWT-with-JWKS

My approach in that example was to load both the private key and the JWKS-formatted public key into the KVM. 

There are other alternatives of course. You could write a Java callout that ingests the private key, then extracts the public key from that and reformats it as a JWK, at runtime. If you do it that way then you don't need to "pre-compute" the JWKS and load it into the KVM.  But you do need to write the Java code that does the transformation/extraction. 

Ether way would work.