Defect #5691

OpenID authentication fails with "Invalid null namespace"

Added by Harry Brundage over 9 years ago. Updated over 7 years ago.

Status:NewStart date:2010-06-15
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:OpenID
Target version:-
Resolution: Affected version:0.9.3

Description

I get an error whenever I try to log in to my Redmine install with OpenID. I've tried several different endpoints and fiddling with the configs, but I always get this error:

Processing AccountController#login (for 130.15.105.53 at 2010-06-15 14:15:30) [POST]
  Parameters: {"openid.mode"=>"id_res", "openid.op_endpoint"=>"http%3A%2F%2Fwww.myopenid.com%2Fserver", "openid.return_to"=>"http%3A%2F%2Fdeveloper.entrada-project.org%2Flogin%3F_method%3Dpost%26open_id_complete%3D1", "openid.sig"=>"czuB%2FBqYoYUMjGKW2sDXeHUR0fg%3D", "openid.response_nonce"=>"2010-06-15T14%3A15%3A30ZzMX3OY", "openid.ns"=>"http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0", "action"=>"login", "_method"=>"post", "openid.identity"=>"http%3A%2F%2Fhornairs.myopenid.com%2F", "openid.assoc_handle"=>"%7BHMAC-SHA1%7D%7B4c0d28ff%7D%7BKkNbpQ%3D%3D%7D", "openid.signed"=>"assoc_handle%2Cclaimed_id%2Cidentity%2Cmode%2Cns%2Cop_endpoint%2Cresponse_nonce%2Creturn_to%2Csigned", "controller"=>"account", "open_id_complete"=>"1", "openid.claimed_id"=>"http%3A%2F%2Fhornairs.myopenid.com%2F"}

OpenID::InvalidOpenIDNamespace (Invalid null namespace: http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0):
  /opt/bitnami/ruby/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/message.rb:198:in `set_openid_namespace'
  /opt/bitnami/ruby/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/message.rb:161:in `_from_openid_args'
  /opt/bitnami/ruby/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/message.rb:151:in `each'
  /opt/bitnami/ruby/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/message.rb:151:in `_from_openid_args'
  /opt/bitnami/ruby/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/message.rb:132:in `from_post_args'
  /opt/bitnami/ruby/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/consumer.rb:282:in `complete'
  app/controllers/account_controller.rb:158:in `open_id_authenticate'
  app/controllers/account_controller.rb:32:in `login'

Rendering /opt/bitnami/apps/redmine/public/500.html (500 Internal Server Error)

I'm running Redmine 0.9.3 on the Bitnami Redmine virtual image which provides a quick easy way to get Redmine up and running, but things are arranged in a somewhat weird way. I don't think that the Bitnami stack and configuration are the issue here, it seems to be a Ruby/open_id_authentication issue.

$: /opt/bitnami/ruby/bin/ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]

$: /opt/bitnami/ruby/bin/gem -v
1.3.6

Any suggestions? Can I give you any more information?

History

#1 Updated by Felix Schäfer over 9 years ago

Ok, I had a look at the OpenID gem, and it gets and URL-escaped URL http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0 instead of the non-escaped URL http://specs.openid.net/auth/2.0 it is looking for. I don't have enough knowledge of OpenID to be able to help you further on this, but I grepped redmine for any mention of specs.openid and it returned nothing, so that's something coming from "outside". This can also be seen in the parameters of the action called ("openid.ns"=>"http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0").

As to the redmine part, paste your rack version and/or the output of RAILS_ENV=production script/about in your redmine dir to see if we can spot some version discrepancy. The version of the ruby-openid the stack uses would be of interest too (or maybe gem list to be sure).

#2 Updated by Sven Krzyzak over 9 years ago

Same problem here with Redmine 1.0.0.stable.3929.

RAILS_ENV=production ruby script/about

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /srv/www/redmine
Environment               production
Database adapter          mysql
Database schema version   20100808221515

About your Redmine plugins
Screenshot Paste          1.1.0
Embedded                  0.0.1
Mylyn Connector plugin    2.7.0.trunk
Stuff To Do Plugin        0.4.0
Redmine Codebook plugin   0.3.1

gem list
actionmailer (2.3.8, 2.3.5)
actionpack (2.3.8, 2.3.5)
activerecord (2.3.8, 2.3.5)
activeresource (2.3.8, 2.3.5)
activesupport (2.3.8, 2.3.5)
cgi_multipart_eof_fix (2.5.0)
columnize (0.3.1)
daemons (1.1.0, 1.0.10, 1.0.7)
fastthread (1.0.7)
gem_plugin (0.2.3)
linecache (0.43)
mongrel (1.1.5)
passenger (2.2.15, 2.2.11, 2.2.9, 2.2.5)
rack (1.2.1, 1.1.0, 1.0.1)
rails (2.3.8, 2.3.5)
rake (0.8.7)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
ruby-debug-ide (0.4.9)
ruby-openid (2.1.8)
rubygems-update (1.3.7, 1.3.6, 1.3.5)

