I'm working on testing an upgrade of our self-hosted Canvas LMS from the 2022-11-23 release to 2023-05-24, along with upgrading from Ruby 2.7.7 to 3.1.4 and Ubuntu 18 LTS to 20 LTS. Everything seemed to go smoothly, except the Rich Content Editor (RCE) which still holds the crown as the most annoying final boss in the Canvas LMS game.
When loading a course page to edit in Canvas, the following error is thrown on the server
[CANVAS_ERRORS] EXCEPTION LOG
CanvasSecurity::InvalidJwtKey (CanvasSecurity::InvalidJwtKey):
/var/canvas/releases/20230524/gems/canvas_security/lib/canvas_security.rb:231:in `create_encrypted_jwt'
/var/canvas/releases/20230524/gems/canvas_security/lib/canvas_security/services_jwt.rb:79:in `generate'
/var/canvas/releases/20230524/gems/canvas_security/lib/canvas_security/services_jwt.rb:112:in `for_user'
/var/canvas/releases/20230524/lib/services/rich_content.rb:26:in `env_for'
/var/canvas/releases/20230524/app/controllers/application_controller.rb:422:in `rce_js_env_base'
/var/canvas/releases/20230524/app/controllers/application_controller.rb:431:in `rce_js_env'My understanding is that the JWT is created from the encryption-secret and signing-secret in config/dynamic_settings.yml. We have not changed those configurations and they're working properly with the older release. Even though
config/dynamic_settings.yml.example does not show those values (and doesn't seem like it ever has), the
RCE-API readme still shows them setup the same as before, so I assumed that hasn't changed. I've also verified that our rce/.env has the proper values, but I get this error before even trying to load the RCE data so it appears to be on the Canvas side.
I don't really understand why RCE is so poorly documented and supported, but would really love some help getting this last bit working