Problem/Motivation

At this moment, a new registration needs to select one key and then a link to the jwks is generated that includes the client_id as query string parameter in the URL.

This implies that to send the information to the LMS about the configuration of the Drupal tool, we need to know the client_id, and we can't know the client_id until they create a tool deployment on their side and to do that they need the jwks url.

A second issue is that the client_id is not unique, so you could have two registrations with the same client_id. That would generate an issue when getting the key.

Steps to reproduce

Just look at the URL for the jwks endpoint that is generated.

Proposed resolution

The usual practice to deal with the jwks endpoint is the same url for every client_id. If we want to have a different key per client_id we will need to publish all the public keys on that url and use the KID to find the right one. Although this is not needed at all. If that is done, a unique KID must be generated, surely including not only the client_id, but the issuer and the deployment_id. Or it could be just one key for all the LTI registrations (as most of the tools do) and avoid this problem completely making it not dependant on the registration.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

ddelblanco_2 created an issue. See original summary.

bob.hinrichs’s picture

Version: 2.0.5 » 3.0.0

Checked against 3.0.0 — not fixed. The JWKS controller still requires client_id on the request and looks up a single registration by it (src/Controller/LTIToolProviderV1P3Jwks.php lines 50-62), and isValidJwksRequest() rejects any request without a non-empty client_id
(src/Authentication/Provider/LTIToolProviderV1P3.php lines 79-83). So the URL handed to the LMS is still effectively /lti/v1p3/jwks?client_id=..., and the chicken-and-egg + non-uniqueness concerns remain. Neither proposed approach (one fixed URL exporting all keys disambiguated by KID, or a single shared key) is implemented yet.

The 3.0.0 work was Drupal 11 support + LTI 1.3 auth hardening and didn't touch this.
Resolving it likely depends on #3451674 (decoupling keys from the consumer entity) as a prerequisite. Could you confirm you still see client_id required on 3.0.0?