instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.42k stars 2.42k forks source link

OpenSSL 3.0 support missing #2247

Closed amg-web closed 10 months ago

amg-web commented 10 months ago

Ubuntu 22.04

ruby 3.1

OpenSSL 3.0 default in Ubuntu 22.04 is not supported

Gems to update: json-jwt - min version 1.14.0, current latest 1.16.3 jwt - min version 2.5.0, current latest 2.7.1

from here: https://github.com/rivals-space/rivals-mastodon/commit/4857f7c7491aacfdee83ddf23184d751dbe144d4

[CANVAS_ERRORS] EXCEPTION LOG
OpenSSL::PKey::PKeyError (rsa#set_key= is incompatible with OpenSSL 3.0):
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/json-jwt-1.13.0/lib/json/jwk.rb:106:in `set_key'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/json-jwt-1.13.0/lib/json/jwk.rb:106:in `to_rsa_key'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/json-jwt-1.13.0/lib/json/jwk.rb:43:in `to_key'
  /home/canvas/public_html/gems/canvas_security/lib/canvas_security/key_storage.rb:83:in `block in public_keyset'
  /home/canvas/public_html/gems/canvas_security/lib/canvas_security/key_storage.rb:82:in `map'
  /home/canvas/public_html/gems/canvas_security/lib/canvas_security/key_storage.rb:82:in `public_keyset'
  /home/canvas/public_html/app/controllers/security_controller.rb:46:in `jwks'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/abstract_controller/base.rb:215:in `process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/rendering.rb:53:in `process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/abstract_controller/callbacks.rb:234:in `block in process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
  /home/canvas/public_html/app/controllers/application_controller.rb:3009:in `manage_live_events_context'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
  /home/canvas/public_html/app/controllers/application_controller.rb:769:in `compute_http_cost'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/inst_statsd-2.2.0/lib/inst_statsd/statsd.rb:97:in `batch'
  /home/canvas/public_html/app/controllers/application_controller.rb:764:in `batch_statsd'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
  /home/canvas/public_html/lib/base/temp_cache.rb:30:in `enable'
  /home/canvas/public_html/app/controllers/application_controller.rb:760:in `enable_request_cache'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
  /home/canvas/public_html/app/controllers/application_controller.rb:756:in `set_timezone'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
  /home/canvas/public_html/app/controllers/application_controller.rb:749:in `set_locale'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:138:in `run_callbacks'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/abstract_controller/callbacks.rb:233:in `process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/rescue.rb:22:in `process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/notifications.rb:206:in `block in instrument'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/notifications.rb:206:in `instrument'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/instrumentation.rb:66:in `process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4.3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/abstract_controller/base.rb:151:in `process'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionview-7.0.4.3/lib/action_view/rendering.rb:39:in `process'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal.rb:188:in `dispatch'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_controller/metal.rb:251:in `dispatch'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/route_set.rb:32:in `serve'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:32:in `each'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:32:in `serve'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/route_set.rb:852:in `call'
  /home/canvas/public_html/gems/plugins/respondus_soap_endpoint/lib/respondus_soap_endpoint/middleware.rb:80:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-brotli-1.0.0/lib/rack/brotli/deflater.rb:34:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/deflater.rb:44:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/chunked.rb:98:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/tempfile_reaper.rb:15:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/etag.rb:27:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/conditional_get.rb:27:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/head.rb:12:in `call'
  /home/canvas/public_html/app/middleware/request_throttle.rb:62:in `block in call'
  /home/canvas/public_html/app/middleware/request_throttle.rb:355:in `reserve_capacity'
  /home/canvas/public_html/app/middleware/request_throttle.rb:60:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/http/permissions_policy.rb:38:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/http/content_security_policy.rb:36:in `call'
  /home/canvas/public_html/gems/request_context/lib/request_context/session.rb:28:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:266:in `context'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:260:in `call'
  /home/canvas/public_html/app/middleware/load_account.rb:49:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/cookies.rb:704:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:99:in `run_callbacks'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/sentry-rails-5.1.0/lib/sentry/rails/rescued_exception_interceptor.rb:12:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-core-5.1.0/lib/sentry/rack/capture_exceptions.rb:25:in `block in call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-core-5.1.0/lib/sentry/hub.rb:58:in `with_scope'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-core-5.1.0/lib/sentry-ruby.rb:308:in `with_scope'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-core-5.1.0/lib/sentry/rack/capture_exceptions.rb:16:in `call'
  /home/canvas/public_html/app/middleware/sentry_trace_scrubber.rb:34:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.3/lib/rails/rack/logger.rb:40:in `call_app'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.3/lib/rails/rack/logger.rb:27:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in `call'
  /home/canvas/public_html/gems/request_context/lib/request_context/generator.rb:71:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/method_override.rb:24:in `call'
  /home/canvas/public_html/app/middleware/prevent_non_multipart_parse.rb:35:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/runtime.rb:22:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/rack-2.2.7/lib/rack/sendfile.rb:110:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.3/lib/rails/engine.rb:530:in `call'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.3/lib/rails/railtie.rb:226:in `public_send'
  /home/canvas/public_html/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.3/lib/rails/railtie.rb:226:in `method_missing'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:107:in `process_request'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:419:in `block (3 levels) in start_threads'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'CONTEXT: {:extra=>{:request_id=>"fd13a72a-5dd6-49ab-8cac-290ac0b8b134", :session_id=>"7789c0c6038cd135349bd3cb16be0695", :meta_headers=>"o=security;n=jwks;", :request_context_id=>"fd13a72a-5dd6-49ab-8cac-290ac0b8b134", :request_method=>:get, :format=>#<Mime::Type:0x00007fc6ba4a2eb8 @synonyms=["text/x-json", "application/jsonrequest"], @symbol=:json, @string="application/json", @hash=2117665446438894328>, "HTTP_ACCEPT"=>"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", "HTTP_ACCEPT_ENCODING"=>"gzip, deflate, br", "HTTP_HOST"=>"canvas.site.com", "HTTP_USER_AGENT"=>"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 OPR/102.0.0.0", "PATH_INFO"=>"/api/lti/security/jwks", "QUERY_STRING"=>"?", "REQUEST_METHOD"=>"GET", "REQUEST_URI"=>"https://canvas.site.com/api/lti/security/jwks", "SERVER_NAME"=>"canvas.site.com", "SERVER_PORT"=>"443", "SERVER_PROTOCOL"=>"HTTP/1.1", "REMOTE_ADDR"=>"195.64.229.137", "path_parameters"=>"{:format=>\"json\", :controller=>\"security\", :action=>\"jwks\"}", "query_parameters"=>"{}", "request_parameters"=>"{}", :user_agent=>"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 OPR/102.0.0.0"}, :tags=>{:account_id=>10000000000001, :user_id=>10000000007939, :type=>nil, :response_code=>500}}
ccutrer commented 10 months ago

These gems have been updated on master.