If I have made any mistakes or erroneous assumptions here please tell me! :)

To be fair the context of your intitial request hinted more at your wanting to look at the network credentials of the authenticated user. At least thats how I saw that.

However, regardless of first impression, you should look at this from a different angle. Consider yourself as the user of your application/network.

You want the confidence that once authenticated, your password is not used or transmitted again unless specifically actioned by yourself. Your password is direct access to your identity so you want the finest control over it you can have.

The environment you refer to comes from the server. The server doesn't magic this up but receives these variables from the context of where and how it is running. For it to create the password environement variable for your program it must have first received that information in some form.

Now this would have to come with every single request from the client regardless of whether you are using mod perl or not. That would mean that the clients password would be transmitted over the network each time it did something.

Now you should clearly see why that is dangerous.

If you are wanting to stick with network security as your methodology (which is what you originally implied) then you have to trust to the security of that network.

However, you have a separate context of the user implicity providing their authentication details. In that instance then you have already been given the advice you need on how to implement this. You must bear in mind, though, that this will ultimately be a different set of data to that of the network authentication data (though some users will be naughty and use the same usernames/passwords).

HTH

SP

In reply to Re: Re: Re: Accessing Authenticated User's Password From CGI by simon.proctor
in thread Accessing Authenticated User's Password From CGI by enoch

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.