As the title says, I have a JSON file generated based on https://mkjwk.org/ and now I want to use the generated values to sign a JWT. I will do this for multiple "clients", each with its own signature. These will then be verified against a set of JWKS containing the public keys for the different "clients".
However, I'm struggling to understand how to use the generated JSON values..
I know I can generate one priv/pub keys directly with the crypto/rsa module. I've also seen examples where the ppk is given as input in X509 format, though I was trying to avoid it if possible (I guess I'm just being picky as I prefer to be able to read the contents of a file rather than seeing random chars..)
From the multiple examples and numerous searches I've done, I haven't seen one where the process of taking a json file and generating a rsa.privateKey is performed.
I'm also using the jwt-go and jwx modules to handle the rest of the use cases, but this one is escaping me..
So, what am I missing? How can I go from a JSON like the one below to a rsa.PrivateKey?
{
"p": "vQXloZI9y5..._PPE6m05J-VqhIF6-FQjvwc",
"kty": "RSA",
"q": "u1OqnCCLyEZDMoSfK...SfcIGNSd90PEcPs",
"d": "eoAj0Z0PkK3A0pc5t...9Q8iqGntoxMVARBtQ",
"e": "AQAB",
"use": "sig",
"kid": "r9cuFC3...HiAc7VhSME",
"qi": "upOjfCF_na...H4a7Bs2pWGoS6w5mcqXU",
"dp": "HKGzCclEEP...GdofDVR5Yas",
"alg": "RS256",
"dq": "PDyRNhc5G7OMVChVTm61kn2ShRFTe...BLytOxGBm5ntJv4V0HRBU",
"n": "ilEVn6tSuh7-tZBV8qXmlvzWDE5jTS...sNH8-wPf6gKCuZzEyyS2AyZE8S4NzqoFkaepVpdoOPtb3Q"
}
Thanks