#3 Updated by Etienne Massip over 8 years ago

  • Category changed from Accounts / authentication to OpenID

#4 Updated by Justin Grevich almost 8 years ago

Same problem for me with 1.2.3.stable.8823

Error log

OpenID::InvalidOpenIDNamespace (Invalid null namespace: http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0):
  /usr/local/rvm/gems/ree-1.8.7-2011.12-rg162/gems/ruby-openid-2.1.8/lib/openid/message.rb:198:in `set_openid_namespace'
  /usr/local/rvm/gems/ree-1.8.7-2011.12-rg162/gems/ruby-openid-2.1.8/lib/openid/message.rb:161:in `_from_openid_args'
  /usr/local/rvm/gems/ree-1.8.7-2011.12-rg162/gems/ruby-openid-2.1.8/lib/openid/message.rb:151:in `each'
  /usr/local/rvm/gems/ree-1.8.7-2011.12-rg162/gems/ruby-openid-2.1.8/lib/openid/message.rb:151:in `_from_openid_args'
  /usr/local/rvm/gems/ree-1.8.7-2011.12-rg162/gems/ruby-openid-2.1.8/lib/openid/message.rb:132:in `from_post_args'
  /usr/local/rvm/gems/ree-1.8.7-2011.12-rg162/gems/ruby-openid-2.1.8/lib/openid/consumer.rb:282:in `complete'
  app/controllers/account_controller.rb:161:in `open_id_authenticate'
  app/controllers/account_controller.rb:140:in `authenticate_user'
  app/controllers/account_controller.rb:30:in `login'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/utils.rb:479:in `safe_fork'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:180:in `start'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /home/ubuntu/.passenger/standalone/3.0.11-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/helper-scripts/passenger-spawn-server:99

Rendering /var/rails/redmine/public/500.html (500 Internal Server Error)

RAILS_ENV=production ruby script/about

About your application's environment
Ruby version              1.8.7 (i686-linux)
RubyGems version          1.6.2
Rack version              1.1.3
Rails version             2.3.11
Active Record version     2.3.11
Active Resource version   2.3.11
Action Mailer version     2.3.11
Active Support version    2.3.11
Application root          /var/rails/redmine
Environment               production
Database adapter          mysql
Database schema version   20110511000000

Gems list

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
daemon_controller (0.2.6)
fastthread (1.0.7)
i18n (0.4.2)
mysql (2.8.1)
passenger (3.0.11)
rack (1.1.3)
rails (2.3.11)
rake (0.8.7)
ruby-openid (2.1.8)

#5 Updated by Justin Grevich almost 8 years ago

I can also verify that the same problem exists for me in Redmine 1.3.1.stable.8824

Very frustrating. Can anyone confirm that this is working in some regard? Perhaps it's something with Google's OpenID system? I should try some others.

#6 Updated by Justin Grevich over 7 years ago

Any traction with this? I get the same error with trunk/Redmine 2.0.0.devel.9554 (Mysql2)

About your application's environment
Ruby version              1.9.3 (i686-linux)
RubyGems version          1.8.23
Rack version              1.4
Rails version             3.2.3
Active Record version     3.2.3
Action Pack version       3.2.3
Active Resource version   3.2.3
Action Mailer version     3.2.3
Active Support version    3.2.3
Middleware                Rack::Cache, ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x8fcc2d8>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport, OpenIdAuthentication
Application root          /var/rails/redmine_trunk
Environment               production
Database adapter          mysql2
Database schema version   20120422150750

OpenID::InvalidOpenIDNamespace (Invalid null namespace: http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0):
  ruby-openid (2.1.8) lib/openid/message.rb:198:in `set_openid_namespace'
  ruby-openid (2.1.8) lib/openid/message.rb:161:in `block in _from_openid_args'
  ruby-openid (2.1.8) lib/openid/message.rb:151:in `each'
  ruby-openid (2.1.8) lib/openid/message.rb:151:in `_from_openid_args'
  ruby-openid (2.1.8) lib/openid/message.rb:132:in `from_post_args'
  ruby-openid (2.1.8) lib/openid/consumer.rb:282:in `complete'
  rack-openid (1.3.1) lib/rack/openid.rb:145:in `block in complete_authentication'
  rack-openid (1.3.1) lib/rack/openid.rb:272:in `timeout_protection_from_identity_server'
  rack-openid (1.3.1) lib/rack/openid.rb:143:in `complete_authentication'
  rack-openid (1.3.1) lib/rack/openid.rb:95:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.1) lib/rack/etag.rb:23:in `call'
  rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
  rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/cookies.rb:338:in `call'
  activerecord (3.2.3) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `_run__411870148__call__993951291__callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
  rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
  rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.3) lib/rails/engine.rb:479:in `call'
  railties (3.2.3) lib/rails/application.rb:220:in `call'
  railties (3.2.3) lib/rails/railtie/configurable.rb:30:in `method_missing'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb:479:in `safe_fork'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:180:in `start'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
  <internal:prelude>:10:in `synchronize'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/helper-scripts/passenger-spawn-server:99:in `<main>'

Also available in: Atom PDF