Re: [Cosign-discuss] invoking cosign.cgi from commandline

2015-02-11 Thread Phil Pishioneri
On 2/11/15 12:15 PM, Liam Hoekenga wrote:
> I'm trying to do some debugging, and would like to  be able to invoke 
> cosign.cgi from the command line (so I can strace it).
>
> I'm trying something like..
> ...
> QUERY_STRING=login=liamr\&password=password\&service=cosign-host.example.edu 
> \&required=EXAMPLE.EDU 
> \&ref=https://host.example.edu \
> /opt/local/cosign-3.2.0/cgi-ssl/cosign.cgi

If you haven't logged in yet, you're trying to do two transactions. The 
service=... would come over first, and the cgi would present the login 
form and fill in the "service" field on the html form. So, on browser's 
POST, there's form data with the service, ref, etc. that would come 
along as additional Content.

Compare it to an actual browser session: you can see it all using 
Firefox with the "Live HTTP headers" add-on (or similar on another browser).

-Phil

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss


[Cosign-discuss] invoking cosign.cgi from commandline

2015-02-11 Thread Liam Hoekenga
I'm trying to do some debugging, and would like to  be able to invoke
cosign.cgi from the command line (so I can strace it).

I'm trying something like..

#!/bin/bash
env \
SCRIPT_NAME=/cosign-cgi/cosign.cgi \
REQUEST_METHOD=POST \
REMOTE_ADDR=XXX.XXX.XXX.XXX \
SERVER_NAME=host.example.edu \
SERVER_PORT=443 \
QUERY_STRING=login=liamr\&password=password\&service=
cosign-host.example.edu\&required=EXAMPLE.EDU\&ref=https://host.example.edu
\
/opt/local/cosign-3.2.0/cgi-ssl/cosign.cgi

..and get...

Status: 400
cosign cgi: Error: Unrecognized Service: Bad service in query string.

should this work?
Liam
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Cosign-discuss mailing list
Cosign-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cosign-discuss