Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Usage  >  Troubleshooting  >  Thread
   
 
Basic authentication for RESTful interface not working
 
ecognito
Posted: 24 December 2007 01:27 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  10
Joined  2007-12-24

Hi,

I’m running the SVN trunk of tracks, via an Apache 2.2.4 web-server on linux.  I’m trying to use the REST API for somethings and the authentication does not appear to be working.  As per the examples:

curl --user myid:mypass http://myserver/contexts.xml 

This always returns a 401 error.

Tested running

ruby scripts/server 

and accessing via port 3000, and it works - so it appears there is an issue with the authentication mechanism when your rails app is running on top of Apache…

Profile
 
lukemelia
Posted: 24 December 2007 02:26 AM   [ Ignore ]   [ # 1 ]  
Member
Avatar
RankRankRank
Total Posts:  62
Joined  2006-07-18

I’m running the trunk with a similar setup Apache 2.2.3 with mod_proxy_balancer talking to mongrel 1.0.1 running tracks. I just tried the same curl command you mentioned (with my credentials and server of course) and it worked. Are you using fastcgi? That’s the only difference I could suspect that might somehow be related.

Cheers from NYC,
Luke

Signature 

Luke Melia - Tracks committer - New York, NY - http://www.lukemelia.com/

Profile
 
ecognito
Posted: 24 December 2007 03:27 AM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  10
Joined  2007-12-24

Yes, I’m using fastcgi.  Here are the packages (on openSUSE 10.3):

FastCGI 2.4.0-74
apache2-mod_fcgid 2.1-20
ruby-fcgi 0.8.7-87

I suppose I could run a similar setup to yours, but I’d prefer not to have to run yet another daemon process if I can avoid it.

P.S. While I have your attention.  If I had some source patches to submit, what is the process for that?  I find I’m not entirely happy with the task entry form - those auto-completing fields in particular are awkward when trying to just quickly thump a task in…

Plus I want to write a script that can monitor a POP or IMAP mailbox, and pull emails to tasks (hence my exploration of the REST API in the first place).

Guess I better learn Ruby soon… grin

Profile
 
lukemelia
Posted: 24 December 2007 05:32 AM   [ Ignore ]   [ # 3 ]  
Member
Avatar
RankRankRank
Total Posts:  62
Joined  2006-07-18

FCGI is not a very common way to run Rails apps these days. That’s not to say that authentication shouldn’t work that way, just to say that it would be a low priority for me to chase down myself. grin

Patches should get submitted via attachments on tickets created in our Trac (http://dev.rousette.org.uk/). Log in with guest/guest.

I recommend Ruby for Rails by David Black if you want to start to get your hands dirty. The Rails Way is good, too.

Also, here’s a link around dealing with incoming email using Rails: http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer

Cheers from NYC,
Luke

Signature 

Luke Melia - Tracks committer - New York, NY - http://www.lukemelia.com/

Profile
 
ecognito
Posted: 26 March 2008 11:02 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  10
Joined  2007-12-24

Just tested, and replacing the RewriteRule as suggested on the known issues page works.

http://dev.rousette.org.uk/wiki/Tracks/KnownIssues

Profile
 
   
 
 
‹‹ Tracks broken after upgrading Ubuntu to 7.10      Trunk performance slow? ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.2 (20091002)
Script Executed in 0.1101 seconds

Atom Feed
RSS 2.0