ancient-judge-84558
06/07/2023, 7:42 PMicy-manchester-83109
06/08/2023, 6:44 PMid_token
mutator. It configuration and usage is described in https://www.ory.sh/docs/oathkeeper/pipeline/mutator#id_tokenicy-manchester-83109
06/08/2023, 6:49 PMBut what is the correct way to configure it, so that the token can be properly validated by the backend system agains Ory?As you can see from the docs referenced above, the
id_token
mutator requires a jwks_url
where it retrieves the key material (can be a local file) used for JWT signing purposes. Your backend system, which has to deal with these JWTs needs a way to access the corresponding key material as well. One way to achieve that is to let your backend use the https://www.ory.sh/docs/oathkeeper/reference/api#tag/api/operation/getWellKnownJSONWebKeys endpoint of oathkeeper to retrieve that key. Or make it statically available to you backend (not recommended, as you'll introduce dependencies and key rotation will be come a hard challenge)icy-manchester-83109
06/08/2023, 6:49 PMI understand that oathkeeper is creating and encrypting the JWT itself?As I've written above - yes. But it only signs the JWT
icy-manchester-83109
06/08/2023, 6:50 PMDoes oathkeeper then need the same private key in it’s JSKs, that Ory is using?Actually it is up to you, which keys to use. And, actually, no, you should provide your own key material (at least this is the recommended approach).
icy-manchester-83109
06/08/2023, 6:51 PMAnd how do I set that up? Or am I completely misunderstanding how it works? Is there a documentation for this scenario that I didn’t find?I now assume, you can gather the missing information from the links provided above. IMO it describes everything in detail