Can JWT verify function use pem files to verify the signature #122
-
I have a bunch of public keys and based on the In the below JWT header, I have a kid field
I would like to do something like this I am open to writing my own function also which can do this. Before that, I would like to hear from you folks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @keshavprasadms 👋 No, that function does not read certificates from disk. You'd need to either store them as part of OPA's in-memory |
Beta Was this translation helpful? Give feedback.
Hi @keshavprasadms 👋
No, that function does not read certificates from disk. You'd need to either store them as part of OPA's in-memory
data
, in environment variables, or retrieve them from a remote endpoint. The latter solution is definitely them most common/idiomatic one, as exposing public keys via a JWKS endpoint is standardized. You can see examples of this in the docs on OAuth2 and OpenID Connect, though the principle of JWKS works just as well outside of those protocols.