Does anybody know of any good mechanisms to avoid having plain text passwords in one's DBI code? Prompting for a password is not an option, as my code has to be able to run autonomously.

One solution I thought of was writing a daemon (or using a pre-existing one if this wheel's already been invented) to listen on a port, perform some type of authentication against incoming connections (presumably involving a non-worldreadable key or password file), and then make itself into a bridge between the remote host and the MySQL server. In this instance, mysql would only allow connections from the localhost, so one would be required to go through this proxy daemon. Please note that I haven't thought about the details involved in this scheme, or even decided if it is secure or possible.

I'm sure other people have run into this problem, how have they dealt with it? My main goal here is that i don't want to have plain text passwords in my code *or* going across my network.

Thanks!
Mark


In reply to DBI and plain text passwords by young perlhopper

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.