How do I rotate keys for JWT signing? <https://www...
# ory-network
w
How do I rotate keys for JWT signing? https://www.ory.sh/docs/identities/session-to-jwt-cors#end-to-end-example I found how to rotate OAuth access token keys: https://www.ory.sh/docs/hydra/jwks#rotate-oauth-20-access-token-jwt-keys - but it seems like because I have to pass in a base64 of the keyset into the template, I have to patch the template as well every time I want to rotate a key.
m
You're correct that updating the JWKS requires updating the template each time you want to rotate a key. This is different from the OAuth access token key rotation, which uses a different mechanism.
w
Awesome, thanks for the clarification! Was curious because I wanted to write down the proper procedures for rotating a JWK key. Sounds like what I should be doing is
create jwk
and then update the template. Is it possible to then delete the old key (or any individual key, really) from the set using
delete jwk
?