Public JWKS URL is not working.

Jump to solution
ojhaashish13
Community Novice

I have configured the canvas on the ubuntu server by following the "production start" instruction. 

Production Start · instructure/canvas-lms Wiki · GitHub 

But when I am accessing the public JWKS URL https://canvas.pitchvantage.com/api/lti/security/jwks to access LTI 1.3 tool it is throwing this error while(1);{"errors":[{"message":"An error occurred.","error_code":"internal_server_error"}],"error_report_id":122}
When I am checking the error log it is saying "#122 undefined method `to_key' for nil:NilClass".

Please help me to fix the issue or guide me on how I can use the public JWKS URL for my LTI 1.3 Tool.

Note: I am using this LTI1.3 tool example on my localhost GitHub - IMSGlobal/lti-1-3-php-example-tool 

1 Solution
marcspringshare
Community Explorer

I believe I finally find a solution here:
https://community.canvaslms.com/t5/Developers-Group/Canvas-LTI-1-3-Error-Unknown-Key-Type/m-p/390285...

The TLDR is that the Bitnami installation is missing the dynamic_settings.yml file, so I created one by copying the example file:
sudo cp /opt/bitnami/apps/canvaslms/htdocs/config/dynamic_settings.yml.example /opt/bitnami/apps/canvaslms/htdocs/config/dynamic_settings.yml

And then I added a "production" section to dynamic_settings.yml, containing the following:
production:
  store:
    canvas:
      lti-keys:
        jwk-past.json: {copy entire json object from the development section at the top of the file}
        jwk-present.json: {copy entire json object from the development section at the top of the file}
        jwk-future.json: {copy entire json object from the development section at the top of the file}

Restarting the Bitnami services after making that change seems to have resolved things:
sudo /opt/bitnami/ctlscript.sh restart

Hope that saves someone else some time!

 

[edit 2022-03-22: In my most recent Bitnami Canvas installation, the dynamic_settings.yml file is included in its new location, /opt/bitnami/canvaslms/config/dynamic_settings.yml.  The file still needs the production LTI keys added however, so the remainder of the above comment is still valid, just using the new file path.]

View solution in original post