obfuscurity / descartes

Introspective dashboard for Graphite
MIT License
502 stars 65 forks source link

GitHub auth - NameError at /auth/github #162

Open pboguszewski opened 10 years ago

pboguszewski commented 10 years ago

I seem to be in an auth hell. When attempting to use github auth (that appears to be properly setup) I get an error:

NameError at /auth/github uninitialized constant Octokit::Configuration file: oauth.rb location: build_uri line: 62

I see this on the console: [07/Jul/2014 14:22:32] "GET /auth/github HTTP/1.1" 500 292657 0.1212

My github org is uwlcb and my user is pboguszewski but I do not get far enough to ask for a user / password.

My .env seems to be properly pointing to github. I opened my firewalls up to port 5000, 80, and 443 for testing but do not believe this is the issue. I am running RHEL 6.5. I tried disabling SElinux with no luck. Please help - I am going a bit crazy...

pboguszewski commented 10 years ago

Here is the sinatra error:

sinatra.error
NameError: uninitialized constant Octokit::Configuration

pboguszewski commented 10 years ago

More info:

Warden::Proxy:50540800 @config={:default_scope=>:default, :scope_defaults=>{}, :default_strategies=>{:_all=>[:github]}, :intercept_401=>true, :failure_app=>Sinatra::Auth::Github::BadAuthentication, :github_secret=>"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", :github_scopes=>"", :github_client_id=>"bfXXXXXXXXXXXXXXXX", :github_oauth_domain=>"https://github.com", :github_callback_url=>"/auth/github/callback"}

pboguszewski commented 10 years ago

rack.logger info:

<Rack::NullLogger:0x00000004ea72a8 @app=#<Rack::Protection::FrameOptions:0x00000004ea7438 @app=#<Rack::Protection::HttpOrigin:0x00000004ea7550 @app=#<Rack::Protection::IPSpoofing:0x00000004ea75c8 @app=#<Rack::Protection::JsonCsrf:0x00000004ea7640 @app=#<Rack::Protection::PathTraversal:0x00000004ea76e0 @app=#<Rack::Protection::XSSHeader:0x00000004ea77a8 @app=#<Sinatra::Auth::Github::AccessDenied:0x00000004ea8270 @default_layout=:layout, @app=#<Warden::Manager:0x00000004ea8630 @config={:default_scope=>:default, :scope_defaults=>{}, :default_strategies=>{:_all=>[:github]}, :intercept_401=>true, :failure_app=>Sinatra::Auth::Github::BadAuthentication, :github_secret=>"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", :github_scopes=>"", :github_client_id=>"bfXXXXXXXXXXXXXXXX", :github_oauth_domain=>"https://github.com", :github_callback_url=>"/auth/github/callback"}, @app=#<Descartes::GithubAuth:0x00000004ea8dd8 @default_layout=:layout, @app=nil, @template_cache=#<Tilt::Cache:0x00000004ea8db0 @cache={}>>>, @template_cache=#<Tilt::Cache:0x00000004ea8248 @cache={}>>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :xss_mode=>:block, :nosniff=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :frame_options=>:sameorigin, :except=>[:session_hijacking, :remote_token]}>>

1mentat commented 10 years ago

I'm seeing this as well. Investigating.

obfuscurity commented 10 years ago

It's very possible that GitHub changed some of their OmniAuth stuff again.

/cc @brntbeer @atmos

atmos commented 10 years ago

Oh, yeah. Newer versions of octokit have different options. You probably want a more recent version of warden-github to get on octokit 2.x.

obfuscurity commented 10 years ago

Cool, thanks @atmos.

bleything commented 9 years ago

Same problem here. Any solution in the works?

atmos commented 9 years ago

@bleything What versions of octokit/warden-github?

bleything commented 9 years ago

The Gemfile has sinatra_auth_github locked to 0.13.3 which depends on warden-github ~> 0.13.1. I'm trying to upgrade sinatra_auth_github now and see what happens.

bleything commented 9 years ago

Upgrading sinatra_auth_github to 1.2.0 fixed the 500s I was getting but something in the auth step is failing. I can dig in further later.