careful-rain-13694
10/13/2023, 3:04 PMjwksURL
(https://{my-project-slug}.<http://projects.oryapis.com/.well-known/jwks.json
)|projects.oryapis.com/.well-known/jwks.json`)>, I can't find the kid
I get from this JWT. Did I miss something here?swift-analyst-72183
11/29/2023, 3:57 AMcareful-rain-13694
11/29/2023, 7:48 AMkid
while creating the jwk (see related documentation).
So you need to fetch a kid
from your configured JWKS url (https://{my-project-slug}.<http://projects.oryapis.com/.well-known/jwks.json|projects.oryapis.com/.well-known/jwks.json>
) and create a jwk passing this related key. Here is a way to do that:
JWKS_URL=$(ory get project $ORY_PROJECT_ID --format json-pretty | jq '.services.oauth2.config.webfinger.oidc_discovery.jwks_url' | sed -r 's|"||g')
KID=$(curl $JWKS_URL -s | jq '.keys[0].kid' | sed -r 's|"||g')
ory create jwk sencrop-jwk $KID --alg RS256 --project $ORY_PROJECT_ID --format json-pretty | base64
Then you need to configure your jwt_template
accordingly providing the base64 encoded jwks URL:
"whoami": {
"required_aal": "highest_available",
"tokenizer": {
"templates": {
"jwt_template_1": {
"claims_mapper_url": "URL OR BASE64 of your claims mapper",
"jwks_url": "base64://{YOUR_JWKS}",
"ttl": "10m0s"
}
}
}
}
I hope it is going to help 😉swift-analyst-72183
11/29/2023, 7:01 PMgifted-angle-64519
12/06/2023, 10:13 AMcareful-rain-13694
12/08/2023, 2:27 PMhydra.jwt.access-token
so I could make sure the same JWK set is being used for both signing the JWT and verifying it.
ory get jwk hydra.jwt.access-token --project $ORY_PROJECT_ID --format json-pretty | base64 | c
Pasting the result value from the clipboard into the dedicated section of the jwt_template used as tokenizer (as mentioned before).
I hope it could help in your setup as well 🙏lively-scientist-17848
02/07/2024, 5:24 PM