Xymon Mailing List Archive search

authentification check tests for cookies acceptance

list Rolf Schrittenlocher
Wed, 13 Nov 2013 08:57:01 +0100
Message-Id: <user-af3579127977@xymon.invalid>

Hi Ralph,

I succeeded partly with curl (and finally with Xymon's build in http test). Partly because the login process I wanted to test turned out to be a serie of redirects where different data is created dynamically and transferred in hidden forms and tags. That was the real problem, not the cookie. I content myself now with checking the first part of this process, better than nothing. Thank you for helping,

kind regards
Rolf
There are (at least) 2 ways to handle this:

1) try "curl -o page.html http://server.domain.com";,  then look at page.html to see what it does, and work out where to go from there.

2) there's a plugin for Firefox called LiveHTTPheaders.  That records all incoming and outgoing headers when you go to a web page.  That'll show what gets sent back to the server after the initial page discovers that cookies work.

It's possible that the initial page doesn't send anything back.  It may just give any error if setting a cookie fails, rather than allowing you to continue.  If so, you could probably use Xymon's http test.

Ralph Mitchell


On Tue, Nov 12, 2013 at 1:46 AM, Rolf Schrittenlocher <user-4b3b4051a09b@xymon.invalid <mailto:user-4b3b4051a09b@xymon.invalid>> wrote:

    Thank you Ralph, so that'll be the best way,
    kind regards
    Rolf
    It's very likely the web page has some JavaScript that is
    executed on loading, to set and read a cookie.  Xymom doesn't do
    JavaScript, but you can fake it in an ext script using curl.

    Ralph Mitchell

    On Nov 11, 2013 6:23 AM, "Rolf Schrittenlocher"
    <user-4b3b4051a09b@xymon.invalid
    <mailto:user-4b3b4051a09b@xymon.invalid>> wrote:

        Hi all,

        I want to test login on an authentification form with http.
        The requested url checks for the acceptance of cookies. If
        cookies aren't accepted an error message is returned even if
        authentification is successful. There is no need to transfer
        cookies contents, only xymon has to to send the information
        "yes, cookies accepted" with the http-test to the url. Is
        that possible?

        kind regards
        Rolf

        --         Mit freundlichen Gruessen
        Rolf Schrittenlocher

        Lokales Bibliothekssystem Frankfurt
        Senckenberganlage 31, 60054 Frankfurt
        Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
        LBS: user-1e39a1813094@xymon.invalid
        Persoenlich: user-4b3b4051a09b@xymon.invalid

    --     Mit freundlichen Gruessen
    Rolf Schrittenlocher

    Lokales Bibliothekssystem Frankfurt
    Senckenberganlage 31, 60054 Frankfurt
    Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
    LBS:user-1e39a1813094@xymon.invalid  <mailto:user-1e39a1813094@xymon.invalid>
    Persoenlich:user-4b3b4051a09b@xymon.invalid  <mailto:user-4b3b4051a09b@xymon.invalid>  
-- 
Mit freundlichen Gruessen
Rolf Schrittenlocher

Lokales Bibliothekssystem Frankfurt
Senckenberganlage 31, 60054 Frankfurt
Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
LBS: user-1e39a1813094@xymon.invalid
Persoenlich: user-4b3b4051a09b@xymon.invalid