OK, trying this again.   Still isn't working right.

Want to POST to NAGIOS GUI which is COSIGN PROTECTED.

Current situation (in pseudo shell code for security, etc.):

#!/usr/bin/sh
#... lots of preparation

nagios="the.protected.nagios.server"
cosignHost="https://the.universitys.cosign.server/";
cookies="/tmp/cookies.$$
format="%{http_code} %{url_effective}\n\t------\n"

# get cosign cookies
curl -k -L -w "$format" -b $cookies -c $cookies "$cosignHost"
# this writes out "200" as the http_code and the value of cosignHost as the
#       effective url.

# attempt login
curl -k -L -w "$format" -o /dev/null -b $cookies -c $cookies "$cosignHost" \
        --data "login=xxxx&password=yyyyy&doLogin=1"
# this writes out "200" as the http_code and the value of cosignHost as the
#       effective url.

# just connect to protected resource with GET
curl -k -L -w "$format" -o /dev/null -b $cookies -c $cookies  \
        "https://$nagios/nagios/cgi-bin/extinfo.cgi?type=1&host=some.host.here";
# this writes out "200" as the http_code and as the effective url a string
# containing the equivalent of  "cosignHost?cosign-$nagios&" contatenated
# with the above specified URL -- I guess kind of as expected...

# now access with POST
curl -k -L -w "$format" -o /tmp/post.result -b $cookies -c $cookies \
         "$cosignHost?cosign-$nagios&https://$nagios/nagios/cgi-bin/cmd.cgi"; \
             --data "all=the&data=to.be.posted"
# this writes out "200" as the http_code and as the effective url a string
# containing the equivalent of  "cosignHost?cosign-$nagios&" contatenated
# with the above specified URL -- So it seems my POST is getting switched
# to a GET

I guess I'm confused that something which SEEMS as commonly needed as this kind
of feature would be, that there wouldn't be a cut/paste cookbook to implement
it.  Every example in these discussions (and I see there are a few) differ in
details and I've tried to model every one of them with no luck.

-- 
J.Lance Wilkinson ("Lance")             InterNet: [email protected]
Systems Design Specialist - Lead        Phone: (814) 865-4870
Digital Library Technologies            FAX:   (814) 863-3560
E3 Paterno Library
Penn State University
University Park, PA 16802

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Cosign-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cosign-discuss

Reply via email to