[rt-users] command line interface with Apache Authentication

vinita vigine MURUGIAH vinita at cs.mu.OZ.AU
Thu Mar 25 01:08:28 EST 2004


HI, I'm still couldn't find the solution yet

I tried to set the username/password before sent request , still not working
#LWP::useragent->credentials( $netloc, $realm, $uname, $pass )
    $ua->credentials($uri->host_port, "RT access", $config{user}, 
$config{passwd});

    my $res = $ua->request($req);

not use what is $netloc suppose to be!!

please help!!!!

Thanks

vinita vigine MURUGIAH wrote:

> HI
> The command line interface works fine with the RT internal 
> Authentication, but doesn't seems to work when I switch to the Apache 
> Authentication.
>
> Apache Authentication by web, works fine!
>
> All I set for command line configuration are
> export RTDEBUG=3
> export RTSERVER= http://rt:8000/ - this is the place I go in the web 
> to access RT.
>
> My UNIX username, the RT username and RT unix-username are same.
>  
> Am I missing any setup???
>
> I looked at all the log files, rt.log (RT_Config) & error_log, 
> rt_error_log and rt_access_log (apache), no error msg, only got
> rt_access_log :
> 128.250.37.70 - - [23/Mar/2004:10:32:06 +1100] "POST //REST/1.0/show 
> HTTP/1.0" 401 470
>
>
> with internal RTl Authentication - work fine
> --------------------------------
> [vinita at mulga] bin [1:95] ./rt ls "queue='DBA'"
> Password:
> POST http://rt:8000//REST/1.0/search/ticket
> Content-Length: 274
> Content-Type: multipart/form-data; boundary=xYzZY
>
> --xYzZY
> Content-Disposition: form-data; name="query"
>
> queue='DBA'
> --xYzZY
> Content-Disposition: form-data; name="orderby"
>
>
> --xYzZY
> Content-Disposition: form-data; name="user"
>
> vinita
> --xYzZY
> Content-Disposition: form-data; name="pass"
>
> XXXXXXX
> --xYzZY--
>
> HTTP/1.0 200 OK
> Cache-Control: no-cache, no-store
> Date: Mon, 22 Mar 2004 23:23:20 GMT
> Pragma: no-cache
> Server: Apache/1.3.29 (Unix) mod_perl/1.29
> Content-Type: text/plain; charset=UTF-8
> Client-Date: Mon, 22 Mar 2004 23:23:20 GMT
> Client-Peer: 128.250.37.70:3128
> Client-Response-Num: 1
> Proxy-Connection: close
> Set-Cookie: RT_SID_cs.mu.OZ.AU.8000=0e36f33cce273c54892e23fbac08c3b9; 
> path=/
> X-Cache: MISS from calamari.cs.mu.OZ.AU
>
> RT/3.0.8 200 Ok
>
> 1: testing 1 2 3
> 2: ticket by vvj
> 7: main dba fix
> 8: sub DBA -1
> 9: sub DBA -2
>
>
> 1: testing 1 2 3
> 2: ticket by vvj
> 7: main dba fix
> 8: sub DBA -1
> 9: sub DBA -2
> [vinita at mulga] bin [1:96]
>
> with Apache Authentication, (add the .htaccess at doc root, then stop 
> start the apache)
> -------------------------------------
> [vinita at mulga] bin [1:107] ./rt show ticket/2
> Password:
> POST http://rt:8000//REST/1.0/show
> Content-Length: 205
> Content-Type: multipart/form-data; boundary=xYzZY
>
> --xYzZY
> Content-Disposition: form-data; name="id"
>
> ticket/2
> --xYzZY
> Content-Disposition: form-data; name="user"
>
> vinita
> --xYzZY
> Content-Disposition: form-data; name="pass"
>
> XXXXXX
> --xYzZY--
>
> HTTP/1.0 401 Unauthorized
> Date: Mon, 22 Mar 2004 23:32:41 GMT
> Server: Apache/1.3.29 (Unix) mod_perl/1.29
> WWW-Authenticate: Basic realm="RT access"
> Content-Type: text/html; charset=iso-8859-1
> Client-Date: Mon, 22 Mar 2004 23:32:41 GMT
> Client-Peer: 128.250.37.70:3128
> Client-Response-Num: 1
> Proxy-Connection: close
> Title: 401 Authorization Required
> X-Cache: MISS from calamari.cs.mu.OZ.AU
>
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>401 Authorization Required</TITLE>
> </HEAD><BODY>
> <H1>Authorization Required</H1>
> This server could not verify that you
> are authorized to access the document
> requested.  Either you supplied the wrong
> credentials (e.g., bad password), or your
> browser doesn't understand how to supply
> the credentials required.<P>
> <HR>
> <ADDRESS>Apache/1.3.29 Server at rt.cs.mu.OZ.AU Port 8000</ADDRESS>
> </BODY></HTML>
>
> rt: Server error: Unauthorized (401)
>
>-- 
>
>
>warm regards
>Vinita Vigine Murugiah
>Email : vinita at cs.mu.oz.au			Ph : (03) 8344 1273
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>rt-users mailing list
>rt-users at lists.bestpractical.com
>http://lists.bestpractical.com/mailman/listinfo/rt-users
>
>Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
>

-- 


warm regards
Vinita Vigine Murugiah
Email : vinita at cs.mu.oz.au			Ph : (03) 8344 1273


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20040325/2671c3c7/attachment.htm>


More information about the rt-users mailing list