Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect directly to a database #16

Closed
ro-ka opened this issue Jul 6, 2012 · 9 comments
Closed

Connect directly to a database #16

ro-ka opened this issue Jul 6, 2012 · 9 comments
Labels
Milestone

Comments

@ro-ka
Copy link

@ro-ka ro-ka commented Jul 6, 2012

It would be great to connect directly to a database (In case I have permission to just that database and I am not an admin for the whole mongo installation).

Could look like this in the "Add server" dialog:
user:pass@host:port/database

(This syntax is similar to http://www.mongodb.org/display/DOCS/Connections)

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Jul 6, 2012

It should already work just like that. Are you seeing otherwise?

@ro-ka
Copy link
Author

@ro-ka ro-ka commented Jul 6, 2012

Tried it earlier today and it didn't work. Will check again tomorrow.

@ro-ka
Copy link
Author

@ro-ka ro-ka commented Jul 7, 2012

Checked again and I get an error label next to the server name. The name is also not clickable. Tried it as admin user and as normal user with access to just that database.

@RealJTG
Copy link

@RealJTG RealJTG commented Sep 12, 2012

Same for me, not working on mongolab.com account with per-database authentication

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Sep 12, 2012

@RealJTG Are you using v2.0? PHP or Ruby implementation?

@ygbr
Copy link

@ygbr ygbr commented Sep 14, 2012

Ruby version is returning an error:

localhost - - [13/Sep/2012:23:38:34 BRT] "GET /check-status HTTP/1.1" 200 13
http://0.0.0.0:5678/ -> /check-status
NameError - undefined local variable or method name' for #<Genghis::Server:0x007fd2330d46e0>: /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/genghisapp-2.0.0/genghis.rb:502:inadd_server'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/genghisapp-2.0.0/genghis.rb:607:in block in <class:Server>' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:incall'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in block in compile!' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in[]'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in block (3 levels) in route!' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:inroute_eval'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in block (2 levels) in route!' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:inblock in process_route'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in catch' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:inprocess_route'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in block in route!' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:ineach'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in route!' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:indispatch!'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in block in call!' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:inblock in invoke'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in catch' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:ininvoke'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in call!' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:incall'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in call' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:incall'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in call' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:incall'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in call' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:incall'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:in call' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:incall'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in block in call' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:insynchronize'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in call' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:inservice'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service' /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:inrun'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
localhost - - [13/Sep/2012:23:38:42 BRT] "POST /servers HTTP/1.1" 500 93
http://0.0.0.0:5678/ -> /servers

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Sep 15, 2012

Yup. This definitely doesn't work in either PHP or Ruby implementation. Tagging it as a feature request for v2.1 :)

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Nov 24, 2012

A Ruby backend fix for this issue has been added to the develop branch. It will go out in the next release. I'm aiming to get a similar fix in for the PHP backend as well.

bobthecow added a commit that referenced this issue Nov 24, 2012
See #16

Note that this doesn't work if genghis.php is behind Apache unless `AllowEncodedSlashes` is enabled.

See #62
@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Nov 24, 2012

I just added db authentication support to the PHP backend as well, and fixed a couple of edge case bugs along the way.

I'm closing this issue, as the feature is now fully implemented in develop, and will go into the next release.

There is an outstanding feature request to work around AllowEncodedSlashes with Apache (see #62), but we might as well get things working for everyone else in the meantime.

@bobthecow bobthecow closed this Nov 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.