Project

General

Profile

Actions

Bug #21564

closed

OAuth i.e. for proxy registration doesn't work with Rails 5

Added by Anonymous over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Authentication
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

https://github.com/oauth-xx/oauth-ruby/issues/131#issuecomment-242205050 has a hint on a change, but then only another error appears.
This is blocking nightly DEBs.


Related issues 1 (0 open1 closed)

Related to Foreman - Tracker #15715: Rails 5.0 upgrade tasksResolved07/18/2016

Actions
Actions #1

Updated by Anonymous over 6 years ago

more specifically OAuth::Signature.verify in app/services/sso/oauth.rb:23 fails.

Actions #2

Updated by Anonymous over 6 years ago

Actions #3

Updated by Ondřej Pražák over 6 years ago

Just for a reference:

production.log

2017-11-28T13:34:09 92da08ce [app] [I] Started GET "/api/v2/smart_proxies?search=name=%22stretch-bats.example.com%22" for 127.0.0.1 at 2017-11-28 13:34:09 +0000
2017-11-28T13:34:09 92da08ce [app] [I] Processing by Api::V2::SmartProxiesController#index as JSON
2017-11-28T13:34:09 92da08ce [app] [I]   Parameters: {"search"=>"name=\"stretch-bats.example.com\"", "apiv"=>"v2", "smart_proxy"=>{}}
2017-11-28T13:34:10 92da08ce [app] [I] Completed 500 Internal Server Error in 20ms (ActiveRecord: 3.1ms)
2017-11-28T13:34:10 92da08ce [app] [F]   
2017-11-28T13:34:10 92da08ce [app] [F] OAuth::RequestProxy::UnknownRequestType (ActionDispatch::Request):
2017-11-28T13:34:10 92da08ce [app] [F]   
2017-11-28T13:34:10 92da08ce [app] [F] app/services/sso/oauth.rb:15:in `authenticate!'
 | app/services/sso/oauth.rb:36:in `authenticated?'
 | app/controllers/concerns/foreman/controller/authentication.rb:62:in `sso_authentication'
 | app/controllers/concerns/foreman/controller/authentication.rb:14:in `authenticate'
 | app/controllers/api/base_controller.rb:170:in `authorize'
 | app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 | lib/middleware/catch_json_parse_errors.rb:8:in `call'
 | lib/middleware/session_safe_logging.rb:17:in `call'
 | lib/middleware/tagged_logging.rb:18:in `call'

installer output

# [ INFO 2017-11-28T13:31:39 verbose]  Class[Foreman_proxy::Register]: Scheduling refresh of Foreman_smartproxy[stretch-bats.example.com]
# [ERROR 2017-11-28T13:31:39 verbose]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[stretch-bats.example.com]: Could not evaluate: Proxy stretch-bats.example.com cannot be retrieved: unknown error (response 500)
# [ERROR 2017-11-28T13:31:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:in `proxy'
# [ERROR 2017-11-28T13:31:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:13:in `id'
# [ERROR 2017-11-28T13:31:39 verbose] /usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:17:in `exists?'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in `retrieve'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in `retrieve_resource'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:302:in `from_resource'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:248:in `apply'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:267:in `eval_resource'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:179:in `call'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:179:in `block (2 levels) in evaluate'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:511:in `block in thinmark'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:510:in `thinmark'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:179:in `block in evaluate'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:121:in `traverse'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:169:in `evaluate'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:225:in `block in apply'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:140:in `as_logging_destination'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:224:in `apply'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:172:in `block in apply_catalog'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `apply_catalog'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:344:in `run_internal'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:222:in `block in run'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:263:in `override'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:196:in `run'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:356:in `apply_catalog'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block (2 levels) in main'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:263:in `override'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in `block in main'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:263:in `override'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:in `main'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in `run_command'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `block in run'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:666:in `exit_on_fail'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:358:in `run'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
# [ERROR 2017-11-28T13:31:39 verbose] /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
# [ERROR 2017-11-28T13:31:39 verbose]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[stretch-bats.example.com]: Failed to call refresh: Proxy stretch-bats.example.com cannot be retrieved: unknown error (response 500)
# [ERROR 2017-11-28T13:31:39 verbose]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[stretch-bats.example.com]: Proxy stretch-bats.example.com cannot be retrieved: unknown error (response 500)

Actions #5

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Anonymous
  • Pull request https://github.com/theforeman/foreman/pull/5067 added
Actions #6

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF