Dear Masters,

please forgive my sillyness if you find any in the following text, but I think I've got something resembling a good idea and I would like to ensure that it may really work. I haven't seen this around, but if someone already had it please point me towards their solution. Moreover, I'm no expert in the field, but I tried to look around for a definitive solution and I did not find it.

The problem is quite simple: managing login of users from a web application. I've basically detected two broad families:

The first thing I understand is that all of them do not guarantee much confidentiality, so one would better use strong encription techniques by means of HTTPS/SSL. Noted.

A quick, bird's eye comparison boils down to the following for me:

Summing up, it seems that the HTTP-based solution should be the way to go if I want to be on the safe side (Using CGI::Application on perl.com, however a bit dated, seems to second this impression), but this logout-impossibility is really annoying. So, I finally came up with an idea for a solution.

When you authenticate using the HTTP-based approach, you're asking the permission to "explore" a specific realm. When you try to get into another realm, you're usually asked for a different username/password pair, even if they are pretty the same as the original realm. The idea is: why don't use a realm name that actually is a session token? In this way, I could guarantee a logout feature by simply expiring the realm - if the user wants to get in again, another token is generated to create a brand-new realm.

And now I ask myself: is it really this simple. Probabilities come in handy here: "dumb idea, it cannot work in real world for this, that and more" (80%), "there is something that does more than this, and quite better" (15%), "hey! this is a GREAT idea!" (1e-5%). The remainder of the cake is for a general "cases I've not thought about, but I had better do" entry.

I'd like to have a feedback before giving that 1e-5% a chance and dive into the various Apache modules to figure out how this could be accomplished. Thank you in advance for any counter-Meditation,

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.

In reply to Authentication in web applications by polettix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.